查看日志 journalctl

1. 查看所有日志(默认)

 journalctl
2. 查看内核日志

journalctl -k

3. 查看本次启动日志

journalctl -b

4. 按服务查看 -u

journalctl -u ha-bridge.service
journalctl -u home-assistant@pi.service --since today

5. 日志追踪

journalctl -f

sudo journalctl -f -u home-assistant@pi.service | grep -i 'error'

6. 应用 : 重启服务并查看

sudo systemctl restart home-assistant@pi && sudo journalctl -f -u home-assistant@pi

posted on 2015-08-29 13:48  duanxz  阅读(632)  评论(0)    收藏  举报