Thread: mPrime over SSH
View Single Post
Old 2011-06-29, 16:52   #3
chris2be8
 
chris2be8's Avatar
 
Sep 2009

23·103 Posts
Default

Quote:
Originally Posted by mdettweiler View Post
I think what you need is to run mprime with "nohup" so it doesn't get terminated when you close the SSH connection. If you run it like this:

ssh <ip address> /home/mprime/mprime -t

mprime will be started in the background on the client represented by <ip address>, and will stay running when you disconnect from SSH. mprime's console output will be redirected to the file stdout.log (or something like that, I'm not completely sure) in whatever working directory your SSH connection first puts you in.
I think you mean:
ssh <ip address> 'nohup /home/mprime/mprime -t >mprime.out 2>&1 & '

The single quotes round the parms passed to ssh ensure everything inside it is passed to the destination to run there. Without the redirection to mprime.out nohup would write to nohup.out, which is OK unless some other task also tries to write to it.

Your SSH connection will usually put you into your home dir. Try "ssh <ip address> pwd" to check.

You could also try running the whole ssh command under nohup on the source system.

Chris K
chris2be8 is offline   Reply With Quote