3 ms·
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 au
by antirez 17y ago
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.
- emson 17y agoVery good, that looks really interesting.