LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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, 10: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, 05:23 AM   #2
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 8,516

Rep: Reputation: 2436Reputation: 2436Reputation: 2436Reputation: 2436Reputation: 2436Reputation: 2436Reputation: 2436Reputation: 2436Reputation: 2436Reputation: 2436Reputation: 2436
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 01:10 AM
How do I kill an at job? jjge Linux - Software 4 02-17-2009 06:39 AM
How to kill a back-grounded job? manojg Linux - Newbie 6 05-23-2008 04:01 PM
what process is allocating memory and causing oom-kill? thormk Linux - Server 3 04-22-2008 09:40 AM
how to kill a print job gsikora Linux - General 4 07-31-2003 11:26 PM


All times are GMT -5. The time now is 10:06 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration