Hacker Timesnew | past | comments | ask | show | jobs | submitlogin

Some time ago I wrote this little script in order to track, among different virtual hosts, what is consuming too much CPU:

    #!/bin/sh
    cd /proc
    ps auxw | grep apache2 | grep 'Rl' | sed -e 's/ \+/ /g' | \
     cut -d' ' -f2 | egrep '[0-9]+' | xargs ls -l | grep cwd
Basically this will print a line for every instance of every apache virtual host that is 'running' right now.

It's Linux specific.



Very good, that looks really interesting.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: