I basically try to write the pstree-like command, except that it should follow the processes on the machines.
I mean, if I run this:
$ ssh $node sleep 1000
Then the command should display something like this:
ssh $node -- ($node) sleep 1000
And if I run:
$ ssh $node ssh $node sleep 1000
ssh $node---($node) ssh $node---($node) sleep 1000
Etc...
My question is this: how can I map one ssh session on one machine to a spawned process on another machine?
Local parent-child processes are not a problem, but how can I determine which ssh command on one node caused another process on another node.
linux 2.6.18
only openSSH for "remote". Running OpenSSH_4.3p2 now.
SSH access to all nodes of course (based on auth keys), so ps and netstat are accessible from all nodes.
Linux- "" , , , , .
, / script . root.
, .
pstree, "ssh", , sshd , .
, ?: P