Question
Project 10-4 In this hands-on project, you view the configuration and log entries created by the Systemd Journal Daemon as well as the configuration of
Project 10-4
In this hands-on project, you view the configuration and log entries created by the Systemd
Journal Daemon as well as the configuration of the logrotate utility on Fedora Linux.
1. On your Fedora Linux virtual machine, switch to a command-line terminal (tty2) by
pressing Ctrl+Alt+F2 and log in to the terminal using the user name of root and the
password of LNXrocks!.
2. At the command prompt, type ls l /dev/log and press Enter. What is the file type?
Which daemon on Fedora Linux uses this file and what is its purpose?
3. At the command prompt, type cat /etc/systemd/journald.conf and press Enter
to view the configuration file for the Systemd Journal Daemon. What line could you
uncomment and configure to set a maximum size for the journald database?
4. At the command prompt, type journalctl _COMM= and press the Tab key twice.
Which keyword could you use to view log entries from the GNOME display manager?
Press Ctrlc to return to your command prompt. Next, type journalctl _COMM=gdm
and press Enter to view log entries from the GNOME display manager. Are entries shown
for multiple days?
5. At the command prompt, type journalctl --COMM=gdm --since 5:00 and
press Enter to view log entries from the GNOME display manager since 5:00am.
6. At the command prompt, type which crond and press Enter. What is the path to the
cron daemon executable file? Next, type journalctl /sbin/crond --since
5:00 and press Enter. What entries are shown?
7. At the command prompt, type ls /var/log and press Enter. Observe the entries. Are
there log files within /var/log created by daemons that do not log entries via journald?
8. At the command prompt, type ls /var/log/cups and press Enter. Are the contents
similar to those from Step 6 in Project 10-3?
9. At the command prompt, type cat /etc/cron.daily/logrotate and press Enter
to observe the logrotate command that is run each day.
10. At the command prompt, type less /etc/logrotate.conf and press Enter to view
the configuration file for the logrotate command. How many copies of old log files
are kept by default? When finished, press q to quit the less utility.
11. At the command prompt, type ls /etc/logrotate.d and press Enter. How many
files are in this directory? Will entries in these files override the same entries in /etc/
logrotate.conf?
12. At the command prompt, type cat /etc/logrotate.d/cups and press Enter. How
many copies of old log files are kept for the log files in the /var/log/cups directory? Will
the log files be rotated if they contain no contents?
13. Type exit and press Enter to log out of your shell.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started