Using SSH to find access to a problematic script in logs of multiple domains

Posted by Hanan Cohen on Server Fault See other posts from Server Fault or by Hanan Cohen
Published on 2011-11-20T09:47:30Z Indexed on 2011/11/20 9:58 UTC
Read the original article Hit count: 377

Filed under:
|
|
|
|

I run several (~20) sites on a Dreamhost VPS. Lately I max my memory allocation for the VPS and I want to find the problem.

I would like to have an SSH script that will scan all the log files of all the domains and show me what object (image, php script etc) gets lots of calls.

It will count the calls in each /logs/*/http/access.log, do an descending sort and show me the top 10 across domains.

But I don't know how to do that.

Can it be done?

Can anyone suggest a script that will do that?

Thanks.

(Cross posted to Stack Overflow)

© Server Fault or respective owner

Related posts about ssh

Related posts about webserver