[rhn-users] processes stop on rhe 4

Richard Riley rriley at procuri.com
Fri Aug 17 04:34:17 UTC 2007


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





More information about the rhn-users mailing list