System information
64 System Analysis and Tuning Guide
Xorg.0.log
X startup log file. Refer to this in case you have problems starting X. Copies from
previous X starts are numbered Xorg.?.log.
YaST2/*
All YaST log files.
zypp/*
libzypp log files. Refer to these files for the package installation history.
zypper.log
Logs from the command line installer zypper.
4.2 Viewing and Parsing Log Files
To view log files, you can use your favorite text editor. There is also a simple YaST
module for viewing /var/log/messages, available in the YaST Control Center
under Miscellaneous > System Log.
For viewing log files in a text console, use the commands less or more. Use head
and tail to view the beginning or end of a log file. To view entries appended to a
log file in real-time use tail -f. For information about how to use these tools, see
their man pages.
To search for strings or regular expressions in log files use grep. awk is useful for
parsing and rewriting log files.
4.3 Managing Log Files with
logrotate
Log files under /var/log grow on a daily basis and quickly become very big.
logrotate is a tool for large amounts of log files and helps you to manage these
files and to control their growth. It allows automatic rotation, removal, compres-
sion, and mailing of log files. Log files can be handled periodically (daily, weekly, or
monthly) or when exceeding a particular size.