Check System Error Log Linux
Contents |
and Logs Linux maintains several system logs that help you administer a Linux system by informing you of important events. Probably
How To Check System Reboot Logs In Linux
the most important log is the file /var/log/messages, which records a linux service log variety of events, including system error messages, system startups, and system shutdowns. Like most other Linux
Linux /var/log/messages
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, how to check logs in linux server 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 linux log files explained 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. 7.3 Starting and Stopping the System and Services 7.5 Setting the System Time and Time Zone Back to: Learning Debian GNU/Linux oreilly.com Home | O'Reilly Bookstores | How to Order | O'Reilly Contacts International | About O'Reilly | Affiliated Companies | Privacy Policy © 2001, O'Reilly & Associates, Inc.
know where the log files are located, and what is contained in each and every log file. When your systems are running smoothly, take some time to
How To View Logs In Linux Command Line
learn and understand the content of various log files, which will help you when linux log command there is a crisis and you have to look though the log files to identify the issue. /etc/rsyslog.conf controls what
Ubuntu System Log
goes inside some of the log files. For example, following is the entry in rsyslog.conf for /var/log/messages. $ grep "/var/log/messages" /etc/rsyslog.conf *.info;mail.none;authpriv.none;cron.none /var/log/messages In the above output, *.info indicates that all logs with type http://www.oreilly.com/openbook/debian/book/ch07_04.html INFO will be logged. mail.none,authpriv.none,cron.none indicates that those error messages should not be logged into the /var/log/messages file. You can also specify *.none, which indicates that none of the log messages will be logged. The following are the 20 different log files that are located under /var/log/ directory. Some of these log files are distribution specific. For example, you'll see dpkg.log on Debian based systems (for example, on http://www.thegeekstuff.com/2011/08/linux-var-log-files/ Ubuntu). /var/log/messages - Contains global system messages, including the messages that are logged during system startup. There are several things that are logged in /var/log/messages including mail, cron, daemon, kern, auth, etc. /var/log/dmesg - Contains kernel ring buffer information. When the system boots up, it prints number of messages on the screen that displays information about the hardware devices that the kernel detects during boot process. These messages are available in kernel ring buffer and whenever the new message comes the old message gets overwritten. You can also view the content of this file using the dmesg command. /var/log/auth.log - Contains system authorization information, including user logins and authentication machinsm that were used. /var/log/boot.log - Contains information that are logged when the system boots /var/log/daemon.log - Contains information logged by the various background daemons that runs on the system /var/log/dpkg.log - Contains information that are logged when a package is installed or removed using dpkg command /var/log/kern.log - Contains information logged by the kernel. Helpful for you to troubleshoot a custom-built kernel. /var/log/lastlog - Displays the recent login information for all the users. This is not an ascii file. You should use lastlog command to view the content of this file. /var/log/maillog /va
Mandriva, Slackware, Gentoo linux, PCLinuxOS. All Linux questions here! Search Forums Show Threads Show Posts Tag Search Advanced Search Unanswered Threads Find All Thanked Posts Go to Page... unix and linux commands - unix http://www.unix.com/linux/68152-red-hat-check-error-log.html shell scripting red hat check error log Linux Thread Tools Search this Thread Display Modes #1 06-05-2008 itik Registered User Join Date: Oct 2007 Last Activity: 8 https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/3/html/System_Administration_Guide/ch-logfiles.html July 2015, 10:59 PM EDT Location: Toronto, Ontario Posts: 384 Thanks: 0 Thanked 2 Times in 2 Posts red hat check error log Hi All, Where should start checking error on red hat? I want to how to check error on system, paging, memory, pci, external storage, etc. I few advise will do and highly appreciated. Thanks, itik Remove advertisements Sponsored Links itik View Public Profile Find all posts by itik #2 06-06-2008 sysgate Unix based Join Date: Nov 2006 Last Activity: 18 December 2014, 3:49 AM EST Location: Bulgaria Posts: 1,420 Thanks: 0 Thanked 6 Times in 6 Posts Typing 'dmesg' should provide you with most logs in linux of that information. Remove advertisements Sponsored Links sysgate View Public Profile Visit sysgate's homepage! Find all posts by sysgate #3 06-06-2008 itik Registered User Join Date: Oct 2007 Last Activity: 8 July 2015, 10:59 PM EDT Location: Toronto, Ontario Posts: 384 Thanks: 0 Thanked 2 Times in 2 Posts where's the dmesg.conf, i don't know if that is the file for error configuration but something like that will show the locations of the messages. Thanks again. itik View Public Profile Find all posts by itik #4 06-06-2008 mark54g Registered User Join Date: May 2008 Last Activity: 26 July 2013, 11:43 AM EDT Location: Northeastern United States Posts: 918 Thanks: 1 Thanked 61 Times in 58 Posts use the command dmesg (diagnostic messages) as a superuser. Alternately, since that only gives you information regarding pre runlevel messages, also check /var/log/messages for information. Remove advertisements Sponsored Links mark54g View Public Profile Find all posts by mark54g « Previous Thread | Next Thread » Thread Tools Show Printable Version Email this Page Subscribe to this Thread Display Modes Linear Mode Switch to Hybrid Mode Switch to Threaded Mode Search this Thread Advanced Search More UNIX and Linux Forum Topics You Might Find Helpful Thread Thread Starter Forum Replies Last Post Error Check ch33ry She
kernel, services, and applications 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 syslogd. A list of log messages maintained by syslogd can be found in the /etc/syslog.conf configuration file. 38.1. Locating Log Files Most log files are located in the /var/log/ directory. Some applications such as httpd and samba have a directory within /var/log/ for their log files. 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 logrotate package contains a cron task that automatically rotates log files according to the /etc/logrotate.conf configuration file and the configuration files in the /etc/logrotate.d/ directory. By default, it is configured to rotate every week and keep four weeks worth of previous log files.