How To Read Error Logs In Linux
Contents |
2014 in Commands, File system, LinuxI am a new Linux user. 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 linux log files explained open or view log files on Linux operating systems? Almost all logfiles are located under /var/log
Linux /var/log/messages
directory and its sub-directories on Linux. You can change to this directory using the cd command. You need be the root user to view or access log files
What Is /var/log/messages
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 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 linux log command
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.gz maillog-20111211 messages-20131027.gz secure-20120101 spooler-20131110.gz up2date-20131110.gz To view a common log file called /var/log/messages use any one of the following command: # less /var/log/messages# more -f /var/log/messages
# cat /var/log/messages
# tail -f /var/log/messages
# grep -i error /var/log/messages
Sample outputs: Jul 17 22:04:25 router dnsprobe[276]: dns que
Computing Tutorials Open Source Pro LearnWhat is Linux? Training Certification Events Webinars CommunityParticipate
How To Check Log Files In Unix
Q&A Forums Blogs ResourcesNewsletter Distributions Publications Infographics Photos Videos /var/log/syslog Jobs elsisi February 16, 2015 Command To Check Error Logs In SSH Forums:Command Line ubuntu system log Hello i'am trying to instal a script on my site , but i have an error " Internal Server Error " and i don't http://www.cyberciti.biz/faq/linux-log-files-location-and-how-do-i-view-logs-files/ know what is this so,what's Command To Check Error Logs In SSH for specific user ? i'll usr root to accese , and want to know error logs for a user on my server what's Command To Check Error Logs please ? Print This Log in or register https://www.linux.com/forums/command-line/command-check-error-logs-ssh to post comments Like (0 likes) 1 Comments Comments RecommendedDate March 1, 2015 #2 matugm If you are using Apache then try tail -f /var/log/apache2/error.log Top Log in or register to post comments Like Leave this field blank Click Here! Advertisement Training See all LFD450 Embedded Linux Development October 24, 2016 Learn more LFS462 Linux KVM Virtualization October 24, 2016 Learn more LFD430 Developing Linux Device Drivers October 31, 2016 Learn more Newsletter NewsEnterprise Desktop Mobile & Embedded Open Source Linux Kernel DevOps Networking Cloud Computing Tutorials Open Source Pro LearnWhat is Linux? Training Certification Events Webinars CommunityParticipate Q&A Forums Blogs ResourcesNewsletter Distributions Publications Infographics Photos Videos Jobs About Linux.comTerms of Use Privacy Policy Editorial Policy Contact The Linux Foundation is a non-profit consortium enabling collaboration and innovation through an open source development model. Learn More © 2016 The Linux Foundation
Tutorials/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 http://www.linuxquestions.org/questions/linux-desktop-74/how-to-find-error-logs-927084/ This forum is for the discussion of all Linux Software used in a desktop context. Notices Welcome to LinuxQuestions.org, a friendly and active Linux Community. You are 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, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today! how to Note that registered members see fewer ads, and ContentLink is completely disabled once you log in. Are you new to LinuxQuestions.org? 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 logs in linux 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 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