[opensuse] Best practices restarting services shown via zypper ps
Hi there, maybe I asked in the past I dont even remember. Zypper ps shows zypper ps The following running processes use deleted files: PID | PPID | UID | User | Command | Service | Files -----+------+-----+------------+--------------------------+----------------+------------------------------------------ 405 | 1 | 0 | root | lvmetad | lvm2-lvmetad | /usr/lib64/libudev.so.1.6.6 764 | 1 | 0 | root | cupsd | cups | /usr/lib64/libsystemd.so.0.19.0 774 | 1 | 468 | avahi | avahi-daemon | avahi-daemon | /usr/lib64/libsystemd.so.0.19.0 777 | 1 | 499 | messagebus | dbus-daemon | dbus | /usr/lib64/libsystemd.so.0.19.0 874 | 1 | 0 | root | wickedd-dhcp4 | wickedd-dhcp4 | /usr/lib64/libsystemd.so.0.19.0 875 | 1 | 0 | root | wickedd-auto4 | wickedd-auto4 | /usr/lib64/libsystemd.so.0.19.0 876 | 1 | 0 | root | python3.6 | firewalld | /usr/lib64/libsystemd.so.0.19.0 ...... Many of the services seem to be restartable. Wondering about firewalld though, as one of the problems to restart. ------- systemctl restart firewalld Failed to restart firewalld.service: Transaction contains conflicting jobs 'restart' and 'stop' for fail2ban.service. Probably contradicting requirement dependencies configured. See system logs and 'systemctl status firewalld.service' for details. ------- systemctl status firewalld.service ● firewalld.service - firewalld - dynamic firewall daemon Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: disabled) Active: active (running) since Thu 2018-11-08 11:48:36 CET; 1 weeks 5 days ago Docs: man:firewalld(1) Main PID: 876 (firewalld) Tasks: 2 (limit: 4915) --------- Firewalld not restarting. What is the best practices in general to restart stuff that becomes replaced or obsoleted or changed its files when updating packages? Is there any best practices? Linux feels more and more like windows to me. Needing way too many reboots :( Thanks for hints. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 20/11/2018 17.15, cagsm wrote:
Hi there,
maybe I asked in the past I dont even remember. Zypper ps shows
zypper ps The following running processes use deleted files:
PID | PPID | UID | User | Command | Service | Files -----+------+-----+------------+--------------------------+----------------+------------------------------------------ 405 | 1 | 0 | root | lvmetad | lvm2-lvmetad | /usr/lib64/libudev.so.1.6.6 764 | 1 | 0 | root | cupsd | cups | /usr/lib64/libsystemd.so.0.19.0 774 | 1 | 468 | avahi | avahi-daemon | avahi-daemon | /usr/lib64/libsystemd.so.0.19.0 777 | 1 | 499 | messagebus | dbus-daemon | dbus | /usr/lib64/libsystemd.so.0.19.0 874 | 1 | 0 | root | wickedd-dhcp4 | wickedd-dhcp4 | /usr/lib64/libsystemd.so.0.19.0 875 | 1 | 0 | root | wickedd-auto4 | wickedd-auto4 | /usr/lib64/libsystemd.so.0.19.0 876 | 1 | 0 | root | python3.6 | firewalld | /usr/lib64/libsystemd.so.0.19.0 ......
Many of the services seem to be restartable. Wondering about firewalld though, as one of the problems to restart. -------
systemctl restart firewalld Failed to restart firewalld.service: Transaction contains conflicting jobs 'restart' and 'stop' for fail2ban.service. Probably contradicting requirement dependencies configured. See system logs and 'systemctl status firewalld.service' for details.
-------
That must be a bug. Try stop, next start.
systemctl status firewalld.service ● firewalld.service - firewalld - dynamic firewall daemon Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: disabled) Active: active (running) since Thu 2018-11-08 11:48:36 CET; 1 weeks 5 days ago Docs: man:firewalld(1) Main PID: 876 (firewalld) Tasks: 2 (limit: 4915) ---------
Firewalld not restarting. What is the best practices in general to restart stuff that becomes replaced or obsoleted or changed its files when updating packages? Is there any best practices? Linux feels more and more like windows to me. Needing way too many reboots :(
Thanks for hints.
Reboot >:-) Seriously, with your list above, I reboot. -- Cheers / Saludos, Carlos E. R. (from openSUSE 15.0 (Legolas))
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 20/11/2018 18:26, Carlos E. R. wrote:
Seriously, with your list above, I reboot.
Agreed. Software vulnerabilities are a growing problem. That means fixes are a growing problem, too. It is unfortunate that in the 1990s we had PC operating systems that crashed so often that keeping it running and getting an "uptime" of several days was an achievement. Now, it's easy, but we need to reboot on a near-daily basis for all the patches to work... - -- Liam Proven - Technical Writer, SUSE Linux s.r.o. Corso II, Křižíkova 148/34, 186-00 Praha 8 - Karlín, Czechia Email: lproven@suse.com - Office telephone: +420 284 241 084 -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEeNZxWlZYyNg7I0pvkm4MJhv0VBYFAlv0Y/sACgkQkm4MJhv0 VBZ0WxAAh5XIX2jMtnrglxH4K2k+7s9czGpjrHGfNax8AKbSPuipeh2SCDUnflFy zmxUl56iV9BQW8PMiFDGNrnYoedRbLq4p2H5TSDoxz0UXFX7q8nVNFXSYSDTQ9EQ idMDkyQXrONeN1h1vjPNszk0c0Afuelyp2uRo+CXVloIRgQOIIlZEV0HH3eClH2+ NTwj+s0nrFLCUk9sXAJhmXczmjq+Dg0yZbHXFwRuIRTSbojuweMB3dsyY7XqC/ZB Thq9EL8jmoVpPn7dx7rtfnTajDKQSjlAvrF5DD4PUzd+sO0daEquQnHJ6QYC2iAL AVPEGE6UmOFIa6oOVi/swL0Bj1iKLg4vU9Y9/I/b+VVShS6cNkugBF5tehq/4A5+ C4VQFPD1cO85UjaBGCqVCYeq75PGQJgZ4YCwr91VhnMUy+PAvJlG+lYFDVJNnj0z BW4maoiwU6IUq9OuG9bf6OK/FxMAa9dN0VDq541z/vrUEcy6u9d8ZLK/Uin50v92 l6iNyOD721Yo9tlTV2VZKQFP4Pfuwt6wfjmKJeVwZ2gB2ZJbJ7HF6g69PoztvCjm HG1WiJBEH+hNHHm1yB5Ruw/+t9xYkuYpz8f4aLm+Pfuqk36E6mGsx3jbob78EjWV eh5hLIUYF5Vfxljj5NTWg79fwADlfREf8X17TTfZLLOq6UHDS7M= =JQRZ -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
In my experience, restarting dbus leads to weirdly broken system. I can't how remember exactly, because I stopped doing this long time ago. Just some parts of the system are not talking to each other anymore. Adam Mizerski W dniu 20.11.2018 o 17:15, cagsm pisze:
777 | 1 | 499 | messagebus | dbus-daemon | dbus | /usr/lib64/libsystemd.so.0.19.0
On 21/11/2018 23.21, Adam Mizerski wrote:
In my experience, restarting dbus leads to weirdly broken system. I can't how remember exactly, because I stopped doing this long time ago. Just some parts of the system are not talking to each other anymore.
Yes. That's the main reason I recommended to reboot in this case. There are other services that make me reboot, like systemd. In this case it is a systemd library, some of the affected services might be restarted. But I never had luck restarting dbus. -- Cheers / Saludos, Carlos E. R. (from 42.3 x86_64 "Malachite" at Telcontar)
On 11/21/18 5:29 PM, Carlos E. R. wrote:
On 21/11/2018 23.21, Adam Mizerski wrote:
In my experience, restarting dbus leads to weirdly broken system. I can't how remember exactly, because I stopped doing this long time ago. Just some parts of the system are not talking to each other anymore.
Yes. That's the main reason I recommended to reboot in this case. There are other services that make me reboot, like systemd. In this case it is a systemd library, some of the affected services might be restarted. But I never had luck restarting dbus.
My best practice is to reboot if any of the processes returned by 'zypper ps' are owned by root. Otherwise I just logout/in. -- Ken Schneider SuSe since Version 5.2, June 1998 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Ken Schneider - openSUSE wrote:
On 11/21/18 5:29 PM, Carlos E. R. wrote:
On 21/11/2018 23.21, Adam Mizerski wrote:
In my experience, restarting dbus leads to weirdly broken system. I can't how remember exactly, because I stopped doing this long time ago. Just some parts of the system are not talking to each other anymore.
Yes. That's the main reason I recommended to reboot in this case. There are other services that make me reboot, like systemd. In this case it is a systemd library, some of the affected services might be restarted. But I never had luck restarting dbus.
My best practice is to reboot if any of the processes returned by 'zypper ps' are owned by root. Otherwise I just logout/in.
If I log out I might as well reboot. Main reason not to reboot is to keep my session alive ;^> dbus also used to be the main reason/only for reboots. Or if it's really WAY too many because you have to restart them by hand, one after the other. Given the high update frequency of especially TW, a convenient way of restarting with a single command would indeed be highly welcome... -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 22/11/2018 13.37, Peter Suetterlin wrote:
Ken Schneider - openSUSE wrote:
On 11/21/18 5:29 PM, Carlos E. R. wrote:
On 21/11/2018 23.21, Adam Mizerski wrote:
In my experience, restarting dbus leads to weirdly broken system. I can't how remember exactly, because I stopped doing this long time ago. Just some parts of the system are not talking to each other anymore.
Yes. That's the main reason I recommended to reboot in this case. There are other services that make me reboot, like systemd. In this case it is a systemd library, some of the affected services might be restarted. But I never had luck restarting dbus.
My best practice is to reboot if any of the processes returned by 'zypper ps' are owned by root. Otherwise I just logout/in.
Many services are easy to restart. Example: systemctl restart cups
If I log out I might as well reboot. Main reason not to reboot is to keep my session alive ;^>
dbus also used to be the main reason/only for reboots. Or if it's really WAY too many because you have to restart them by hand, one after the other. Given the high update frequency of especially TW, a convenient way of restarting with a single command would indeed be highly welcome...
Issue "reboot" as root :-) However, if you have a graphical session running, it will exit without a chance to save things. Possibly not even the session status itself will not be saved. But on some session you can click on exit and reboot. -- Cheers / Saludos, Carlos E. R. (from openSUSE 15.0 (Legolas))
On 22/11/18 07:51 AM, Carlos E. R. wrote:
On 22/11/2018 13.37, Peter Suetterlin wrote:
Many services are easy to restart. Example:
systemctl restart cups
*sigh* 'step and repeat" manually ! Oh Bother! to quote Pooh Bear. A shell script to take the output of 'zypper ps' and strip relevant fields and prognosticate what the 'service' should be is not trivial.
If I log out I might as well reboot. Main reason not to reboot is to keep my session alive ;^>
Yes, there is that. The problem arises when too many of the libraries that are updated by the 'zypper up' are part of KDE, Thunderbird of Firefox. Or other applications that tu might be using. ESPECIALLY the other applications! Well, OK, Firefox can restore context pretty well ...
Or if it's really WAY too many because you have to restart them by hand, one after the other.
Step and repeat, repeat, repeat. Where's that script when I need it? Why can't I just issue a blanket 'update what needs to be updated'? Oh, wait! Yes, you CAN 'systemctl restart' more than one at a time, but you can also .. But ... what does the 'daemon-reexec' option do in this context? Perhaps I'll experiment with that next time around. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Anton Aylward wrote:
A shell script to take the output of 'zypper ps' and strip relevant fields and prognosticate what the 'service' should be is not trivial.
Indeed, even more as 'zypper ps' somethimes doesn't even report the service.
Oh, wait!
Yes, you CAN 'systemctl restart' more than one at a time, but you can also ..
Oh - never even tried that. So that *is* an improvement, at least for me :) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 27/11/2018 09.45, Peter Suetterlin wrote:
Anton Aylward wrote:
A shell script to take the output of 'zypper ps' and strip relevant fields and prognosticate what the 'service' should be is not trivial.
Indeed, even more as 'zypper ps' somethimes doesn't even report the service.
Oh, wait!
Yes, you CAN 'systemctl restart' more than one at a time, but you can also ..
Oh - never even tried that. So that *is* an improvement, at least for me :)
Me neither, I was not aware of it. -- Cheers / Saludos, Carlos E. R. (from 42.3 x86_64 "Malachite" at Telcontar)
On 27/11/18 04:57 AM, Carlos E. R. wrote:
On 27/11/2018 09.45, Peter Suetterlin wrote:
Anton Aylward wrote:
Yes, you CAN 'systemctl restart' more than one at a time, but you can also ..
Oh - never even tried that. So that *is* an improvement, at least for me :)
Me neither, I was not aware of it.
I guess that at times I am a bit more of a RTFM person. What I'm trying to figure out is how do do the 'restart [pattern]' thing. Perhaps daemon-reexec Reexecute the systemd manager. ... This command is of little use except for debugging and package upgrades. Does that mean other packages? -- A: Yes. > Q: Are you sure? >> A: Because it reverses the logical flow of conversation. >>> Q: Why is top posting frowned upon? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
* Peter Suetterlin <pit@astro.su.se> [11-27-18 03:47]:
Anton Aylward wrote:
A shell script to take the output of 'zypper ps' and strip relevant fields and prognosticate what the 'service' should be is not trivial.
Indeed, even more as 'zypper ps' somethimes doesn't even report the service.
Oh, wait!
Yes, you CAN 'systemctl restart' more than one at a time, but you can also ..
Oh - never even tried that. So that *is* an improvement, at least for me :)
alias zps='zypper ps -s' alias zpss='zypper ps -ss' psfind #!/bin/bash # quickly find ps for an application # Loop until all parameters are used up echo "USER PID %CPU %MEM VSZ RSS TTY STAT START TIME # COMMAND" while [ "$1" != "" ]; do ps -A auf |grep -i $1 |grep -v grep|grep -v psfind shift # Shift all the parameters down by one done done -- (paka)Patrick Shanahan Plainfield, Indiana, USA @ptilopteri http://en.opensuse.org openSUSE Community Member facebook/ptilopteri Registered Linux User #207535 @ http://linuxcounter.net Photos: http://wahoo.no-ip.org/piwigo paka @ IRCnet freenode -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Hi, Am Freitag, 23. November 2018, 13:18:47 CET schrieb Anton Aylward:
On 22/11/18 07:51 AM, Carlos E. R. wrote:
On 22/11/2018 13.37, Peter Suetterlin wrote:
Many services are easy to restart. Example:
systemctl restart cups
*sigh* 'step and repeat" manually ! Oh Bother! to quote Pooh Bear.
A shell script to take the output of 'zypper ps' and strip relevant fields and prognosticate what the 'service' should be is not trivial.
And it is not required at all. As ` zypper ps -help` will tell you, you can get a list of systemd units to restart by running `zypper ps -sss`. And you won't even have to loop if you utilize xargs: zypper ps -sss | xargs systemd restart Still, once systemd or the kernel is in the list of upgraded packages, you won't reasonably be able to escape a restart. Have fun, Matthias -- Dr. Matthias Bach www.marix.org „Der einzige Weg, die Grenzen des Möglichen zu finden, ist ein klein wenig über diese hinaus in das Unmögliche vorzustoßen.“ - Arthur C. Clarke
On 27/11/2018 21.53, Matthias Bach wrote:
Hi,
Am Freitag, 23. November 2018, 13:18:47 CET schrieb Anton Aylward:
On 22/11/18 07:51 AM, Carlos E. R. wrote:
On 22/11/2018 13.37, Peter Suetterlin wrote:
Many services are easy to restart. Example:
systemctl restart cups
*sigh* 'step and repeat" manually ! Oh Bother! to quote Pooh Bear.
A shell script to take the output of 'zypper ps' and strip relevant fields and prognosticate what the 'service' should be is not trivial.
And it is not required at all. As ` zypper ps -help` will tell you, you can get a list of systemd units to restart by running `zypper ps -sss`.
Wow, that's new! :-))
And you won't even have to loop if you utilize xargs:
zypper ps -sss | xargs systemd restart
I get "Excess arguments" :-?
Still, once systemd or the kernel is in the list of upgraded packages, you won't reasonably be able to escape a restart.
I just have one updated system where I can play with that :-) There are 22 services to restart, it says. -- Cheers / Saludos, Carlos E. R. (from 42.3 x86_64 "Malachite" at Telcontar)
* Carlos E. R. <robin.listas@telefonica.net> [11-27-18 16:17]:
On 27/11/2018 21.53, Matthias Bach wrote:
Hi,
Am Freitag, 23. November 2018, 13:18:47 CET schrieb Anton Aylward:
On 22/11/18 07:51 AM, Carlos E. R. wrote:
On 22/11/2018 13.37, Peter Suetterlin wrote:
Many services are easy to restart. Example:
systemctl restart cups
*sigh* 'step and repeat" manually ! Oh Bother! to quote Pooh Bear.
A shell script to take the output of 'zypper ps' and strip relevant fields and prognosticate what the 'service' should be is not trivial.
And it is not required at all. As ` zypper ps -help` will tell you, you can get a list of systemd units to restart by running `zypper ps -sss`.
Wow, that's new! :-))
And you won't even have to loop if you utilize xargs:
zypper ps -sss | xargs systemd restart
I get "Excess arguments" :-?
Still, once systemd or the kernel is in the list of upgraded packages, you won't reasonably be able to escape a restart.
I just have one updated system where I can play with that :-)
There are 22 services to restart, it says.
and if dbus/messagebus is one or more, you *really* need to reboot rather than restart subject processes or you will experience problems you do not want. -- (paka)Patrick Shanahan Plainfield, Indiana, USA @ptilopteri http://en.opensuse.org openSUSE Community Member facebook/ptilopteri Registered Linux User #207535 @ http://linuxcounter.net Photos: http://wahoo.no-ip.org/piwigo paka @ IRCnet freenode -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 28/11/2018 01.27, Patrick Shanahan wrote:
* Carlos E. R. <> [11-27-18 16:17]:
On 27/11/2018 21.53, Matthias Bach wrote:
Hi,
Am Freitag, 23. November 2018, 13:18:47 CET schrieb Anton Aylward:
On 22/11/18 07:51 AM, Carlos E. R. wrote:
On 22/11/2018 13.37, Peter Suetterlin wrote:
Many services are easy to restart. Example:
systemctl restart cups
*sigh* 'step and repeat" manually ! Oh Bother! to quote Pooh Bear.
A shell script to take the output of 'zypper ps' and strip relevant fields and prognosticate what the 'service' should be is not trivial.
And it is not required at all. As ` zypper ps -help` will tell you, you can get a list of systemd units to restart by running `zypper ps -sss`.
Wow, that's new! :-))
And you won't even have to loop if you utilize xargs:
zypper ps -sss | xargs systemd restart
I get "Excess arguments" :-?
Still, once systemd or the kernel is in the list of upgraded packages, you won't reasonably be able to escape a restart.
I just have one updated system where I can play with that :-)
There are 22 services to restart, it says.
and if dbus/messagebus is one or more, you *really* need to reboot rather than restart subject processes or you will experience problems you do not want.
I know. Yes, dbus is in the list. I still want to try that concoction :-) The machine is kept running till I know what to enter there and try, or why the command failed. -- Cheers / Saludos, Carlos E. R. (from 42.3 x86_64 "Malachite" at Telcontar)
* Carlos E. R. <robin.listas@telefonica.net> [11-27-18 21:08]:
On 28/11/2018 01.27, Patrick Shanahan wrote:
* Carlos E. R. <> [11-27-18 16:17]:
On 27/11/2018 21.53, Matthias Bach wrote:
Hi,
Am Freitag, 23. November 2018, 13:18:47 CET schrieb Anton Aylward:
On 22/11/18 07:51 AM, Carlos E. R. wrote:
On 22/11/2018 13.37, Peter Suetterlin wrote:
Many services are easy to restart. Example:
systemctl restart cups
*sigh* 'step and repeat" manually ! Oh Bother! to quote Pooh Bear.
A shell script to take the output of 'zypper ps' and strip relevant fields and prognosticate what the 'service' should be is not trivial.
And it is not required at all. As ` zypper ps -help` will tell you, you can get a list of systemd units to restart by running `zypper ps -sss`.
Wow, that's new! :-))
And you won't even have to loop if you utilize xargs:
zypper ps -sss | xargs systemd restart
I get "Excess arguments" :-?
Still, once systemd or the kernel is in the list of upgraded packages, you won't reasonably be able to escape a restart.
I just have one updated system where I can play with that :-)
There are 22 services to restart, it says.
and if dbus/messagebus is one or more, you *really* need to reboot rather than restart subject processes or you will experience problems you do not want.
I know. Yes, dbus is in the list. I still want to try that concoction :-)
The machine is kept running till I know what to enter there and try, or why the command failed.
don't have any idea which "command failed", you don't say. but if you restart dbus, which I don't believe you can, you can bork your system, as I was advised about two years ago by one of the main openSUSE developers. you choose your own poizen -- (paka)Patrick Shanahan Plainfield, Indiana, USA @ptilopteri http://en.opensuse.org openSUSE Community Member facebook/ptilopteri Registered Linux User #207535 @ http://linuxcounter.net Photos: http://wahoo.no-ip.org/piwigo paka @ IRCnet freenode -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Just my 5c: On 28/11/2018 03.28, Patrick Shanahan wrote:
don't have any idea which "command failed", you don't say. but if you restart dbus, which I don't believe you can, you can bork your system, as I was advised about two years ago by one of the main openSUSE developers.
you choose your own poizen
I'll take that poizen :-) I run several servers and I cant remember ever to have had any problems following a restart of all services including dbus. It might be true on a Desktop, but on dont think it is the case on a server. -- Regards Klaus -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 28/11/2018 03.28, Patrick Shanahan wrote:
* Carlos E. R. <robin.listas@telefonica.net> [11-27-18 21:08]:
On 28/11/2018 01.27, Patrick Shanahan wrote:
* Carlos E. R. <> [11-27-18 16:17]:
On 27/11/2018 21.53, Matthias Bach wrote:
Hi,
Am Freitag, 23. November 2018, 13:18:47 CET schrieb Anton Aylward:
On 22/11/18 07:51 AM, Carlos E. R. wrote: > On 22/11/2018 13.37, Peter Suetterlin wrote: > > Many services are easy to restart. Example: > > systemctl restart cups
*sigh* 'step and repeat" manually ! Oh Bother! to quote Pooh Bear.
A shell script to take the output of 'zypper ps' and strip relevant fields and prognosticate what the 'service' should be is not trivial.
And it is not required at all. As ` zypper ps -help` will tell you, you can get a list of systemd units to restart by running `zypper ps -sss`.
Wow, that's new! :-))
And you won't even have to loop if you utilize xargs:
zypper ps -sss | xargs systemd restart
I get "Excess arguments" :-?
Still, once systemd or the kernel is in the list of upgraded packages, you won't reasonably be able to escape a restart.
I just have one updated system where I can play with that :-)
There are 22 services to restart, it says.
and if dbus/messagebus is one or more, you *really* need to reboot rather than restart subject processes or you will experience problems you do not want.
I know. Yes, dbus is in the list. I still want to try that concoction :-)
The machine is kept running till I know what to enter there and try, or why the command failed.
don't have any idea which "command failed", you don't say.
I did say. It is above in the quotes. # zypper ps -sss | xargs systemd restart Excess arguments.
but if you restart dbus, which I don't believe you can, you can bork your system, as I was advised about two years ago by one of the main openSUSE developers.
I know that the system will crash. So? -- Cheers / Saludos, Carlos E. R. (from 42.3 x86_64 "Malachite" at Telcontar)
* Carlos E. R. <robin.listas@telefonica.net> [11-28-18 06:52]:
On 28/11/2018 03.28, Patrick Shanahan wrote:
* Carlos E. R. <robin.listas@telefonica.net> [11-27-18 21:08]:
On 28/11/2018 01.27, Patrick Shanahan wrote:
* Carlos E. R. <> [11-27-18 16:17]:
On 27/11/2018 21.53, Matthias Bach wrote:
Hi,
Am Freitag, 23. November 2018, 13:18:47 CET schrieb Anton Aylward: > On 22/11/18 07:51 AM, Carlos E. R. wrote: >> On 22/11/2018 13.37, Peter Suetterlin wrote: >> >> Many services are easy to restart. Example: >> >> systemctl restart cups > > *sigh* 'step and repeat" manually ! Oh Bother! to quote Pooh Bear. > > A shell script to take the output of 'zypper ps' and strip relevant fields > and prognosticate what the 'service' should be is not trivial.
And it is not required at all. As ` zypper ps -help` will tell you, you can get a list of systemd units to restart by running `zypper ps -sss`.
Wow, that's new! :-))
And you won't even have to loop if you utilize xargs:
zypper ps -sss | xargs systemd restart
I get "Excess arguments" :-?
Still, once systemd or the kernel is in the list of upgraded packages, you won't reasonably be able to escape a restart.
I just have one updated system where I can play with that :-)
There are 22 services to restart, it says.
and if dbus/messagebus is one or more, you *really* need to reboot rather than restart subject processes or you will experience problems you do not want.
I know. Yes, dbus is in the list. I still want to try that concoction :-)
The machine is kept running till I know what to enter there and try, or why the command failed.
don't have any idea which "command failed", you don't say.
I did say. It is above in the quotes.
# zypper ps -sss | xargs systemd restart Excess arguments.
but if you restart dbus, which I don't believe you can, you can bork your system, as I was advised about two years ago by one of the main openSUSE developers.
I know that the system will crash. So?
so if you are going to have to reboot anyway, why waste the time restarting old app instances. either reboot or live with the old instances until you have the opportunity to reboot. -- (paka)Patrick Shanahan Plainfield, Indiana, USA @ptilopteri http://en.opensuse.org openSUSE Community Member facebook/ptilopteri Registered Linux User #207535 @ http://linuxcounter.net Photos: http://wahoo.no-ip.org/piwigo paka @ IRCnet freenode -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 28/11/2018 14.05, Patrick Shanahan wrote:
* Carlos E. R. <> [11-28-18 06:52]:
On 28/11/2018 03.28, Patrick Shanahan wrote:
* Carlos E. R. <> [11-27-18 21:08]:
On 28/11/2018 01.27, Patrick Shanahan wrote:
* Carlos E. R. <> [11-27-18 16:17]:
On 27/11/2018 21.53, Matthias Bach wrote: > Hi, > > Am Freitag, 23. November 2018, 13:18:47 CET schrieb Anton Aylward: >> On 22/11/18 07:51 AM, Carlos E. R. wrote: >>> On 22/11/2018 13.37, Peter Suetterlin wrote: >>> >>> Many services are easy to restart. Example: >>> >>> systemctl restart cups >> >> *sigh* 'step and repeat" manually ! Oh Bother! to quote Pooh Bear. >> >> A shell script to take the output of 'zypper ps' and strip relevant fields >> and prognosticate what the 'service' should be is not trivial. > > And it is not required at all. As ` zypper ps -help` will tell you, you can > get a list of systemd units to restart by running `zypper ps -sss`.
Wow, that's new! :-))
> And you > won't even have to loop if you utilize xargs: > > zypper ps -sss | xargs systemd restart
I get "Excess arguments" :-?
> > Still, once systemd or the kernel is in the list of upgraded packages, you > won't reasonably be able to escape a restart.
I just have one updated system where I can play with that :-)
There are 22 services to restart, it says.
and if dbus/messagebus is one or more, you *really* need to reboot rather than restart subject processes or you will experience problems you do not want.
I know. Yes, dbus is in the list. I still want to try that concoction :-)
The machine is kept running till I know what to enter there and try, or why the command failed.
don't have any idea which "command failed", you don't say.
I did say. It is above in the quotes.
# zypper ps -sss | xargs systemd restart Excess arguments.
but if you restart dbus, which I don't believe you can, you can bork your system, as I was advised about two years ago by one of the main openSUSE developers.
I know that the system will crash. So?
so if you are going to have to reboot anyway, why waste the time restarting old app instances. either reboot or live with the old instances until you have the opportunity to reboot.
Sigh. Because I want to experiment the command concoction provided by Matthias Bach. Isn't that obvious? -- Cheers / Saludos, Carlos E. R. (from 42.3 x86_64 "Malachite" at Telcontar)
On 28/11/2018 14:05, Patrick Shanahan wrote:
so if you are going to have to reboot anyway, why waste the time restarting old app instances. either reboot or live with the old instances until you have the opportunity to reboot.
Can confirm. This is what I do. ``zypper ps -s'' makes me wonder how many orphaned processes I used to have lying around on my Ubuntu boxen. Ubuntu is fairly good at telling you "you _need_ to reboot now". I normally try to do a big update before I shut down, so it's ready to go next time. Of course now that I run Tumbleweed I get a lot more updates, so the daily cycle is boot, update, reboot, work. -- Liam Proven - Technical Writer, SUSE Linux s.r.o. Corso II, Křižíkova 148/34, 186-00 Praha 8 - Karlín, Czechia Email: lproven@suse.com - Office telephone: +420 284 241 084 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
* Liam Proven <lproven@suse.cz> [11-28-18 09:18]:
On 28/11/2018 14:05, Patrick Shanahan wrote:
so if you are going to have to reboot anyway, why waste the time restarting old app instances. either reboot or live with the old instances until you have the opportunity to reboot.
Can confirm. This is what I do.
``zypper ps -s'' makes me wonder how many orphaned processes I used to have lying around on my Ubuntu boxen. Ubuntu is fairly good at telling you "you _need_ to reboot now". I normally try to do a big update before I shut down, so it's ready to go next time.
Of course now that I run Tumbleweed I get a lot more updates, so the daily cycle is boot, update, reboot, work.
I reboot mostly for only two instances and then "only when I have opportunity or feel like it", new kernel or dbus/messagebus ... I have rarely encountered a situation where this presented a problem in quite some years utilizing Tumbleweed or it's predecessor. singular processes/apps such as darktable, I usually restart but such as dolphin, gapcmon, ocular, ... I just live with. and I usually run zypper dup twice a day (just cause I can). -- (paka)Patrick Shanahan Plainfield, Indiana, USA @ptilopteri http://en.opensuse.org openSUSE Community Member facebook/ptilopteri Registered Linux User #207535 @ http://linuxcounter.net Photos: http://wahoo.no-ip.org/piwigo paka @ IRCnet freenode -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Tue, 27 Nov 2018 22:16:00 +0100 "Carlos E. R." <robin.listas@telefonica.net> wrote:
On 27/11/2018 21.53, Matthias Bach wrote:
Hi,
Am Freitag, 23. November 2018, 13:18:47 CET schrieb Anton Aylward:
On 22/11/18 07:51 AM, Carlos E. R. wrote:
On 22/11/2018 13.37, Peter Suetterlin wrote:
Many services are easy to restart. Example:
systemctl restart cups
*sigh* 'step and repeat" manually ! Oh Bother! to quote Pooh Bear.
A shell script to take the output of 'zypper ps' and strip relevant fields and prognosticate what the 'service' should be is not trivial.
And it is not required at all. As ` zypper ps -help` will tell you,
Well no, that says: # zypper ps -help Unknown option 'e' Unknown option 'l' Unknown option 'p' On the other hand, this does work: # zypper ps --help
you can get a list of systemd units to restart by running `zypper ps -sss`.
Wow, that's new! :-))
And you won't even have to loop if you utilize xargs:
zypper ps -sss | xargs systemd restart
I get "Excess arguments" :-?
I think it should be, for example: # zypper ps -sss | xargs systemctl status but the --print option is probably more interesting -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 28/11/2018 03.41, Dave Howorth wrote:
On Tue, 27 Nov 2018 22:16:00 +0100 "Carlos E. R." <> wrote:
On 27/11/2018 21.53, Matthias Bach wrote:
Am Freitag, 23. November 2018, 13:18:47 CET schrieb Anton Aylward:
On 22/11/18 07:51 AM, Carlos E. R. wrote:
On 22/11/2018 13.37, Peter Suetterlin wrote:
...
And you won't even have to loop if you utilize xargs:
zypper ps -sss | xargs systemd restart
I get "Excess arguments" :-?
I think it should be, for example:
# zypper ps -sss | xargs systemctl status
but the --print option is probably more interesting
373 lines of statuses. But it is restart I want to do, and it fails. Interestingly, if done over an ssh connection, it works: Legolas:~ # zypper ps -sss | xargs systemctl restart Failed to restart dbus.service: Operation refused, unit dbus.service may be requested by dependency only (it is configured to refuse manual start/stop). See system logs and 'systemctl status dbus.service' for details. Legolas:~ # And the X session on the machine crashed. Well, now I'll reboot the machine. -- Cheers / Saludos, Carlos E. R. (from 42.3 x86_64 "Malachite" at Telcontar)
Hi, Am Dienstag, 27. November 2018, 22:16:00 CET schrieb Carlos E. R.:
And it is not required at all. As ` zypper ps -help` will tell you, you can get a list of systemd units to restart by running `zypper ps -sss`.
Wow, that's new! :-))
And you
won't even have to loop if you utilize xargs: zypper ps -sss | xargs systemd restart
I get "Excess arguments" :-?
That's what happens if you type from memory because you don't happen to have a system with pending updates lying around to verify. A nasty typo snuck in. It has to be `systemctl` not `systemd`. Thus, the command is actually: zypper ps -sss | xargs systemctl restart I actually had to boot a VM to figure this out though. That's how tricky that typo is. BTW: I usually run a slightly more verbose version of that command: zypper ps -sss | xargs --no-run-if-empty --interactive systemctl restart And one more treat: If you are on an older system that doesn't have `-sss` you might want to utilize `zypper ps --print '%s'` instead. AFAIR that variant has been around somewhat longer than the tripple-s one. Have fun, Matthias -- Dr. Matthias Bach www.marix.org „Der einzige Weg, die Grenzen des Möglichen zu finden, ist ein klein wenig über diese hinaus in das Unmögliche vorzustoßen.“ - Arthur C. Clarke
On 29/11/2018 21.44, Matthias Bach wrote:
Hi,
Am Dienstag, 27. November 2018, 22:16:00 CET schrieb Carlos E. R.:
And it is not required at all. As ` zypper ps -help` will tell you, you can get a list of systemd units to restart by running `zypper ps -sss`.
Wow, that's new! :-))
And you
won't even have to loop if you utilize xargs: zypper ps -sss | xargs systemd restart
I get "Excess arguments" :-?
That's what happens if you type from memory because you don't happen to have a system with pending updates lying around to verify. A nasty typo snuck in. It has to be `systemctl` not `systemd`. Thus, the command is actually:
zypper ps -sss | xargs systemctl restart
Oh!
I actually had to boot a VM to figure this out though. That's how tricky that typo is.
Thanks. Looking at my command log, I see that I tried both concoctions: zypper ps -sss | xargs systemd restart zypper ps -sss | xargs systemctl restart Dave Howorth wrote it correctly and I copy pasted from his email to the ssh session, so it worked. I did not notice the typo, and as the graphical session had died and I could no longer check the xterminal.
BTW: I usually run a slightly more verbose version of that command:
zypper ps -sss | xargs --no-run-if-empty --interactive systemctl restart
I'll try that next time :-) Today there is an update, but no services are affected: Legolas:~ # zypper ps The following running processes use deleted files: PID | PPID | UID | User | Command | Service | Files -----+------+-----+------+--------------------+---------+---------------------------- 1603 | 1510 | 459 | gdm | Xwayland (deleted) | | /usr/bin/Xwayland (deleted) You may wish to restart these processes. See 'man zypper' for information about the meaning of values in the above table. Legolas:~ # zypper ps -sss Legolas:~ # So: Legolas:~ # init 3 Legolas:~ # zypper ps -sss Legolas:~ # zypper ps No processes using deleted files found. Legolas:~ # init 5 Legolas:~ # Of course, I did that because that machine is not currently running a graphical session, I'm accessing it via ssh.
And one more treat: If you are on an older system that doesn't have `-sss` you might want to utilize `zypper ps --print '%s'` instead. AFAIR that variant has been around somewhat longer than the tripple-s one.
Thanks. This system is on 42.3 but I hope it will not be for long. -- Cheers / Saludos, Carlos E. R. (from 42.3 x86_64 "Malachite" at Telcontar)
Отправлено с iPhone
28 нояб. 2018 г., в 1:53, Matthias Bach <marix@marix.org> написал(а):
Still, once systemd or the kernel is in the list of upgraded packages, you won't reasonably be able to escape a restart.
systemctl daemon-reexec It is true that various other daemons that are part of systemd software collection need to be restarted separately. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (13)
-
Adam Mizerski
-
Andrei Borzenkov
-
Anton Aylward
-
cagsm
-
Carlos E. R.
-
Carlos E. R.
-
Dave Howorth
-
Ken Schneider - openSUSE
-
Klaus Vink Slott
-
Liam Proven
-
Matthias Bach
-
Patrick Shanahan
-
Peter Suetterlin