Using SSH to find access to a problematic script in logs of multiple domains
- by Hanan Cohen
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)