Monitoring services using journalctl

Systemd's journal has the added advantage that its controls allow you to easily narrow down on messages generated by specific services.

How to do it…

Here are the steps you need to perform for this recipe:

  1. First, display all the messages generated by your system.

    This will show all the messages generated on the system; run the following commands:

    ~]# journalctl
    -- Logs begin at Fri 2015-06-26 23:37:30 CEST, end at Sat 2015-07-25 00:30:01 CEST. --
    Jun 26 23:37:30 rhel7.mydomain.lan systemd-journal[106]: Runtime journal is using 8.0M (max 396.0M, leaving 594.0M of free 3.8G, current limit 396.0M).
    Jun 26 23:37:30 rhel7.mydomain.lan systemd-journal[106]: Runtime journal is using 8.0M (max 396.0M, leaving 594.0M of ...

Get Red Hat Enterprise Linux Server Cookbook now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.