Hi, i found this tutorial on some other forum.
#for i in $(ps -C httpd --no-headers | awk '{ print $1 }'); do PIDS="$PIDS -p $i"; done
#strace -vvFf -o /root/strace.httpd $PIDS
Run above commands about a minute or so during a peak time of the resource usage. After letting this run for a bit, you will need to break out of it ( control + c ). You'll now have a file /root/strace.httpd that contains all the system calls made by httpd.
Since the strace output is undoubtedly going to be lengthy and intimidating, it would be best to grep through it for site usage. You could do this with the following regular expression:
actual question is how does the command below apply to cpanel ? sorry i am too sleepy to think.
egrep -i '/home/httpd/vhosts/[-_a-z0-9/]+\.[a-z0-9]+' /root/strace.httpd | awk '{ print $2 }' FS="\"" > /root/httpd.usage
This should make things a bit easier to distinguish, and allow you to easily isolate the culprit
Thanks,
#for i in $(ps -C httpd --no-headers | awk '{ print $1 }'); do PIDS="$PIDS -p $i"; done
#strace -vvFf -o /root/strace.httpd $PIDS
Run above commands about a minute or so during a peak time of the resource usage. After letting this run for a bit, you will need to break out of it ( control + c ). You'll now have a file /root/strace.httpd that contains all the system calls made by httpd.
Since the strace output is undoubtedly going to be lengthy and intimidating, it would be best to grep through it for site usage. You could do this with the following regular expression:
actual question is how does the command below apply to cpanel ? sorry i am too sleepy to think.
egrep -i '/home/httpd/vhosts/[-_a-z0-9/]+\.[a-z0-9]+' /root/strace.httpd | awk '{ print $2 }' FS="\"" > /root/httpd.usage
This should make things a bit easier to distinguish, and allow you to easily isolate the culprit
Thanks,