From charlesreid1

(Created page with "=Overview= Systemd is the initialization system, and is the new de-facto standard on most linux distributions. To start or stop processes, use systemctl <pre> $ systemctl r...")
 
Line 21: Line 21:
</pre>
</pre>


=Logging=


systemd has a component called journald that handles logging. This creates binary logs, which use much less space than text logs but are mroe difficult to read.


The <code>journalctl</code> command gives you access to the system logs.
To follow new log output on the system:
<pre>
$ journalctl -f
</pre>
(this is similar to <code>tail -f /var/log/my_log_file</code>)
You can filter the output by PID:
<pre>
$ journalctl PID=15800
</pre>
You can also use the name of the process to filter it:
<pre>
$ journalctl -u httpd
</pre>


=Related=
=Related=


{{LinuxNetworkingFlag}}
{{LinuxNetworkingFlag}}

Revision as of 04:33, 14 March 2016

Overview

Systemd is the initialization system, and is the new de-facto standard on most linux distributions.

To start or stop processes, use systemctl

$ systemctl restart samba

to check the status of a process:

$ systemctl status nfs-kernel-server

You can see if somethign is enabled using the is-enabled argument/otpion:

$ systemctl is-enabled ssh

Logging

systemd has a component called journald that handles logging. This creates binary logs, which use much less space than text logs but are mroe difficult to read.

The journalctl command gives you access to the system logs.

To follow new log output on the system:

$ journalctl -f

(this is similar to tail -f /var/log/my_log_file)

You can filter the output by PID:

$ journalctl PID=15800

You can also use the name of the process to filter it:

$ journalctl -u httpd

Related