Problem

In this hands-on project, you view the configuration of the System Log Daemon and the lo...

In this hands-on project, you view the configuration of the System Log Daemon and the logrotate utility.

1. 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 secret.

2. At the command prompt, type ls –l /dev/log and press Enter. What is the file type? Which daemon uses this file, and what is its purpose?

3. At the command prompt, type less /etc/rsyslog.conf and press Enter to view the configuration file for the System Log Daemon. Observe the entries. To which file does all information from the cron daemon get logged? Why? Press q when finished to quit the less utility.

4. At the command prompt, type tail /var/log/cron and observe the entries. Write down the last few entries that you see in this file.

5. At the command prompt, type killall -9 crond and press Enter to stop the cron daemon.

6. At the command prompt, type crond and press Enter to start the cron daemon.

7. At the command prompt, type tail /var/log/cron and observe the entries. Compare the output from Step 4 with the output on your terminal screen. What are the last few entries? Why?

8. At the command prompt, type cat /etc/cron.daily/logrotate and press Enter to observe the logrotate command that is run each day.

9. At the command prompt, type less /etc/logrotate.conf and press Enter to view the configuration file for the logrotate command. When are log files rotated by default? How many copies of old log files are kept by default? When finished, press q to quit the less utility.

10. 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?

11. At the command prompt, type cat /etc/logrotate.d/psacct and press Enter. How many copies of old log files are kept for this log file?

12. At the command prompt, type ls /var/log and press Enter. How many log files are present? What do the subdirectories represent? Are there any old log files?

13. Type exit and press Enter to log out of your shell.

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search
Solutions For Problems in Chapter 10