Rebooting after zypper program installation or update - a question

I am a general user, and still learning the ways of GNU/Linux. I often see statements from experienced users asserting that “rebooting in Linux [is] mostly only needed after a kernel or version change…” eg. here.

This is not my experience. After most zypper patch, installations or updates zypper ps shows many deleted running programs and services, and suggest that they be restarted. Sometimes I can do this with known programs or services but more often the list is long and I choose to reboot the system as soon as practical. Zypper help ps says: This command has no additional options.

If rebooting in Linux is mostly only needed after a kernel or version change, what is the correct way to restart the list of deleted running programs and services reported by zypper ps? Are there suitable scrips available automate the process? How do sysadmins do this when rebooting a system may not be practical for weeks?

On Wed, 14 Aug 2013 02:06:02 +0000, Tallowwood wrote:

> I am a general user, and still learning the ways of GNU/Linux. I often
> see statements from experienced users asserting that “rebooting in Linux
> [is] mostly only needed after a kernel or version change…” eg. ‘here’
> (http://tinyurl.com/md87red).

Generally, this is correct, but often times it’s just more expedient to
reboot.

> This is not my experience. After most zypper patch, installations or
> updates zypper ps shows many deleted running programs and services, and
> suggest that they be restarted. Sometimes I can do this with known
> programs or services but more often the list is long and I choose to
> reboot the system as soon as practical. Zypper help ps says: This
> command has no additional options.

Right, because zypper ps only tells you what processes were running that
were affected by the update - nothing else.

> If rebooting in Linux is mostly only needed after a kernel or version
> change, what is the correct way to restart the list of deleted running
> programs and services reported by zypper ps? Are there suitable scrips
> available automate the process? How do sysadmins do this when rebooting
> a system may not be practical for weeks?

The answer is “it depends” - which service/program/update. There’s no
really good way to automate it - for example, if a shared library is
updated that’s in use by dbus, then restarting dbus can have knock-on
effects (like killing an active desktop session). Other things - such as
an update to cupsd just requires a restart of the cups daemon.

There’s no real “catch all” answer - if you have specific services or
programs you’d like to know more about, asking a question in the support
section of these forums is a good place to start.

Jim

Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

The zypper message is perhaps a bit too scary. It usually isn’t a problem to have an older version of the program running, while there’s a newer one installed.

After a kernel update, I reboot. For other programs, it depends. With a mozilla update, I normally keep doing what I am doing, and restarting firefox when it is convenient for me.

If there is a major update to my desktop (i.e. to KDE), I will at least logout and login again. Otherwise I risk incompatibility problems between the running programs and other software on disk that they might start.

And, sometimes I just reboot because it’s easy and the system hasn’t been rebooted for a while anyway.

The main difference from Windows, is that the update is complete even without reboot. With Windows, files that are in use could not be updated. So the reboot is urgent and often at an inconvenient time with Windows, whereas with linux it is easier to postpone the reboot to a convenient time.

Thanks to hendersj and nrickert for your helpful comments. You have dispelled my doubts.

On 08/14/2013 04:06 AM, Tallowwood wrote:
> After most zypper patch, installations or
> updates zypper ps shows many deleted running programs and services, and
> suggest that they be restarted.

as the others have already said, it just depends… for example,
depending on what was installed it may just be necessary to shutdown
and restart one application (like maybe Firefox after its version was
changed)…

or, sometimes it is enough to just log out of the GUI and then log
back in (because that shuts down and then restarts the entire X
windowing system and catches lots of processes)

or, sometimes you might need to restart the networking of any of
several or services . . .

it all depends, but generally a kernel change will always require a
reboot (but, ‘they’ are working on methods to even not boot then)
while many other install actions (which would require a reboot in
non-*nix systems) will not…

my point in the referenced thread was the habit of
install-then-reboot is not a habit which must continue…


dd
http://tinyurl.com/DD-Caveat
http://tinyurl.com/DD-Complaints

But not all. The old display manager (at least in the case of kdm) keeps running.

But anyway, as already has been mentioned, it depends on your system/use case and which updates you installed… That’s why a reboot isn’t done automatically after installing updates I guess.:wink:

Use CTRL-ALT-F1 (or similar) to get to a virtual console.
Login as root.
Switch to init level 3.
Switch to init level 5.
(I used “telinit” for that switching)

and you will have restarted the display manager.

In most cases, it probably doesn’t matter whether you restart kdm. If you want to restart it, then reboot might be as east as any other way.

In case you addressed this to me:
I do know how to restart kdm (or any other display manager that may be running)… :wink:

I just wanted to point out that it keeps running even after logout. Or, more explicitely, logout/login as suggested by DenverD is not enough to restart kdm…

On 08/14/2013 05:56 PM, wolfi323 wrote:
> The old display manager (at least in the case of kdm)
> keeps running.

didn’t know that…and, thanks to nrickert on mentioning using init 3
then 5 to completely shut down all parts of X…(i should’a said that
in the first place…but log/in will usually resolve most of the
“zypper ps” thingies…


dd
http://tinyurl.com/DD-Caveat
http://tinyurl.com/DD-Complaints

On Wed, 14 Aug 2013 16:36:01 +0000, nrickert wrote:

> wolfi323;2579247 Wrote:
>> But not all. The old display manager (at least in the case of kdm)
>> keeps running.
>
> Use CTRL-ALT-F1 (or similar) to get to a virtual console.
> Login as root.
> Switch to init level 3.
> Switch to init level 5.
> (I used “telinit” for that switching)
>
> and you will have restarted the display manager.
>
> In most cases, it probably doesn’t matter whether you restart kdm. If
> you want to restart it, then reboot might be as east as any other way.

Often times, just using ctrl+alt+backspace will have the same effect.
Not always, but a lot of times - just depends on what needs to be
restarted.

Jim


Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

Yes, I thought so, that’s why I brought that up.
I didn’t know it either since about 2 years ago when I accidentally recognized this, see below.

but log/in will usually resolve most of the
“zypper ps” thingies…

“zypper ps” when run as user won’t show kdm f.e.
You have to run “sudo zypper ps” to see ALL things… :wink:

On 08/14/2013 09:26 PM, wolfi323 wrote:
> You have to run “sudo zypper ps” to see ALL things…

another good tip (that i didn’t know)…

you can stick around!! :slight_smile:

THANKS!


dd
http://tinyurl.com/DD-Caveat
http://tinyurl.com/DD-Complaints

On 2013-08-15 08:52, dd wrote:
> On 08/14/2013 09:26 PM, wolfi323 wrote:
>> You have to run “sudo zypper ps” to see ALL things…
>
> another good tip (that i didn’t know)…
>
> you can stick around!! :slight_smile:
>
> THANKS!

Another one.

After init 3, log in text mode as root, then run “zypper ps” to verify.
If there are things lurking still, and they are not things a service
restart would clear (like cups), but rather things with “bus” in them
(for example), then go one step further and switch to level one (init
1). That clears about everything, but do run again “zypper ps” to
verify. If there are remaining things, then a reboot is necessary.

In the end, a reboot might be faster if applied first thing :-p


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

Thank you all for this useful tutorial.
Thank you also for the good work you all do in the support section.
Have lots of fun.

On 08/15/2013 02:56 PM, Tallowwood wrote:
> Thank you also for the good work you all do

welcome…my first helpful post


dd

On Thu, 15 Aug 2013 11:33:06 +0000, Carlos E. R. wrote:

> If there
> are remaining things, then a reboot is necessary.

Well, a reboot may be the most expedient way to do it, but it’s not
“necessary” unless it’s a kernel need.

For the benefit of others:

Many processes can be killed and restarted. For example, if you update
openssl and have transmission-daemon running as a user, you don’t need to
reboot because transmission-daemon didn’t restart after an init 3/init 1
and then a shift back to runlevel 5. Just stop the transmission-daemon
process and restart it.

Jim

Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

On 2013-08-15 18:03, Jim Henderson wrote:
> On Thu, 15 Aug 2013 11:33:06 +0000, Carlos E. R. wrote:
>
>> If there
>> are remaining things, then a reboot is necessary.
>
> Well, a reboot may be the most expedient way to do it, but it’s not
> “necessary” unless it’s a kernel need.

Or glibc. Or certain modules that have to be restarted in precise order.
Possibly you can find out what and in what order to restart, but
“simply” rebooting may be faster and easier.


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

On Thu, 15 Aug 2013 17:33:06 +0000, Carlos E. R. wrote:

> On 2013-08-15 18:03, Jim Henderson wrote:
>> On Thu, 15 Aug 2013 11:33:06 +0000, Carlos E. R. wrote:
>>
>>> If there
>>> are remaining things, then a reboot is necessary.
>>
>> Well, a reboot may be the most expedient way to do it, but it’s not
>> “necessary” unless it’s a kernel need.
>
> Or glibc. Or certain modules that have to be restarted in precise order.
> Possibly you can find out what and in what order to restart, but
> “simply” rebooting may be faster and easier.

Yes.

Though with zypper ps, I’ve never had a situation where I couldn’t
restart processes and get things going again without a reboot (unless
there was a kernel update), but as you say, a reboot is usually faster in
those cases.

Come to think, I am pretty sure I’ve had a glibc update come through and
didn’t have to reboot. But maybe my memory’s throwing a parity error. :wink:

Jim


Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C