Introduction
As a system administrator, managing system logs is a fundamental responsibility. The systemd journal provides a centralized and structured logging solution. In this challenge, you will practice essential skills for maintaining system journals on a Red Hat Enterprise Linux system. You will learn how to configure journal persistence, set size limits to prevent excessive disk usage, and manually rotate log files. These are key competencies for system maintenance and are relevant for the RHCSA exam.
Manage the Systemd Journal
In this challenge, you will learn how to manage and maintain system journals on a running Linux system, a key skill required for the RHCSA exam.
Tasks
- Task 1: Explore the current system journal using the
journalctlcommand. - Task 2: Configure the system journal to limit its maximum disk usage to
100M. - Task 3: Manually trigger a journal rotation and apply the new size limit.
Requirements
- Perform all operations as the
labexuser withsudoprivileges. - The default working directory is
/home/labex. - Use the system journal configuration file at
/etc/systemd/journald.conf. - If
/etc/systemd/journald.confis missing, create it with a[Journal]section before settingSystemMaxUse=100M. - Set the
SystemMaxUseparameter to100M. - Use the
journalctlcommand to rotate the journal and enforce the size limit.
Example
After completing the tasks, checking the journal's disk usage should show that it does not exceed the configured limit. The exact size will vary, but it should be under 100M.
$ sudo du -sh /var/log/journal/
XXM /var/log/journal/
Hints
Open a hint for the journal configuration file
On this image, /etc/systemd/journald.conf might not exist yet. If it is missing, create the file and add a [Journal] section before setting SystemMaxUse=100M.
Summary
In this challenge, you have learned how to manage the systemd journal on a Red Hat Enterprise Linux system. You practiced viewing logs with journalctl, configuring persistent storage limits in /etc/systemd/journald.conf, and manually rotating and cleaning journal files. These skills are essential for maintaining system health and are a key part of the RHCSA skill set.



