Skip to content

How to collect logs

Dilshat edited this page Jan 11, 2018 · 13 revisions

In case of troubles with agent, you can collect logs on a resource host by executing the following commands:

journalctl -u snap.subutai.agent-service.service --since "2015-01-10" --until "2015-01-11 03:00"

where date is in "YYYY-MM-DD HH:MM:SS" format.

You can set timezone for your convenience:

timedatectl set-timezone "Asia/Almaty"

--since and --until excepts expression in human readable format like:

journalctl -u snap.subutai.agent-service.service --since "1 hour ago" --until "10 minutes ago"

Also you can filter logs by level of severity using -p switch. There are the following log levels: 0: emerg 1: alert 2: crit 3: err 4: warning 5: notice 6: info 7: debug

The returned logs will contain also logs of higher severity (i.e. err log will contain crit, alert and emerg)