This command works:

parallel-ssh -i -O 'IdentityFile=control.pem' -l control  -H example.com 'nohup /home/hubot/runHubot.sh' 2>&1

When I log onto my server, ps shows me that the runHubot script is running. However, this command is not backgrounded so it doesn't return to parallel-ssh

The same command, just with a single & appended to nohup doesn't work. Why?

parallel-ssh -i -O 'IdentityFile=control.pem' -l control  -H example.com 'nohup /home/hubot/runHubot.sh &' 2>&1

This command returns to parallel-ssh, but the hubot script isn't in my ps output.

How can I background this process using parallel-ssh (switching to another program is not an option)?

  • Does the second command produce a nohup.out? If yes, what's in it? – ott-- Oct 4 '12 at 16:14
  • no, not creating a nohup.out as far as i can see – andy Oct 4 '12 at 16:26
  • But then there's no nohup.out script created for the first one either... – andy Oct 4 '12 at 16:27
  • Does the script produce any output at all? Can you add an echo something to check. Have you considered using screen? – ott-- Oct 4 '12 at 20:13

Do you see it in ps -elf or ps aux? ps may only be showing you processes with a terminal.

| improve this answer | |
  • It's not in either, but i normally use ps aux – andy Oct 4 '12 at 16:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.