Question
How can you use journalctl to review systemd logs?
Answer
When a service is encountering issues but is not logging out to a file, you may be able to get more information by reviewing the systemd journal.
- Connect to your server as the
rootuser via SSH or the Terminal in WHM. Use the following command to view the journal:
# journalctl -u $service
Note: Replace
$servicewith the name of the service you wish to monitor. For example, the Apache service would be:httpd
Additional filters are available, viewable through journalctl's manual page:
# man journalctl
For example:
Show the last 'N' lines of the log:
# journalctl -u $service -n 100
Show logs for a specific date or time range
# journalctl -u $service --since "2026-06-01 00:00:00" --until "2026-06-03 23:59:59"
Comments
0 comments
Article is closed for comments.