FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 07-15-2008, 12:34 PM
"David Hláčik"
 
Default background process

Sorry for such lame question but ..
*
When i am connected to server using SSH . How can i fetch process to background and close ssh session and not kill that process? And how can i later connect to server and fetch process from background to console?


All years i have been using "screen" for this.
*
Thanks in advance!

David
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 07-15-2008, 12:43 PM
"William L. Maltby"
 
Default background process

On Tue, 2008-07-15 at 14:34 +0200, David Hláčik wrote:
> Sorry for such lame question but ..
>
> When i am connected to server using SSH . How can i fetch process to
> background and close ssh session and not kill that process? And how
> can i later connect to server and fetch process from background to
> console?
>
> All years i have been using "screen" for this.

IIUC your question, the bash job control facility should allow what you
need. "Man bas:, see JOB CONTROL.

>
> Thanks in advance!
>
> David
> <snip sig stuff>

HTH
--
Bill

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 07-15-2008, 12:52 PM
Mogens Kjaer
 
Default background process

David Hlc(ik wrote:

Sorry for such lame question but ..

When i am connected to server using SSH . How can i fetch process to
background and close ssh session and not kill that process? And how can i
later connect to server and fetch process from background to console?

All years i have been using "screen" for this.


Why not continue with screen on CentOS?

yum install screen

Mogens
--
Mogens Kjaer, Carlsberg A/S, Computer Department
Gamle Carlsberg Vej 10, DK-2500 Valby, Denmark
Phone: +45 33 27 53 25, Fax: +45 33 27 47 08
Email: mk@crc.dk Homepage: http://www.crc.dk
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 07-15-2008, 01:16 PM
"Filipe Brandenburger"
 
Default background process

On Tue, Jul 15, 2008 at 08:34, David Hláčik <david@hlacik.eu> wrote:
> When i am connected to server using SSH . How can i fetch process to
> background and close ssh session and not kill that process? And how can i
> later connect to server and fetch process from background to console?

Ctrl-Z will suspend the process, then run the "bg" command to continue
running it on background, then run "disown %1" to make your shell
"forget" about the job and not send it a HUP (Hang-Up) signal when you
log out from it.

I works, unless your process will try to read from stdin, in that case
it might be killed because there is no controlling tty (or something
to that effect).

In general, though, running it on a "screen" session is a much better
alternative, because you then can detach (Ctrl-A, d) and reattach
(screen -xRR) to continue watching the output. The only problem is
that you must remember to use "screen" *before* you start running your
process...

HTH,
Filipe
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 07-15-2008, 01:18 PM
Johnny Hughes
 
Default background process

Mogens Kjaer wrote:

David Hlc(ik wrote:

Sorry for such lame question but ..

When i am connected to server using SSH . How can i fetch process to
background and close ssh session and not kill that process? And how can i
later connect to server and fetch process from background to console?

All years i have been using "screen" for this.


Why not continue with screen on CentOS?

yum install screen


Screen is certainly the best method to do this that I have found ... is
there a reason why you DON'T want to use screen.


you can use the '&' to put things in the background and use the command
'fg' to bring it to the foreground ... but screen also redirects stdout
and stderr for you, so I would still use it unless there is a specific
problem you are trying to address.


_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 07-15-2008, 01:38 PM
Les Mikesell
 
Default background process

Johnny Hughes wrote:



Sorry for such lame question but ..

When i am connected to server using SSH . How can i fetch process to
background and close ssh session and not kill that process? And how
can i

later connect to server and fetch process from background to console?

All years i have been using "screen" for this.


Why not continue with screen on CentOS?

yum install screen


Screen is certainly the best method to do this that I have found ... is
there a reason why you DON'T want to use screen.


you can use the '&' to put things in the background and use the command
'fg' to bring it to the foreground ... but screen also redirects stdout
and stderr for you, so I would still use it unless there is a specific
problem you are trying to address.


Or if you want a more modern approach - use freenx on the server and the
NX client from www.nomachine.com. This will give you a complete GUI
desktop that you can suspend when you disconnect and you can simply
leave each process running it its own window so it is easy to find.


And - you can run the whole session over an ssh connection mananged by
the client and it is very efficient even when run remotely.


--
Les Mikesell
lesmikesell@gmail.com
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 

Thread Tools




All times are GMT. The time now is 09:53 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org