* [gentoo-user] update remote system in background
@ 2020-04-24 7:47 Raffaele BELARDI
2020-04-24 7:49 ` Vladimir Romanov
2020-04-24 8:41 ` Michele Alzetta
0 siblings, 2 replies; 11+ messages in thread
From: Raffaele BELARDI @ 2020-04-24 7:47 UTC (permalink / raw
To: gentoo-user@lists.gentoo.org
[-- Attachment #1: Type: text/plain, Size: 528 bytes --]
Hello,
I am able to ssh into a remote system that I would like to update. I'd like to run emerge without keeping the local system connected for the whole duration of the update (probably several days). Is it possible to:
- ssh remote_machine
- emerge -uDvN world
- background and detach in some way the emerge process
- logout from ssh
- several days later, ssh into the remote_machine, reattach the emerge and check the output or continue the emerge
Thanks,
raffaele
PS I'll do it _after_ openssh update.
[-- Attachment #2: Type: text/html, Size: 5938 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-user] update remote system in background
2020-04-24 7:47 [gentoo-user] update remote system in background Raffaele BELARDI
@ 2020-04-24 7:49 ` Vladimir Romanov
2020-04-24 7:51 ` Michele Alzetta
2020-04-24 8:41 ` Michele Alzetta
1 sibling, 1 reply; 11+ messages in thread
From: Vladimir Romanov @ 2020-04-24 7:49 UTC (permalink / raw
To: gentoo-user
Yes, you can use "screen" program (Docs:
https://net2.com/how-to-use-the-screen-command-on-linux-to-keep-your-remote-task-running-when-the-connection-drops/)
пт, 24 апр. 2020 г. в 12:47, Raffaele BELARDI <raffaele.belardi@st.com>:
>
> Hello,
>
>
>
> I am able to ssh into a remote system that I would like to update. I’d like to run emerge without keeping the local system connected for the whole duration of the update (probably several days). Is it possible to:
>
>
>
> - ssh remote_machine
>
> - emerge -uDvN world
>
> - background and detach in some way the emerge process
>
> - logout from ssh
>
> - several days later, ssh into the remote_machine, reattach the emerge and check the output or continue the emerge
>
>
>
> Thanks,
>
>
>
> raffaele
>
>
>
> PS I’ll do it _after_ openssh update.
>
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-user] update remote system in background
2020-04-24 7:49 ` Vladimir Romanov
@ 2020-04-24 7:51 ` Michele Alzetta
2020-04-24 8:22 ` Raffaele BELARDI
0 siblings, 1 reply; 11+ messages in thread
From: Michele Alzetta @ 2020-04-24 7:51 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1095 bytes --]
... or tmux ...
https://github.com/tmux/tmux/wiki
Il giorno ven 24 apr 2020 alle ore 09:50 Vladimir Romanov <
blueboar2@gmail.com> ha scritto:
> Yes, you can use "screen" program (Docs:
>
> https://net2.com/how-to-use-the-screen-command-on-linux-to-keep-your-remote-task-running-when-the-connection-drops/
> )
>
> пт, 24 апр. 2020 г. в 12:47, Raffaele BELARDI <raffaele.belardi@st.com>:
> >
> > Hello,
> >
> >
> >
> > I am able to ssh into a remote system that I would like to update. I’d
> like to run emerge without keeping the local system connected for the whole
> duration of the update (probably several days). Is it possible to:
> >
> >
> >
> > - ssh remote_machine
> >
> > - emerge -uDvN world
> >
> > - background and detach in some way the emerge process
> >
> > - logout from ssh
> >
> > - several days later, ssh into the remote_machine, reattach the emerge
> and check the output or continue the emerge
> >
> >
> >
> > Thanks,
> >
> >
> >
> > raffaele
> >
> >
> >
> > PS I’ll do it _after_ openssh update.
> >
> >
>
>
[-- Attachment #2: Type: text/html, Size: 1839 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* RE: [gentoo-user] update remote system in background
2020-04-24 7:51 ` Michele Alzetta
@ 2020-04-24 8:22 ` Raffaele BELARDI
2020-04-24 9:57 ` Robert Bridge
0 siblings, 1 reply; 11+ messages in thread
From: Raffaele BELARDI @ 2020-04-24 8:22 UTC (permalink / raw
To: gentoo-user@lists.gentoo.org
[-- Attachment #1: Type: text/plain, Size: 1348 bytes --]
Wonderful, thanks! I’m going with screen, just because the first link is a shorter read.
raffaele
From: Michele Alzetta <michele.alzetta@gmail.com>
Sent: Friday, April 24, 2020 09:52
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] update remote system in background
... or tmux ...
https://github.com/tmux/tmux/wiki
Il giorno ven 24 apr 2020 alle ore 09:50 Vladimir Romanov <blueboar2@gmail.com<mailto:blueboar2@gmail.com>> ha scritto:
Yes, you can use "screen" program (Docs:
https://net2.com/how-to-use-the-screen-command-on-linux-to-keep-your-remote-task-running-when-the-connection-drops/)
пт, 24 апр. 2020 г. в 12:47, Raffaele BELARDI <raffaele.belardi@st.com<mailto:raffaele.belardi@st.com>>:
>
> Hello,
>
>
>
> I am able to ssh into a remote system that I would like to update. I’d like to run emerge without keeping the local system connected for the whole duration of the update (probably several days). Is it possible to:
>
>
>
> - ssh remote_machine
>
> - emerge -uDvN world
>
> - background and detach in some way the emerge process
>
> - logout from ssh
>
> - several days later, ssh into the remote_machine, reattach the emerge and check the output or continue the emerge
>
>
>
> Thanks,
>
>
>
> raffaele
>
>
>
> PS I’ll do it _after_ openssh update.
>
>
[-- Attachment #2: Type: text/html, Size: 4866 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-user] update remote system in background
2020-04-24 7:47 [gentoo-user] update remote system in background Raffaele BELARDI
2020-04-24 7:49 ` Vladimir Romanov
@ 2020-04-24 8:41 ` Michele Alzetta
2020-04-24 10:31 ` Neil Bothwick
1 sibling, 1 reply; 11+ messages in thread
From: Michele Alzetta @ 2020-04-24 8:41 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 980 bytes --]
... I just hope the remote system isn't running systemd, if so, you have to
do some additional tweaking before screen or tmux work. I know someone who
was bitten hard by this. Apparently systemd by default closes all running
processes of a user on logout.
Il giorno ven 24 apr 2020 alle ore 09:47 Raffaele BELARDI <
raffaele.belardi@st.com> ha scritto:
> Hello,
>
>
>
> I am able to ssh into a remote system that I would like to update. I’d
> like to run emerge without keeping the local system connected for the whole
> duration of the update (probably several days). Is it possible to:
>
>
>
> - ssh remote_machine
>
> - emerge -uDvN world
>
> - background and detach in some way the emerge process
>
> - logout from ssh
>
> - several days later, ssh into the remote_machine, reattach the emerge and
> check the output or continue the emerge
>
>
>
> Thanks,
>
>
>
> raffaele
>
>
>
> PS I’ll do it _*after*_ openssh update.
>
>
>
[-- Attachment #2: Type: text/html, Size: 3288 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-user] update remote system in background
2020-04-24 8:22 ` Raffaele BELARDI
@ 2020-04-24 9:57 ` Robert Bridge
0 siblings, 0 replies; 11+ messages in thread
From: Robert Bridge @ 2020-04-24 9:57 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 431 bytes --]
> On 24 Apr 2020, at 09:22, Raffaele BELARDI <raffaele.belardi@st.com> wrote:
>
>
> Wonderful, thanks! I’m going with screen, just because the first link is a shorter read.
> raffaele
If you ever need to work with other platforms (specifically Macs) they use tmux, which is a minor plus for that.
Otherwise for your purposes here they are basically indistinguishable barring slightly different keybindings.
[-- Attachment #2: Type: text/html, Size: 2874 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-user] update remote system in background
2020-04-24 8:41 ` Michele Alzetta
@ 2020-04-24 10:31 ` Neil Bothwick
2020-04-24 12:06 ` Rich Freeman
0 siblings, 1 reply; 11+ messages in thread
From: Neil Bothwick @ 2020-04-24 10:31 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 491 bytes --]
On Fri, 24 Apr 2020 10:41:24 +0200, Michele Alzetta wrote:
> ... I just hope the remote system isn't running systemd, if so, you
> have to do some additional tweaking before screen or tmux work. I know
> someone who was bitten hard by this. Apparently systemd by default
> closes all running processes of a user on logout.
I've never seen this and I regularly update systemd computers using tmux.
--
Neil Bothwick
Copy from another: plagiarism. Copy from many: research.
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-user] update remote system in background
2020-04-24 10:31 ` Neil Bothwick
@ 2020-04-24 12:06 ` Rich Freeman
2020-04-24 14:07 ` Neil Bothwick
` (2 more replies)
0 siblings, 3 replies; 11+ messages in thread
From: Rich Freeman @ 2020-04-24 12:06 UTC (permalink / raw
To: gentoo-user
On Fri, Apr 24, 2020 at 6:31 AM Neil Bothwick <neil@digimed.co.uk> wrote:
>
> On Fri, 24 Apr 2020 10:41:24 +0200, Michele Alzetta wrote:
>
> > ... I just hope the remote system isn't running systemd, if so, you
> > have to do some additional tweaking before screen or tmux work. I know
> > someone who was bitten hard by this. Apparently systemd by default
> > closes all running processes of a user on logout.
>
> I've never seen this and I regularly update systemd computers using tmux.
It is a configurable option. I can't imagine that many distros enable
it by default since it is likely to be shocking to anybody who
actually knows how to use screen, and pointless for anybody who does
not. :)
To enable it set KillUserProcesses=yes in /etc/systemd/logind.conf
If you do use it there are ways to make exceptions for particular processes.
I can certainly see how it is a useful feature to have available in
specific contexts, but obviously most people will want to have it
turned off.
--
Rich
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-user] update remote system in background
2020-04-24 12:06 ` Rich Freeman
@ 2020-04-24 14:07 ` Neil Bothwick
2020-04-24 14:16 ` John Covici
2020-04-24 14:19 ` Michele Alzetta
2 siblings, 0 replies; 11+ messages in thread
From: Neil Bothwick @ 2020-04-24 14:07 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1163 bytes --]
On Fri, 24 Apr 2020 08:06:53 -0400, Rich Freeman wrote:
> > > ... I just hope the remote system isn't running systemd, if so, you
> > > have to do some additional tweaking before screen or tmux work. I
> > > know someone who was bitten hard by this. Apparently systemd by
> > > default closes all running processes of a user on logout.
> >
> > I've never seen this and I regularly update systemd computers using
> > tmux.
>
> It is a configurable option. I can't imagine that many distros enable
> it by default since it is likely to be shocking to anybody who
> actually knows how to use screen, and pointless for anybody who does
> not. :)
>
> To enable it set KillUserProcesses=yes in /etc/systemd/logind.conf
Thanks for that, now I know which man page to check it all makes sense.
The man page does say that it defaults to off. I agree that there
wouldn't be much point in a general purpose distro overriding this default
but I can see times it would be useful.
> If you do use it there are ways to make exceptions for particular
> processes.
--
Neil Bothwick
WYTYSYDG - What you thought you saw, you didn't get.
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-user] update remote system in background
2020-04-24 12:06 ` Rich Freeman
2020-04-24 14:07 ` Neil Bothwick
@ 2020-04-24 14:16 ` John Covici
2020-04-24 14:19 ` Michele Alzetta
2 siblings, 0 replies; 11+ messages in thread
From: John Covici @ 2020-04-24 14:16 UTC (permalink / raw
To: gentoo-user
On Fri, 24 Apr 2020 08:06:53 -0400,
Rich Freeman wrote:
>
> On Fri, Apr 24, 2020 at 6:31 AM Neil Bothwick <neil@digimed.co.uk> wrote:
> >
> > On Fri, 24 Apr 2020 10:41:24 +0200, Michele Alzetta wrote:
> >
> > > ... I just hope the remote system isn't running systemd, if so, you
> > > have to do some additional tweaking before screen or tmux work. I know
> > > someone who was bitten hard by this. Apparently systemd by default
> > > closes all running processes of a user on logout.
> >
> > I've never seen this and I regularly update systemd computers using tmux.
>
> It is a configurable option. I can't imagine that many distros enable
> it by default since it is likely to be shocking to anybody who
> actually knows how to use screen, and pointless for anybody who does
> not. :)
>
> To enable it set KillUserProcesses=yes in /etc/systemd/logind.conf
>
> If you do use it there are ways to make exceptions for particular processes.
>
> I can certainly see how it is a useful feature to have available in
> specific contexts, but obviously most people will want to have it
> turned off.
Or simplest of all use the at command possibly using script as the
command line and some way to answer the do you want to emerge
... question.
--
Your life is like a penny. You're going to lose it. The question is:
How do
you spend it?
John Covici wb2una
covici@ccs.covici.com
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-user] update remote system in background
2020-04-24 12:06 ` Rich Freeman
2020-04-24 14:07 ` Neil Bothwick
2020-04-24 14:16 ` John Covici
@ 2020-04-24 14:19 ` Michele Alzetta
2 siblings, 0 replies; 11+ messages in thread
From: Michele Alzetta @ 2020-04-24 14:19 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1319 bytes --]
Yes, but when it first came out it defaulted to killing processes. This was
on a university server, so I imagine ac stable distro. As I told you, I
know someone who was bitten hard by this.
Il ven 24 apr 2020, 14:07 Rich Freeman <rich0@gentoo.org> ha scritto:
> On Fri, Apr 24, 2020 at 6:31 AM Neil Bothwick <neil@digimed.co.uk> wrote:
> >
> > On Fri, 24 Apr 2020 10:41:24 +0200, Michele Alzetta wrote:
> >
> > > ... I just hope the remote system isn't running systemd, if so, you
> > > have to do some additional tweaking before screen or tmux work. I know
> > > someone who was bitten hard by this. Apparently systemd by default
> > > closes all running processes of a user on logout.
> >
> > I've never seen this and I regularly update systemd computers using tmux.
>
> It is a configurable option. I can't imagine that many distros enable
> it by default since it is likely to be shocking to anybody who
> actually knows how to use screen, and pointless for anybody who does
> not. :)
>
> To enable it set KillUserProcesses=yes in /etc/systemd/logind.conf
>
> If you do use it there are ways to make exceptions for particular
> processes.
>
> I can certainly see how it is a useful feature to have available in
> specific contexts, but obviously most people will want to have it
> turned off.
>
> --
> Rich
>
>
[-- Attachment #2: Type: text/html, Size: 1795 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2020-04-24 14:20 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-24 7:47 [gentoo-user] update remote system in background Raffaele BELARDI
2020-04-24 7:49 ` Vladimir Romanov
2020-04-24 7:51 ` Michele Alzetta
2020-04-24 8:22 ` Raffaele BELARDI
2020-04-24 9:57 ` Robert Bridge
2020-04-24 8:41 ` Michele Alzetta
2020-04-24 10:31 ` Neil Bothwick
2020-04-24 12:06 ` Rich Freeman
2020-04-24 14:07 ` Neil Bothwick
2020-04-24 14:16 ` John Covici
2020-04-24 14:19 ` Michele Alzetta
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox