RunawayProcess
Some navigation will not work unless JavaScript is enabled
All Links: Showv | Hide^
Special Requests
Highlighted FAQs
SPACE
FALL 2013 INFO
SUMMER COURSE INFO
HEALTH
FLOOR 411*
- Labs
- Lab Policy
- Audio Help
- Video Help
- Equipment Room
- ER Check In Out Mandatory Session
- Checkout Policy
- Equipment Lists
- Classrooms
- Rooms Schedule
- Room Reservations/Policy
- Facilities
- Wireless Computing
- On-Floor Printing
- Floor Map
- Staging Space
- Physical Computing
- Announcements
- Policy
- Safety
- Project Storage
- Shop
- Safety
- Laser Cutter
- ** New ** Bobst Library Guide for ITP
- Advanced Media Studio
- Materials Connexion
- Fabricators
Help / RunawayProcess
Help.RunawayProcess History
Hide minor edits - Show changes to output
Changed lines 1-2 from:
!Runaway Proccess / Infinite Loop
to:
!Runaway Process / Infinite Loop
Added lines 1-72:
!Runaway Proccess / Infinite Loop
When a program gets caught in an infinite loop (the condition to end the repeat loop is never met), it uses up resources on the server and will continue to use resources until it is stopped (killed). If you're testing in a web browser, pressing the browser's stop button or closing the browser does NOT necessarily stop the process. You need to ssh/telnet into your account.
If you're running the program from the command line of an ssh/telnet session, it can usually be stopped with a cntl-C. If this doesn't work you will need to open another ssh/telnet session and stop the process from there.
The following are instructions for stopping a "run-away" program in your account on itp.nyu.edu.
After you have successfully logged into your account and get a command prompt, type:
->ps -U netid (that's a capital U)
You will get a list like:
(:table border=0 cellpadding=2 cellspacing=2 :)
(:cellnr:)PID
(:cell:)TTY
(:cell:)TIME
(:cell:)CMD
(:cellnr:)18608
(:cell:)?
(:cell:)00:00:00
(:cell:)sshd
(:cellnr:)18609
(:cell:)pts/0
(:cell:)00:00:00
(:cell:)bash
(:cellnr:)30765
(:cell:)?
(:cell:)00:00:00
(:cell:)program_name.cgi
(:cellnr:)31220
(:cell:)pts/0
(:cell:)00:00:00
(:cell:)ps
(:tableend:)
If that doesn't give you enough information try:
->ps -U netid -x (this gives more information)
or
->ps -ux (the lowercase -ux gives even more info)
To kill program_name.cgi, type:
->kill pid (pid - process id number)\\
kill 30765 (for the example above)
->if there are several instances of program_name.cgi, you might want to use: pkill program_name.cgi (to end all of them)
Then: ps -U netid
if program_name.cgi is still there then type:
->kill -9 pid\\
kill -9 30765 (for the example above)
->pkill -9 program_name.cgi (if more than one instance)
Then repeat: ps -U netid
It should be gone by then.
kill pid#/pkill program_name.cgi is the gentler way to kill a process -- tell the program to stop. Sometimes when a program is in an infinite loop it doesn't even "hear" the request to stop. kill -9 pid#/pkill -9 program_name.cgi will stop the process whether it's "listening" or not.
In general though, use kill first and only use kill -9 if the kill doesn't work.
When a program gets caught in an infinite loop (the condition to end the repeat loop is never met), it uses up resources on the server and will continue to use resources until it is stopped (killed). If you're testing in a web browser, pressing the browser's stop button or closing the browser does NOT necessarily stop the process. You need to ssh/telnet into your account.
If you're running the program from the command line of an ssh/telnet session, it can usually be stopped with a cntl-C. If this doesn't work you will need to open another ssh/telnet session and stop the process from there.
The following are instructions for stopping a "run-away" program in your account on itp.nyu.edu.
After you have successfully logged into your account and get a command prompt, type:
->ps -U netid (that's a capital U)
You will get a list like:
(:table border=0 cellpadding=2 cellspacing=2 :)
(:cellnr:)PID
(:cell:)TTY
(:cell:)TIME
(:cell:)CMD
(:cellnr:)18608
(:cell:)?
(:cell:)00:00:00
(:cell:)sshd
(:cellnr:)18609
(:cell:)pts/0
(:cell:)00:00:00
(:cell:)bash
(:cellnr:)30765
(:cell:)?
(:cell:)00:00:00
(:cell:)program_name.cgi
(:cellnr:)31220
(:cell:)pts/0
(:cell:)00:00:00
(:cell:)ps
(:tableend:)
If that doesn't give you enough information try:
->ps -U netid -x (this gives more information)
or
->ps -ux (the lowercase -ux gives even more info)
To kill program_name.cgi, type:
->kill pid (pid - process id number)\\
kill 30765 (for the example above)
->if there are several instances of program_name.cgi, you might want to use: pkill program_name.cgi (to end all of them)
Then: ps -U netid
if program_name.cgi is still there then type:
->kill -9 pid\\
kill -9 30765 (for the example above)
->pkill -9 program_name.cgi (if more than one instance)
Then repeat: ps -U netid
It should be gone by then.
kill pid#/pkill program_name.cgi is the gentler way to kill a process -- tell the program to stop. Sometimes when a program is in an infinite loop it doesn't even "hear" the request to stop. kill -9 pid#/pkill -9 program_name.cgi will stop the process whether it's "listening" or not.
In general though, use kill first and only use kill -9 if the kill doesn't work.




