LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-06-2013, 09:08 PM   #1
Jeff9
Member
 
Registered: Jun 2013
Posts: 36

Rep: Reputation: Disabled
I can't kill a job which is causing problems


I am running on a cluster and there is a job on one of the nodes which is hung and causing problems. But if I rsh over to the node, I can't see or kill the job.

The offending job is on node2. Running from the master node, I can see the offending job using rsh like this:
Code:
master>rsh node2 ps
  PID TTY          TIME CMD
15413 ?        1-03:09:36 MYPROG
20770 ?        00:00:00 ps
master>
Process 15413 will not quit! I have no idea what it is or why it started.

But if I rsh over to node2, and try ps, then the job isn't there:
Code:
master>rsh node2
Last login: Thu Jun  6 21:59:36 EDT 2013
node2>ps
  PID TTY          TIME CMD
20856 pts/0    00:00:00 bash
20867 pts/0    00:00:00 ps
node2>
Job not there. No way for me to kill it.

Next, I go back to master, and the job appears again:
Code:
node2>logout
rlogin: connection closed.
master>rsh node2 ps
  PID TTY          TIME CMD
15413 ?        1-03:09:36 MYPROG
20897 ?        00:00:00 ps
master>
So I figured I would try to kill the job using rsh, but that didn't work, either:
Code:
master>rsh node2 "kill 15413"
master>rsh node2 ps
  PID TTY          TIME CMD
15413 ?        1-03:09:36 MYPROG
20946 ?        00:00:00 ps
master>rsh node2 "kill -9 -1"
master>rsh node2 ps
  PID TTY          TIME CMD
15413 ?        1-03:09:36 MYPROG
20980 ?        00:00:00 ps
How come ps can see this job when I use rsh, but nothing else can? More importantly, how do I kill this job?
 
Old 06-07-2013, 04:23 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,692

Rep: Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274
ps by default will print jobs belong to the current terminal (see man page). use ps -ef or pgrep to find MYPROG (and look for switches, options)
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
can't kill a backup job - space becoming limited sir-lancealot Linux - Server 2 02-28-2011 12:10 AM
How do I kill an at job? jjge Linux - Software 4 02-17-2009 05:39 AM
How to kill a back-grounded job? manojg Linux - Newbie 6 05-23-2008 03:01 PM
what process is allocating memory and causing oom-kill? thormk Linux - Server 3 04-22-2008 08:40 AM
how to kill a print job gsikora Linux - General 4 07-31-2003 10:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:26 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration