Bluehost.com Web Hosting $6.95

Will killing tty stop remote jobs started by that session?

This is a discussion on Will killing tty stop remote jobs started by that session? within the Linux General forums, part of the Linux Forums category; On my PC I've SSH'ed into a remote server and have started an rsync that's going to ...


Go Back   Usenet Forums > Linux Forums > Linux General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 06-10-2008
mechphisto@gmail.com
 
Posts: n/a
Default Will killing tty stop remote jobs started by that session?

On my PC I've SSH'ed into a remote server and have started an rsync
that's going to take a couple of days.
I've:
# Ctrl+z && bg
to send it running in the background.
But I found that I may need to reboot my PC.
Obviously this will kill my SSH's terminal session. Will this also
kill the running job, or will it continue running until it's done
regardless of my reboot?
Thanks!
-Liam
Reply With Quote
  #2 (permalink)  
Old 06-10-2008
mechphisto@gmail.com
 
Posts: n/a
Default Re: Will killing tty stop remote jobs started by that session?

On Jun 10, 12:57*pm, mechphi...@gmail.com wrote:
> On my PC I've SSH'ed into a remote server and have started an rsync
> that's going to take a couple of days.
> I've:
> # Ctrl+z && bg
> to send it running in the background.
> But I found that I may need to reboot my PC.
> Obviously this will kill my SSH's terminal session. Will this also
> kill the running job, or will it continue running until it's done
> regardless of my reboot?
> Thanks!
> -Liam


OH, PS: That rsync is between two remote servers...not my PC. I just
started the job with my PC.
Reply With Quote
  #3 (permalink)  
Old 06-11-2008
mechphisto@gmail.com
 
Posts: n/a
Default Re: Will killing tty stop remote jobs started by that session?

On Jun 10, 1:01*pm, mechphi...@gmail.com wrote:
> On Jun 10, 12:57*pm, mechphi...@gmail.com wrote:
>
> > On my PC I've SSH'ed into a remote server and have started an rsync
> > that's going to take a couple of days.
> > I've:
> > # Ctrl+z && bg
> > to send it running in the background.
> > But I found that I may need to reboot my PC.
> > Obviously this will kill my SSH's terminal session. Will this also
> > kill the running job, or will it continue running until it's done
> > regardless of my reboot?
> > Thanks!
> > -Liam

>
> OH, PS: That rsync is between two remote servers...not my PC. I just
> started the job with my PC.


Really? No feedback?
I know the easiest way to get an answer would be for me to start a
long but harmless process on a remote system and closing the terminal
and seeing if it's still running. Case closed.
Unfortunately I can't test it as this rsync has been going for days
and still has days to go (100GB of data being transferred to a server
behind a 1Mbps connection), so IF my closing my PC's connection to the
remote server does stop the job, I REALLY don't want to have wasted
all this time.

Thanks for any reply.
Reply With Quote
  #4 (permalink)  
Old 06-12-2008
Johan Lindquist
 
Posts: n/a
Default Re: Will killing tty stop remote jobs started by that session?

So anyway, it was like, 22:15 CEST Jun 11 2008, you know? Oh, and, yeah,
mechphisto@gmail.com was all like, "Dude,

[..]

> Unfortunately I can't test it as this rsync has been going for
> days and still has days to go (100GB of data being transferred
> to a server behind a 1Mbps connection), so IF my closing my PC's
> connection to the remote server does stop the job, I REALLY don't
> want to have wasted all this time.


Lesson for next time: use screen. It's very handy for all sorts of
lengthy remote sessions.

However, since rsync won't transfer everything all over again when you
restart it, the time lost when your process is killed because your tty
went away should only be the time to tally up the files on both sides.

...or so I understand.

--
Time flies like an arrow, fruit flies like a banana. Perth ---> *
09:19:47 up 1 day, 10:55, 1 user, load average: 0.02, 0.34, 0.32
Linux 2.6.23.12 x86_64 GNU/Linux Registered Linux user #261729
Reply With Quote
  #5 (permalink)  
Old 06-12-2008
mechphisto@gmail.com
 
Posts: n/a
Default Re: Will killing tty stop remote jobs started by that session?

On Jun 12, 2:23*am, Johan Lindquist <s...@smilfinken.net> wrote:
> So anyway, it was like, 22:15 CEST Jun 11 2008, you know? Oh, and, yeah,
> mechphi...@gmail.com was all like, "Dude,
>
> [..]
>
> > Unfortunately I can't test it as this rsync has been going for
> > days and still has days to go (100GB of data being transferred
> > to a server behind a 1Mbps connection), so IF my closing my PC's
> > connection to theremoteserver doesstopthe job, I REALLY don't
> > want to have wasted all this time.

>
> Lesson for next time: use screen. It's very handy for all sorts of
> lengthyremotesessions.
>


Screen, that's pretty darn cool! I'm definitely going to remember
this.
Researching how to use screen also informed me that without it, just
using ssh shell, yeah if I loose connection any process that was
running in it is closed.
So, your suggestion also ended up answering my original question. =)

> However, since rsync won't transfer everything all over again when you
> restart it, the time lost when your process is killed because yourtty
> went away should only be the time to tally up the files on both sides.
>
> ..or so I understand.


Ah, true, true. So, not an entirely bad thing. Thanks for the
reminder.
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 07:23 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0