CentOS -- Perl Using 95% Of Both My CPUs
Hello, just recently PERL has been eating all my cpu power. I am running a dual xeon server, and the perl process is going crazy. I tried restarting no luck, still eating cpu. Here is what top is displaying:
Cpu0 : 92.0% us, 8.0% sy, 0.0% ni, 0.0% id, 0.0% wa, 0.0% hi, 0.0% si Cpu1 : 92.0% us, 8.0% sy, 0.0% ni, 0.0% id, 0.0% wa, 0.0% hi, 0.0% si PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 7266 root 25 0 7172 4212 2744 R 95 0.2 475:51.23 perl 7220 root 25 0 7160 4212 2744 R 51 0.2 487:20.17 perl 7168 root 25 0 7228 4212 2744 R 50 0.2 492:44.44 perl Any ideas what is going on? Can I see which process is using the perl process? Thanks for the help. |
Code:
pstree | less |
They are probably something broken, but in case you suspect they are maliciouos, you might want to snoop them a little:
You can find out what files they have open like this (example for one of the process IDs): Code:
lsof -p 7266 Code:
strace -p 7266 Code:
strace -p 7266 2>&1 |grep ^open Code:
netstat -p |grep perl |
Find out what perl script or program is running and take it from there? Perl is usually invoked and doesn't run as a service. Seems to be it might be a cron job or some type kicking off and hanging, then the ones behind it are doing the same thing. I've seen perl scripts used to backup databases that go horribly wrong or cause high cpu usage, memory usage, etc.
|
Ok, seems to be a perl script which updates my dynamic ip address with dtdns.org. It seems to be hanging and then others just stack right on top of it. It is wierd though because the script works, but just after a while of running cron tasks every 5 minutes they seem to start failing.
Can I limit the amount of time a cron script runs for? For example, is the process runs for more then 15 minutes then kill the PID? Thanks for the help. |
All times are GMT -5. The time now is 08:23 AM. |