LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   log file usage how to (https://www.linuxquestions.org/questions/linux-server-73/log-file-usage-how-to-804243/)

golden_boy615 04-26-2010 06:40 AM

log file usage how to
 
hello every body
I wanted to know how can I use apache log files for trouble shooting ( I know how to see inside them) I mean what key word should I search in each of them when it fails ,as you know just getting cat of each of them is very time consuming , what should I search in them what should I look for in each log file.

Thanks a lot.

kirukan 04-26-2010 06:59 AM

Apache error codes?
http://www.askapache.com/htaccess/ap...rdocument.html

choogendyk 04-26-2010 07:01 AM

What exactly do you mean by failing? Search keywords are very sensitive to details. If you have a specific event that fails, open a couple of terminal windows, do a `tail -f /path/to/error_log` and then do the thing that causes the failure while watching the log.

Also, cat isn't the best approach for checking a potentially large log file. I would typically use less. You can then search, jump to the end of the file and search backwards, etc. Also, one would assume that the error_log would be relatively short compared to the access_log. If not, then you have some real problems. My inclination would be to try to fix everything you can that causes messages to error_log.

If you start by reading the logs as things happen, you'll get a sense of what to expect and what is unusual. The more familiarity you develop with the logs, the easier it will be for you to troubleshoot.


All times are GMT -5. The time now is 03:24 AM.