What script is running by Perl?


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users What script is running by Perl?
# 1  
Old 11-27-2010
What script is running by Perl?

Dear fellow unixoids!

I need a little help (just a link would be fine) how can I investigate what specific perl script is eating 100% of cpu of my ubuntu server:
Code:
  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                                                                                                                           
17970 root      25   0 20280  15m  764 R  100  2.9   3875:06 perl                                                                                                                                              
18048 root      16   0  2212 1084  824 R    0  0.2   0:00.55 top                                                                                                                                               
19569 www-data  16   0 36876  12m 4232 S    0  2.4   0:00.09 apache2                                                                                                                                           
22213 www-data  16   0 36940  11m 4088 S    0  2.3   0:00.04 apache2                                                                                                                                           
26263 www-data  15   0 36040  11m 3656 S    0  2.2   0:00.01 apache2

Couldn't find an answer on Google...
Thanks!
# 2  
Old 11-27-2010
Try
Code:
ps -fp 17970

( this assumes that your 'perl' process that hogs the CPU is 17970 as given in your example). You should then find out the guilty script.

Loïc
This User Gave Thanks to Loic Domaigne For This Post:
# 3  
Old 11-27-2010
Thank you very much!
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Perl script running multiple commands at once

Hi All, I have put a perl script together to go and collect some information from multiple nodes/endpoints. The script works absolutly fine however I want to make it quicker. You will see in the below that my script calls an expect script called ssh_run_cmd2.exp followed by the IP of... (7 Replies)
Discussion started by: mutley2202
7 Replies

2. Windows & DOS: Issues & Discussions

PERL: Running script from Notepad++

I'm not sure if this forum covers PERL issues but here I go: I'm trying to run a PERL script from Notepadd++. I've entered the path of the script from the run command but it is only opening a blank window. Is there anything else that needs to be done when using the 'RUN' feature of Notepad++? (2 Replies)
Discussion started by: millsy5
2 Replies

3. Shell Programming and Scripting

Running one Perl script from another

Hi, I have one small question - what is the best way to run one perl script from another? Thanks in advance. (1 Reply)
Discussion started by: xqwzts
1 Replies

4. Shell Programming and Scripting

Running unix commands in a perl script

Executing two unix commads via perl script one after another e.g: make clean bsub -i -q short make have tried using exec but the second command doesnt executes (1 Reply)
Discussion started by: rajroshan
1 Replies

5. Shell Programming and Scripting

running shell command in Perl script

Does not work. #!/usr/bin/perl $etcdir = 'ls -l /etc'; print $etcdir; #END ------------result-------- #perl -w abc123.pl ls -l /etc # This method works. #!/usr/bin/perl $etcdir = system("ls -l /etc"); print $etcdir; #END (2 Replies)
Discussion started by: dplinux
2 Replies

6. Shell Programming and Scripting

running perl script problem

While executing perl scriptit gives some compling issue, please help out $inputFilename="c:\allways.pl"; open (FILEH,$inputFilename) or die "Could not open log file"; Error : Could not open log file at c:\allways.pl line 4 learner in Perl (1 Reply)
Discussion started by: allways4u21
1 Replies

7. Shell Programming and Scripting

running egrep in perl script ?

Hi there if i run this from the BASH command line, i get a good result # FS="my-box23/account" # zfs list -t filesystem -H | cut -f1 |egrep "^ZPpool1/$FS$" ZP0pool1/my-box23/account which is great, however if I try to run in a perl script populating an array with the result/s, i get... (4 Replies)
Discussion started by: rethink
4 Replies

8. Shell Programming and Scripting

Problems in running a Perl script via cronjob

I have a very basic perl script that attempts to find if a process is running. If the process is not running then the script is supposed to start the process. If I execute the script from command line it works fine as expected. However if the script is executed via cronjob, the script cannot find... (1 Reply)
Discussion started by: ypant
1 Replies

9. UNIX for Dummies Questions & Answers

running a Perl script on HPUX platform

Hi, I wish to execute a simple perl script to pass unix commands on a HPUX platform, retrieve the result and filter through the text to determine outcomes x,y and z. I am developing the code on my windows system. I initially wrote the code to issue UNIX commands line by line, however i soon... (1 Reply)
Discussion started by: mmetcalfe
1 Replies

10. Shell Programming and Scripting

Running a remote Server through perl script

Hello people, I am want to run a server on remote machine through perl scripting using telnet api. Now when I try to do so, the server gets started perfectly, but as soon as I close the telnet connection in the script, the server started on the remote machine suddenly goes down. I also... (0 Replies)
Discussion started by: chandrak
0 Replies
Login or Register to Ask a Question