Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

7.4 Viewing System Messages and Logs

Linux maintains several system logs that help you administer a Linux system by informing you of important events. Probably the most important log is the file /var/log/messages, which records a variety of events, including system error messages, system startups, and system shutdowns. Like most other Linux files, the file contains ASCII text, so you can view it with a text editor or the text processing commands described in Chapter 13.

A special command, dmesg, makes it easy to view the log messages related to the most recent system startup. If your system is behaving unusually, use dmesg to quickly see if something went wrong during the system startup sequence. Of course, you must have some way of determining what's usual and unusual among the many messages emitted during system startup. The best way to do so is to print the output of the dmesg command and keep it on hand for comparison with suspicious output. If your system has an attached printer, you can print the output of dmesg by entering the following command:

dmesg | lpr

Other logs found in the /var/log directory include:

apache

A directory that contains two log files pertaining to the Apache web server, access.log and error.log.

exim

A directory that contains several log files pertaining to the exim mail transfer agent.

nmb and smb

Files that contain log entries pertaining to Samba, the Microsoft-compatible networking server.

ppp.log

A file the contains log entries pertaining to PPP.


Previous: 7.3 Starting and Stopping the System and Services Learning Debian GNU/Linux Next: 7.5 Setting the System Time and Time Zone
7.3 Starting and Stopping the System and Services Book Index 7.5 Setting the System Time and Time Zone

 
 
  Published under the terms of the Creative Commons License Design by Interspire