Examining Log Files

Where are the log files? What log file should I be looking at? This is a very active server, are there programs for monitoring all these files?

Applicable to Centos Versions:

  • Centos 5.x

Understanding

Explanation of requirements.

  1. Most log files are located in /var/log/*
  2. Log analysis and reporting tools

Doing the Work

Basic description of what will be done and what is expected.

  1. Looking for recent MTA (Mail Transport Agent) messages that could help us:
  2. tail -f /var/log/maillog
  3. Looking for recent HTTPD (Apache) error logs for reasons why we cannot view our website:
  4. tail -f /var/log/httpd/mysite.com-error_log
  5. Checking for recent ssh activity:
  6. tail -f /var/log/secure
    last|lastb - These commands will show you the last successful logins via ssh (last) or the last
    successful attempts including the unsuccessful attempts (lastb).

Troubleshooting

How to test

Explanation troubleshooting basics and expectations.

  1. Explanation of test step 1:
  2. Test command
  3. Explanation of test step 2:
  4. Test command or expected output

Common problems and fixes

Describe common problems here, include links to known common problems if on another site

More Information

Any additional information or notes.

Disclaimer

We test this stuff on our own machines, really we do. But you may run into problems, if you do, come to #centos on irc.freenode.net

Added Reading


© 2012 CentosHelp.org