1

A software named G09 works in parallel using Linda. It spawns its parallel childs on other node as

/usr/bin/ssh -x compute-0-127.local -n /usr/local/g09l/g09/linda-exe/l1002.exel ...other_opts...

However, when the master node kills this process, the corresponding child process on other node, namely compute-0-127 does not die but keeps running in background. Right now, I manually go to each node which has these orphaned Linda processes and kill them with kill. Is there any way to kill such child processes?
Look at pastebin 1 for PSTREE before killing the process and at pastebin 2 for PSTREE after parent is killed
pastebin1 - http://pastebin.com/yNXFR28V
pastebin2 - http:// pastebin.com/ApwXrueh
-not enough reputation points for hyperlinking second pastebin, sorry !(

Prince
  • 11
  • 4

1 Answers1

0

The best option is to try to solve the problem itself and check why the child procceses are not terminated when their parent die.

You can use this command to execute a command remotely on another machine:

ssh user@remote_machine command

Of course, you need to replace the values: user, remote_machine, and command with the appropriate values.

For example, you can do:

ssh root@remote_machine "killall compute-0-127"
Khaled
  • 36,533
  • 8
  • 72
  • 99
  • Yes, I know the way ssh works, but the processes are started by G09 software, and I can't control that, Can you please look at the pastebin (edited my question) , and suggest ways to get the appropriate values for 'user,remote_machine,command' ? – Prince Oct 30 '10 at 08:06
  • The user can be root or any user with enough permission. The remote_machine is your machine IP address that you want to kill all these processes on it. The command is shown above "killall". – Khaled Oct 30 '10 at 08:14
  • Sorry, I don't think "killall compute-0-127" will work. You can look at StackOverflow for more discussion :- http://stackoverflow.com/questions/4057758/kill-all-processes-spawned-by-parent-with-ssh-x-n-on-other-hosts/4057826#4057826 – Prince Oct 30 '10 at 08:18
  • Have you tried `killall`? – Peter Stuifzand Oct 30 '10 at 10:56