User Tools

Site Tools


services:check_logs_of_a_service

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
services:check_logs_of_a_service [2019/12/04 20:36] – removed peterservices:check_logs_of_a_service [2020/07/23 11:08] (current) – old revision restored (2019/12/04 20:36) 192.99.15.29
Line 1: Line 1:
 +====== Services - Check logs of a service ======
  
 +===== Using systemd =====
 +
 +In **systemd** logs are stored in an internal binary format (not as text files) so you need to use **journalctl** command to access them:
 +
 +<code bash>
 +sudo journalctl -u service_name
 +sudo journalctl -u service_name -f
 +</code>
 +
 +
 +===== Using Upstart =====
 +
 +In **upstart** logs are normal text files in the **/var/log/upstart** directory, so you can process them as usual:
 +
 +<code bash>
 +cat /var/log/upstart/foo.log
 +tail -f /var/log/upstart/foo.log
 +</code>
services/check_logs_of_a_service.1575491809.txt.gz · Last modified: 2020/07/15 09:30 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki