Finding logs, using journald, and reading log files, including log preservation and rotation
In this section, you will learn how to review a system’s status via logs.
Previously in this chapter, we learned how to manage system services via systemd
, check their status, and check their logs. Traditionally, the different daemons and system components used to create files under the /var/log/
folder are based on the name of the daemon or service. If the service is used to create several logs, it would do so inside a folder for the service (for example, httpd
or samba
).
The rsyslogd
system log daemon has a new systemd
partner—named systemd-journald.service
—that also stores logs, but instead of using the traditional plain text format, it uses the binary format, which can be queried via the journalctl
command.
It’s really important to get used to reading the log files as it’s the basis for troubleshooting, so let’s learn about general logging...