Perl process causing high server load, how to find what its doing

apache-2.2perl

I've got a Debian webhosting machine with cpu loads around 11. Using top I see that perl is using 99% of the cpu as user www-data. How can I find out more about what perl is actually doing?

Best Answer

strace -p PID

... where PID is the process ID should give you some information. You'll want to google for some simple articles on using it if you've never used it before, though. Depends on how familiar you are with system calls to interpret the information. You'll want to look at the manpage or articles to log it to a text file as the output may be very fast and dump a lot of information very quickly, and there are a number of options to use.