Log Files
Log files are files that contain messages about the system, including the kernel, services, and appli-
cations running on it. There are different log files for different information. For example, there is a
default system log file, a log file just for security messages, and a log file for cron tasks.
Log files can be very useful when trying to troubleshoot a problem with the system such as trying
to load a kernel driver or when looking for unauthorized log in attempts to the system. This chapter
discusses where to find log files, how to view log files, and what to look for in log files.
Some log files are controlled by a daemon called
can be found in the
syslogd
38.1. Locating Log Files
Most log files are located in the
have a directory within
Notice the multiple files in the log file directory with numbers after them. These are created when
the log files are rotated. Log files are rotated so their file sizes do not become too large. The
package contains a cron task that automatically rotates log files according to the
logrotate
/etc/logrotate.conf
directory. By default, it is configured to rotate every week and keep four weeks worth of previous log
files.
38.2. Viewing Log Files
Most log files are in plain text format. You can view them with any text editor such as
Some log files are readable by all users on the system; however, root privileges are required to read
most log files.
To view system log files in an interactive, real-time application, use the Log Viewer. To start the
application, go to the Main Menu Button (on the Panel) => System Tools => System Logs, or type
the command
redhat-logviewer
The application only displays log files that exist; thus, the list might differ from the one shown in
Figure 38-1.
To filter the contents of the log file for keywords, type the keyword or keywords in the Filter for text
field, and click Filter. Click Reset to reset the contents.
/etc/syslog.conf
/var/log/
for their log files.
/var/log/
configuration file and the configuration files in the
at a shell prompt.
. A list of log messages maintained by
syslogd
configuration file.
directory. Some applications such as
Chapter 38.
httpd
/etc/logrotate.d/
and
samba
or Emacs.
Vi
Need help?
Do you have a question about the ENTERPRISE LINUX 3 and is the answer not in the manual?