Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] Pickup output of a running process
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
massctrl
Apprentice
Apprentice


Joined: 19 Mar 2004
Posts: 156

PostPosted: Mon Aug 30, 2004 10:23 am    Post subject: [solved] Pickup output of a running process Reply with quote

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
View user's profile Send private message
hjnenc
Veteran
Veteran


Joined: 15 Aug 2004
Posts: 1599
Location: Vienna, Austria

PostPosted: Mon Aug 30, 2004 10:26 am    Post subject: Reply with quote

write the output to a file:
Code:
emerge "somestuff" > "somefile" 2>&1 &
Back to top
View user's profile Send private message
massctrl
Apprentice
Apprentice


Joined: 19 Mar 2004
Posts: 156

PostPosted: Mon Aug 30, 2004 11:30 am    Post subject: Reply with quote

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
View user's profile Send private message
hlewagastir
n00b
n00b


Joined: 30 Aug 2004
Posts: 10
Location: Sweden

PostPosted: Mon Aug 30, 2004 5:53 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum