How To Check Error Log In Linux
Contents |
2014 in Commands, File system, LinuxI am a new Linux user. linux /var/log/messages I would like to know where are the log
How To Check Logs In Linux Server
files located under Debian/Ubuntu or CentOS/RHEL/Fedora Linux server? How do I open or view linux log files explained log files on Linux operating systems? Almost all logfiles are located under /var/log directory and its sub-directories on Linux. You can change to how to view logs in linux command line this directory using the cd command. You need be the root user to view or access log files on Linux or Unix like operating systems. You can use the following commands to see the log files:less commandmore commandcat commandgrep commandtail commandzcat commandzgrep commandzmore commandHow do I
Linux Log Command
view log files on Linux?Open the Terminal or login as root user using ssh command. Go to /var/log directory using the following cd command: # cd /var/log
To list files use the following ls command: # ls Sample outputs from RHEL 6.x server:anaconda.ifcfg.log boot.log-20111225 cron-20131110.gz maillog-20111218 messages-20131103.gz secure-20131027.gz spooler-20131117.gz up2date-20131117.gz anaconda.log btmp cron-20131117.gz maillog-20111225 messages-20131110.gz secure-20131103.gz squid uptrack.log anaconda.program.log btmp-20120101 cups maillog-20120101 messages-20131117.gz secure-20131110.gz swinstall.d uptrack.log.1 anaconda.storage.log btmp-20131101.gz dkms_autoinstaller maillog-20131027.gz mysqld.log secure-20131117.gz tallylog uptrack.log.2 anaconda.syslog collectl dmesg maillog-20131103.gz ntpstats setroubleshoot UcliEvt.log varnish anaconda.yum.log ConsoleKit dmesg.old maillog-20131110.gz prelink spooler up2date wtmp arcconfig.xml cron dracut.log maillog-20131117.gz rhsm spooler-20111211 up2date-20111211 yum.log atop cron-20111211 dracut.log-20120101 messages sa spooler-20111218 up2date-20111218 yum.log-20120101 audit cron-20111218 dracut.log-20130101.gz messages-20111211 secure spooler-20111225 up2date-20111225 yum.log-20130101.gz boot.log cron-20111225 httpd messages-20111218 secure-20111211 spooler-20120101 up2date-20120101 boot.log-20111204 cron-20120101 lastlog messages-20111225 secure-20111218 spooler-20131027.gz up2date-20131027.gz boot.log-20111211 cron-20131027.gz maillog messages-20120101 secure-20111225 spooler-20131103.gz up2date-20131103.gz boot.log-20111218 cron-20131103.gTutorials/Articles Search HCL Search Reviews Search ISOs Go to Page... LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop how to find error logs User Name Remember Me? Password Linux - Desktop This forum is for the discussion of all Linux Software used how to view log files in linux in a desktop context. Notices Welcome to LinuxQuestions.org, a friendly and active Linux Community. You are what is /var/log/messages currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search,
How To Check Log Files In Unix
subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today! Note that registered members see fewer ads, and ContentLink is completely disabled once you log in. Are you new to LinuxQuestions.org? http://www.cyberciti.biz/faq/linux-log-files-location-and-how-do-i-view-logs-files/ Visit the following links: Site Howto | Site FAQ | Sitemap | Register Now If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here. Having a problem logging in? Please visit this page to clear all LQ-related cookies. Introduction to Linux - A Hands on Guide This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting http://www.linuxquestions.org/questions/linux-desktop-74/how-to-find-error-logs-927084/ started guide, with exercises at the end of each chapter. For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own. Click Here to receive this Complete Guide absolutely free. Search this Thread 02-02-2012, 12:42 AM #1 rajini23 Member Registered: Sep 2011 Posts: 153 Rep: how to find error logs Hi, I have doubt that how to find the error logs in /var/log/messages....etc every thing will be written in that file... how to i identify the errors on this please suggest me on this to sort out the error in log file in linux... i use CentOS.... rajini23 View Public Profile View LQ Blog View Review Entries View HCL Entries Find More Posts by rajini23 02-02-2012, 01:39 AM #2 EricTRA LQ Guru Registered: May 2009 Location: Gibraltar, Gibraltar Distribution: Fedora 20 with Awesome WM Posts: 6,805 Blog Entries: 1 Rep: Hello, What error are you looking for? If you want to filter out error messages from a specific process or a specific type of error message, you can always use grep to only show the lines containing
and Logs Linux maintains several system logs that help you administer a Linux system by informing you of important events. Probably http://www.oreilly.com/openbook/debian/book/ch07_04.html 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, how to 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 how to check 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.