News for hackers. Stuff that matters.
Re:Useful command-line scripts for web developers (or anyone... by antirez on Friday June 05, 2009 @12:35PM (#643454)
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.

Re:Useful command-line scripts for web developers (or anyone... by emson on Friday June 05, 2009 @06:45PM (#644162)
Very good, that looks really interesting.