[rhn-users] processes stop on rhe 4

Richard Riley rriley at procuri.com
Fri Aug 17 18:16:38 UTC 2007


Donna,
 
Nohup rsync was an example command.  What you want is just nohup in front of the command they want to execute and then the & at the end to put it in the background.  Nohup, as it alludes to, means "no hangup".  This means the command will run "forever", "until it finishes normally", or "someone manually kills the process". 
 
Richard

________________________________

From: rhn-users-bounces at redhat.com on behalf of Paula J. Lindsay
Sent: Fri 8/17/2007 10:54 AM
To: Discussions about Red Hat Network (rhn.redhat.com)
Subject: Re: [rhn-users] processes stop on rhe 4



Thank you Richard and Herta.  What's funny is they are using the & to
put in the background.
I have not tried the nohup rsync or the screen program.  I will try
that.  Many thanks for your
help.
Paula

Richard Riley wrote:

>Paula,
>
>Putting the & at the end of a command puts the process in the
>background.  If you want the process to remain running after you exit,
>you need to use nohup.  Example below:
>
>$>  nohup rsync -avz /data/ remotemachine:/ &
>
>This will start rsync and run it in the background and nohup will
>prevent if from stopping when you log off.  The main difference with
>this and using "screen" is that you cannot pull the process out of the
>background to foreground like you can with "screen", so this is mostly
>used for programs that you expect to end but don't want to wait for.
>
>Richard Riley
>System Administrator
>
>Procuri Inc.
>www.procuri.com
>
>
> 
>
>>-----Original Message-----
>>From: rhn-users-bounces at redhat.com [mailto:rhn-users-
>>bounces at redhat.com] On Behalf Of Herta Van den Eynde
>>Sent: Thursday, August 16, 2007 7:49 PM
>>To: Discussions about Red Hat Network (rhn.redhat.com)
>>Subject: Re: [rhn-users] processes stop on rhe 4
>>
>>On 17/08/07, Paula J. Lindsay <paula at scripps.edu> wrote:
>>   
>>
>>>Hi everyone,
>>>I have a red hat enterprise 4 machine connected to an instrument.
>>>     
>>>
>>There
>>   
>>
>>>is something happening that I've never seen.
>>>The users log in and put the processes in the background "&" and
>>>     
>>>
>>then
>>   
>>
>>>log off.  When they log off, the processes stop
>>>and they loose their jobs.  Has anyone heard of this?   Many
>>>     
>>>
>>thanks for
>>   
>>
>>>any advice/suggestions/solutions.
>>>Paula
>>>
>>>--
>>>--*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
>>>     
>>>
>>*-*-*
>>   
>>
>>>  o The                 Paula J. Lindsay, IT Analyst III
>>> /                      Research Computing, TPC21
>>>o   Scripps             phone:  858.784.9378
>>> \                      fax:    858.784.9301
>>>  o Research            email: paula at scripps.edu
>>> /
>>>o   Institute
>>>
>>>     
>>>
>>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>~~
>>
>>Hi Paula,
>>
>>If you haven't done so already, install the 'screen' package.
>>
>>I often work from a laptop, and sometimes from an unreliable windows
>>PC.  So if I want to run a job on a server that I don't want to get
>>interrupted, I usually go
>>
>>$ screen
>>$ script ~/output.log.`date +%Y%m%d-%H%M` # optional
>>run whatever commands I need
>><Ctrl/A/D> # detaches the screen
>>
>>At that point, I can disconnect my laptop or reboot my unstable
>>windows desktop.
>>I (or a colleague) can log in again from any source and then monitor
>>the job using a 'tail -f [output-file]', and can re-attach using
>>'screen -r'.
>>
>>To terminate 'script', press <Ctrl/D>.  To terminate 'screen', press
>><Ctrl/D> again.
>>
>>FWIIW, the screen command needs write access to the tty device, so
>>logging in from one account, su-ing to another, and then running
>>'screen' usually doesn't work.
>>
>>Hope this helps.
>>
>>Kind regards,
>>
>>Herta
>>
>>_______________________________________________
>>rhn-users mailing list
>>rhn-users at redhat.com
>>https://www.redhat.com/mailman/listinfo/rhn-users
>>   
>>
>
>
>_______________________________________________
>rhn-users mailing list
>rhn-users at redhat.com
>https://www.redhat.com/mailman/listinfo/rhn-users
>
> 
>

--
--*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
  o The                 Paula J. Lindsay, IT Analyst III
 /                      Research Computing, TPC21
o   Scripps             phone:  858.784.9378
 \                      fax:    858.784.9301
  o Research            email: paula at scripps.edu
 /                   
o   Institute                                          
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

_______________________________________________
rhn-users mailing list
rhn-users at redhat.com
https://www.redhat.com/mailman/listinfo/rhn-users



-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 10288 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/rhn-users/attachments/20070817/9f5c2c22/attachment.bin>


More information about the rhn-users mailing list