LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 07-23-2003, 08:23 AM   #1
johannes
LQ Newbie
 
Registered: Jul 2003
Posts: 6

Rep: Reputation: 0
Starting processes from remote shell and keep them running...


My problem is that I would like to start a lenghty process from a remote shell, without having it terminated when the shell is closed. I would like to use putty or webmin for that purpose.
I already tried with nohup command, but to no avail, because the process is started as a child from sshd, and when I close putty on the remote computer everything is gone...
And I don't want to let 2 computers run just because one is processing something...
If anyone of you knows a smart way to do so, I would be very glad...
 
Old 07-23-2003, 08:38 AM   #2
jpbarto
Senior Member
 
Registered: Mar 2003
Location: Pittsburgh, PA
Distribution: Gentoo / NetBSD
Posts: 1,251

Rep: Reputation: 45
have you tried executing the command with a trailing '&'?

I just tested it out and the program I started on a remote machine is still running.

hth,
jpbarto
 
Old 07-23-2003, 09:02 AM   #3
johannes
LQ Newbie
 
Registered: Jul 2003
Posts: 6

Original Poster
Rep: Reputation: 0
Unhappy Unfortunately not...

I did try with the ampersand, but unfortunately this doesn't work for me...
The process is sended to the background, but if I type exit in the shell, then it says: "there are stopped jobs" and shows me that it has stopped the job...
Nohup works better, putty doesn't stop the process then, but it is stopped when the ssh daemon closes the connection...
I will try using rlogin, and report here...
 
Old 07-23-2003, 09:07 AM   #4
johannes
LQ Newbie
 
Registered: Jul 2003
Posts: 6

Original Poster
Rep: Reputation: 0
I can't get rlogin to work, but I would anyways rather use SSH, because of the better security...
Maybe I should add that the remote computer is running WinXP here at work...
And I'm using Putty client for windows.

Last edited by johannes; 07-23-2003 at 09:08 AM.
 
Old 07-23-2003, 09:24 AM   #5
jpbarto
Senior Member
 
Registered: Mar 2003
Location: Pittsburgh, PA
Distribution: Gentoo / NetBSD
Posts: 1,251

Rep: Reputation: 45
so you ssh from winxp to a *nix box?

I don't know... but here's the experiment I tried between two slack9 boxes.

ssh into remote slack9 box,
write the following c-code:

int main (){
FILE * fp;
int i = 1;

fp = fopen ("test.output", "w");

while (i++){
fprintf (fp, "i is now %d\n", i);
fflush (fp);
sleep (10);
}

fclose (fp);

return i;
}

compiled it, ran it with '&' and then typed exit.

closed the xterm and walked over to remote machine... typed 'cat test.output'.

plus a ps revealed that the little thing was still running.

what linux are you ssh'ing into? Is this behavior perhaps configurable through sshd's config files?
 
Old 07-23-2003, 09:38 AM   #6
johannes
LQ Newbie
 
Registered: Jul 2003
Posts: 6

Original Poster
Rep: Reputation: 0
Sorry

Thank you all for your efforts and your help!
I just tried with the nohup option and the ampersand in the end again, and ran mencoder with it (which is the application I want to run), and it worked...
I was alway using "lynx www.google.com" before (out of a lack of fantasy) and that didn't survive the termination of the shell...
But mencoder does, and that's all I need...
I'm running debian woody...
Funny that lynx didn't stay alive and mencoder does, but that's maybe because it isn't able to output to nohup.out...

Thanks again for all your help!
 
  


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
starting processes on startup Henster Linux - Newbie 2 06-28-2005 12:12 PM
Many processes are starting in Linux r_213 Linux - Networking 6 11-18-2004 01:22 PM
Starting Processes baldurkn Linux - Newbie 2 06-28-2003 07:08 PM
Remote Login and Running Processes presstone Linux - General 4 12-16-2002 03:07 AM
Shell processes help.... Tobster Linux - Newbie 2 05-31-2001 07:27 PM


All times are GMT -5. The time now is 09:07 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration