Link to home
Start Free TrialLog in
Avatar of rajoo_sharma
rajoo_sharma

asked on

how to check Apache, MySQL and general logs on CentOS

Hi,
On a CentOS 5.x Server

1. How do I check Apache logs for a particular date? e.g. what was the peak of concurrent web requests on this date?

2. MySQL logs for a particular date? i.e.  a list of queries that were running at the time that the load spiked.

3. On a particular date, The traffic was very high and server became non responsive, so to identify what was the bottle neck, how do I check what was the system condition before it became non responsive, using logs?

Thanks
Avatar of Papertrip
Papertrip
Flag of United States of America image

ASKER CERTIFIED SOLUTION
Avatar of wesly_chen
wesly_chen
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
cd /var/log

use: cat <filename>
here is you search some keyword inside the log:

use: cat abc.log | grep <my keyword>
Avatar of rajoo_sharma
rajoo_sharma

ASKER

Thanks guys, I'll check and get back.
2. for log setting, also check /etc/my.cnf
grep  ^log  /etc/my.cnf


3. for more usage details, do
man sar
   sar can report certain period of time.
Hi Rajoo,

Were we able to help resolve this question?
ops wrong post
Hey guys, apologies for such a delayed response, actually I couldn't check anything since we were terribly stuck in something else. I'll check in a day or two and get back to you again.

Thanks and Regards
sysstat gives me what I want, though there were issues and it could not generate the graphs.
So we finally installed Munin and its generating graphs.