View previous topic :: View next topic |
Author |
Message |
massctrl Apprentice
Joined: 19 Mar 2004 Posts: 156
|
Posted: Mon Aug 30, 2004 10:23 am Post subject: [solved] Pickup output of a running process |
|
|
Hi all,
When ssh'ing to a box i want to emerge a program and close the connection because leaving the connection open is out of the question.
so i do
#emerge "somestuff"&
and then i close the ssh connection
How can i reconnect to that box and pickup the output of that emerge.
I can see it's busy because the output of "top" and ps -A gives me running emerge processes etc,...
Anyone with tips or better approaches?
Thanks in advance
Greetings J
Last edited by massctrl on Wed Oct 20, 2004 7:02 pm; edited 1 time in total |
|
Back to top |
|
|
hjnenc Veteran
Joined: 15 Aug 2004 Posts: 1599 Location: Vienna, Austria
|
Posted: Mon Aug 30, 2004 10:26 am Post subject: |
|
|
write the output to a file:
Code: | emerge "somestuff" > "somefile" 2>&1 & |
|
|
Back to top |
|
|
massctrl Apprentice
Joined: 19 Mar 2004 Posts: 156
|
Posted: Mon Aug 30, 2004 11:30 am Post subject: |
|
|
That's a possibility, hmm
is there a way in ssh to log off, leave the session active and pick it up later on ? |
|
Back to top |
|
|
hlewagastir n00b
Joined: 30 Aug 2004 Posts: 10 Location: Sweden
|
Posted: Mon Aug 30, 2004 5:53 pm Post subject: |
|
|
You could use 'screen'.
ssh to the server, start screen, start emerging or whatever you want to do, then detatch from the session with ctrl-a, ctrl-d. Now you can close the ssh-connection, and when you have reconnected just type "screen -r", and it will reattach to the session you detatched from earlier.
Of course you need to "emerge screen" first if you don't have it. |
|
Back to top |
|
|
|