zypper ps puzzle

I just ran a zypper patch, and then logged out of KDE and logged back
in. I noticed that if I check zypper ps as root, I still have some
processes that need to be deleted or restarted:


# zypper ps
The following running processes use deleted files:

PID  | PPID | UID | Login | Command          | Service | Files

-----+------+-----+-------+------------------+---------+-------------------------------
322  | 1    | 0   | root  | systemd-journald |         |
/usr/lib64/libgcrypt.so.11.7.0
754  | 1    | 0   | root  | gmain            |         |
/usr/lib64/libxml2.so.2.9.0
831  | 1    | 0   | root  | kdm              |         | /usr/bin/kdm
(deleted)
1129 | 831  | 0   | root  | kdm              |         | /usr/bin/kdm
(deleted)
1372 | 1    | 0   | root  | gdbus            |         |
/usr/lib64/libxml2.so.2.9.0

You may wish to restart these processes.
See 'man zypper' for information about the meaning of values in the
above table.


Here is what I am thinking. I may be soon using an openSUSE base system
to install industrial control processes, and I want to be able to update
security patches, but keep the system stable without having to reboot
the computer. As in, a situation where rebooting the computer would take
away operator control for a few minutes, which could violate safety
protocols or things like that.

So the question is, how do I restart the above listed processes and
clear them out of my zypper ps list without rebooting the pc?

I am going to do my best to avoid shutting down and rebooting until I am
able to figure this thing out. However, power isn’t always that great
here, and my UPS is currently undersized, so if we get a power glitch,
the pc will power off and I will have to reboot. So here’s to hoping
that doesn’t happen so I can learn something effective here!

G.O.
Box #1: 12.3 | KDE 4.10 | AMD Phenom IIX4 | 64 | 16GB
Box #2: 12.2 | KDE 4.9.2 | AMD Athlon X3 | 64 | 4GB
Laptop: 12.3 | KDE 4.10 | Core i7-2620M | 64 | 8GB

On 08/06/2013 10:29 AM, grglsn wrote:
> I just ran a zypper patch, and then logged out of KDE and logged back
> in. I noticed that if I check zypper ps as root, I still have some
> processes that need to be deleted or restarted:
>
>


> # zypper ps
> The following running processes use deleted files:
>
> PID  | PPID | UID | Login | Command          | Service | Files
>
> -----+------+-----+-------+------------------+---------+-------------------------------
> 322  | 1    | 0   | root  | systemd-journald |         |
> /usr/lib64/libgcrypt.so.11.7.0
> 754  | 1    | 0   | root  | gmain            |         |
> /usr/lib64/libxml2.so.2.9.0
> 831  | 1    | 0   | root  | kdm              |         | /usr/bin/kdm
> (deleted)
> 1129 | 831  | 0   | root  | kdm              |         | /usr/bin/kdm
> (deleted)
> 1372 | 1    | 0   | root  | gdbus            |         |
> /usr/lib64/libxml2.so.2.9.0
>
> You may wish to restart these processes.
> See 'man zypper' for information about the meaning of values in the
> above table.
>
> 

Just to elaborate a little - I was able to restart the first 2 processes
in the list with the following troubleshooting:


tribaltrekker:/home/george # pstree 754
NetworkManager─┬─dhclient
└─3*{NetworkManager}]
tribaltrekker:/home/george # systemctl restart NetworkManager.service
tribaltrekker:/home/george # systemctl restart journald.service

So that worked for those 2 processes to get them off the list. However,
I still have no idea how to restart kdm. I did log out and log back in,
and I thought that would have done the trick. But it didn’t.

As far as the last one, gdbus, I ran a pstree and found this:


tribaltrekker:/home/george # pstree 1372
upowerd───2*{upowerd}]

However, a “systemctl restart upowerd.service” doesn’t do anything.

Any ideas? Thanks in advance.


G.O.
Box #1: 12.3 | KDE 4.10 | AMD Phenom IIX4 | 64 | 16GB
Box #2: 12.2 | KDE 4.9.2 | AMD Athlon X3 | 64 | 4GB
Laptop: 12.3 | KDE 4.10 | Core i7-2620M | 64 | 8GB

grglsn wrote:
> On 08/06/2013 10:29 AM, grglsn wrote:
>> I just ran a zypper patch, and then logged out of KDE and logged back
>> in. I noticed that if I check zypper ps as root, I still have some
>> processes that need to be deleted or restarted:
>>
>>


>> # zypper ps
>> The following running processes use deleted files:
>>
>> PID  | PPID | UID | Login | Command          | Service | Files
>>
>> -----+------+-----+-------+------------------+---------+-------------------------------
>> 322  | 1    | 0   | root  | systemd-journald |         |
>> /usr/lib64/libgcrypt.so.11.7.0
>> 754  | 1    | 0   | root  | gmain            |         |
>> /usr/lib64/libxml2.so.2.9.0
>> 831  | 1    | 0   | root  | kdm              |         | /usr/bin/kdm
>> (deleted)
>> 1129 | 831  | 0   | root  | kdm              |         | /usr/bin/kdm
>> (deleted)
>> 1372 | 1    | 0   | root  | gdbus            |         |
>> /usr/lib64/libxml2.so.2.9.0
>>
>> You may wish to restart these processes.
>> See 'man zypper' for information about the meaning of values in the
>> above table.
>>
>> 

Just to elaborate a little - I was able to restart the first 2 processes
in the list with the following troubleshooting:


> tribaltrekker:/home/george # pstree 754
> NetworkManager─┬─dhclient
>                 └─3*{NetworkManager}]
> tribaltrekker:/home/george # systemctl restart NetworkManager.service
> tribaltrekker:/home/george # systemctl restart journald.service
> 

So that worked for those 2 processes to get them off the list. However,
I still have no idea how to restart kdm. I did log out and log back in,
and I thought that would have done the trick. But it didn’t.

As far as the last one, gdbus, I ran a pstree and found this:


> tribaltrekker:/home/george # pstree 1372
> upowerd───2*{upowerd}]
> 

>
> However, a “systemctl restart upowerd.service” doesn’t do anything.
>
> Any ideas? Thanks in advance.
>
Thanks for the thread. I noticed that YaST doesn’t tell us to restart
services after installation. Does YaST restart services automatically ?
Only zypper does inform the user to restart the services. I never
bothered about restarting services after using zypper but it might be a
totally different ball game altogether on a server machine.


GNOME 3.6.2
openSUSE Release 12.3 (Dartmouth) 64-bit
Kernel Linux 3.7.10-1.16-desktop

On 08/05/2013 10:29 PM, grglsn pecked at the keyboard and wrote:
> I just ran a zypper patch, and then logged out of KDE and logged back
> in. I noticed that if I check zypper ps as root, I still have some
> processes that need to be deleted or restarted:
>
>


> # zypper ps
> The following running processes use deleted files:
>
> PID  | PPID | UID | Login | Command          | Service | Files
>
> -----+------+-----+-------+------------------+---------+-------------------------------
> 322  | 1    | 0   | root  | systemd-journald |         |
> /usr/lib64/libgcrypt.so.11.7.0
> 754  | 1    | 0   | root  | gmain            |         |
> /usr/lib64/libxml2.so.2.9.0
> 831  | 1    | 0   | root  | kdm              |         | /usr/bin/kdm
> (deleted)
> 1129 | 831  | 0   | root  | kdm              |         | /usr/bin/kdm
> (deleted)
> 1372 | 1    | 0   | root  | gdbus            |         |
> /usr/lib64/libxml2.so.2.9.0
>
> You may wish to restart these processes.
> See 'man zypper' for information about the meaning of values in the
> above table.
>
> 

>
>

<code>
rcnetwork restart
rckdm restart
</code>

should take care of kdm and gmain

Don’t know of the others.

Ken

On 08/06/2013 10:48 AM, Ken Schneider wrote:

>>
>
> <code>
> rcnetwork restart
> rckdm restart
> </code>
>
> should take care of kdm and gmain
>
> Don’t know of the others.
>
> Ken

Nice. I ran rckdm restart as below:

tribaltrekker:/home/george # rckdm restart
redirecting to systemctl  restart rcxdm
Failed to issue method call: Unit rcxdm.service failed to load: No such
file or directory. See system logs and 'systemctl status rcxdm.service'
for details.

Now I know that the “rc” prefix is still working, but it will soon be
deprecated in future releases, so now it redirects to the systemd
daemon. I am trying to learn the systemd commands while it is still easy
to do so. In any case, this gave me the clue as to the correct command,
and it was xdm, not kdm, like this:

tribaltrekker:/home/george # systemctl restart xdm.service

I did it in one of the terminal windows (not a konsole window) by
logging out of kde first and then hitting alt-f1 to go to the terminal
window. (What is it that you are supposed to call that terminal window?
Just a “terminal window”?)

So anyway, that did the trick for kdm.

I still have the following:

tribaltrekker:/home/george # zypper ps
The following running processes use deleted files:

PID  | PPID | UID | Login | Command | Service | Files
-----+------+-----+-------+---------+---------+----------------------------
1372 | 1    | 0   | root  | gdbus   |         | /usr/lib64/libxml2.so.2.9.0

You may wish to restart these processes.
See 'man zypper' for information about the meaning of values in the
above table.
tribaltrekker:/home/george # pstree 1372
upowerd───2*{upowerd}]

So I still am looking for what to do about this process, as I do not
know how to restart it.


G.O.
Box #1: 12.3 | KDE 4.10 | AMD Phenom IIX4 | 64 | 16GB
Box #2: 12.2 | KDE 4.9.2 | AMD Athlon X3 | 64 | 4GB
Laptop: 12.3 | KDE 4.10 | Core i7-2620M | 64 | 8GB

On 08/06/2013 10:48 AM, vazhavandan wrote:

> Thanks for the thread. I noticed that YaST doesn’t tell us to restart
> services after installation. Does YaST restart services automatically ?
> Only zypper does inform the user to restart the services. I never
> bothered about restarting services after using zypper but it might be a
> totally different ball game altogether on a server machine.
>

I am pretty sure that YaST doesn’t restart services. I sometimes run
apper, as I was testing its usefulness for a new user, and it doesn’t
restart services either. I expect that if you regularly use Yast Online
Update but don’t regularly reboot your system, you can go to a terminal,
type in “zypper ps” and find some deleted processes that are still running.

Also, I always do it as root, as running “zypper ps” as a regular user
doesn’t necessarily show everything.


G.O.
Box #1: 12.3 | KDE 4.10 | AMD Phenom IIX4 | 64 | 16GB
Box #2: 12.2 | KDE 4.9.2 | AMD Athlon X3 | 64 | 4GB
Laptop: 12.3 | KDE 4.10 | Core i7-2620M | 64 | 8GB

Shut down the GUI

Press ctrl-alt-F1 log in as root run init 3

then restart it

init 5

when back in the GUI press ctrl-alt-F1 again and log out of the console with exit Press ctrl-alt-F7 to return to the GUI

That should work for anything except a kernel change which does require a reboot

On Tue, 06 Aug 2013 02:29:30 +0000, grglsn wrote:

> Here is what I am thinking. I may be soon using an openSUSE base system
> to install industrial control processes, and I want to be able to update
> security patches, but keep the system stable without having to reboot
> the computer. As in, a situation where rebooting the computer would take
> away operator control for a few minutes, which could violate safety
> protocols or things like that.

Don’t. For something that requires 24x7x365 options, you want a paid
option with a support contract.

Then, when you’re operating the system, when you have a need to apply
security patches and whatnot, you schedule your downtime so the operators
involved are aware of the times the system is not available, or you work
out a way to design the system so there’s failover capabilities (using a
multi-node cluster) so there’s no interruption of service while you
restart the system.

What you need is something with commercial support. If you run into a
problem while the system is supposed to be up and running, you WILL want
to be able to pick up the phone and talk to someone, if only to show
management that you’re doing something to resolve the problem.

> So the question is, how do I restart the above listed processes and
> clear them out of my zypper ps list without rebooting the pc?

Those processes can be restarted - an init 3/init 5 would do it for
those, but if you need to do a kernel update, a reboot is your only
option. There’s no way around that with openSUSE (or with SUSE as far as
I know) other than to design a high availability cluster that takes this
into account.

Jim

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

On 08/06/2013 11:42 AM, Jim Henderson wrote:
> On Tue, 06 Aug 2013 02:29:30 +0000, grglsn wrote:
>
>
> Don’t. For something that requires 24x7x365 options, you want a paid
> option with a support contract.
>
> Then, when you’re operating the system, when you have a need to apply
> security patches and whatnot, you schedule your downtime so the operators
> involved are aware of the times the system is not available, or you work
> out a way to design the system so there’s failover capabilities (using a
> multi-node cluster) so there’s no interruption of service while you
> restart the system.
>
> What you need is something with commercial support. If you run into a
> problem while the system is supposed to be up and running, you WILL want
> to be able to pick up the phone and talk to someone, if only to show
> management that you’re doing something to resolve the problem.
>

That is an excellent point. So take for example purchasing the Priority
subscription with SUSE Linux Enterprise Desktop. In a small system, say
that takes 4 control consoles, with a one year subscription, that would
be $880 per year.

If you compare that to Microsoft Windows 8, I found OEM install DVDs
available on the web for between $60 and $90. I couldn’t find anything
that clearly indicates how much Microsoft charges for technical support,
or if you can even by a technical support contract.

Microsoft has an advantage in that virtually every manufacturing
automation platform can seamlessly integrate with Windows. The
disadvantage, I think, is probably the vulnerability to viruses and
hence the constant need to get updates. And of course the lack of
control and lack of customization that you would get with SUSE, whether
that is openSUSE or SUSE Linux Enterprise.

I wouldn’t be installing these machines in the IT area, though, but more
like the control room of the plant floor. I would be interested if other
people have installed SUSE based control systems in settings like that,
what their reasons for doing so were, and if they are satisfied with the
performance.


G.O.
Box #1: 12.3 | KDE 4.10 | AMD Phenom IIX4 | 64 | 16GB
Box #2: 12.2 | KDE 4.9.2 | AMD Athlon X3 | 64 | 4GB
Laptop: 12.3 | KDE 4.10 | Core i7-2620M | 64 | 8GB

On 08/06/2013 11:26 AM, gogalthorp wrote:
>
> Shut down the GUI
>
> Press ctrl-alt-F1 log in as root run init 3
>
> then restart it
>
> init 5
>
> when back in the GUI press ctrl-alt-F1 again and log out of the console
> with exit Press ctrl-alt-F7 to return to the GUI
>
> That should work for anything except a kernel change which does require
> a reboot
>
>

Ok, that worked. Thanks!

Now, for the future, when systemd is fully in control and the init x
commands are no longer available, what will we do?

I ran this to get to runlevel 3 instead of “init 3”:


$ systemctl isolate multi-user.target

But once I was there, I had no idea how to get back to runlevel 5 using
the systemctl command, so I just typed in “init 5”.

It did the job, but it does make me wonder, how will I do it in the
future? Will the “init x” commands be gone by openSUSE 13.1, or 14.1, or
some other future version?


G.O.
Box #1: 12.3 | KDE 4.10 | AMD Phenom IIX4 | 64 | 16GB
Box #2: 12.2 | KDE 4.9.2 | AMD Athlon X3 | 64 | 4GB
Laptop: 12.3 | KDE 4.10 | Core i7-2620M | 64 | 8GB

For upgrading the kernel without rebooting the OP might look at ksplice.
Never Reboot Linux for Linux Security Updates | Ksplice

Unfortunately as far as I know this is only possible with Oracle custom kernel and might be unmaintainable without support from Oracle.

On Tue, 06 Aug 2013 05:29:51 +0000, grglsn wrote:

> That is an excellent point. So take for example purchasing the Priority
> subscription with SUSE Linux Enterprise Desktop. In a small system, say
> that takes 4 control consoles, with a one year subscription, that would
> be $880 per year.

Compare that to your cost of downtime. If an hour of downtime costs you
$1,000, then it’s paid for itself in less than an hour.

But I would also talk to someone in sales, because that pricing seems
higher than I remember it being.

> If you compare that to Microsoft Windows 8, I found OEM install DVDs
> available on the web for between $60 and $90. I couldn’t find anything
> that clearly indicates how much Microsoft charges for technical support,
> or if you can even by a technical support contract.
>
> Microsoft has an advantage in that virtually every manufacturing
> automation platform can seamlessly integrate with Windows. The
> disadvantage, I think, is probably the vulnerability to viruses and
> hence the constant need to get updates. And of course the lack of
> control and lack of customization that you would get with SUSE, whether
> that is openSUSE or SUSE Linux Enterprise.

That also figures into your cost evaluation. If the increased risk of
viruses increases your potential downtime, then you need to figure that
into your overall costs. You may be able to afford more downtime if the
license + support cost is lower on Windows, but if your overall downtime
risk increases, then going with the more expensive up-front cost saves
you money in the long run. It’s a classic risk analysis.

> I wouldn’t be installing these machines in the IT area, though, but more
> like the control room of the plant floor. I would be interested if other
> people have installed SUSE based control systems in settings like that,
> what their reasons for doing so were, and if they are satisfied with the
> performance.

Working with SUSE sales, they might be able to set up a call with another
customer who has similar requirements. When I worked in IT, I did that a
few times with various vendors to get a better picture of life after
implementation.

Jim


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

On Tue, 06 Aug 2013 09:56:01 +0000, glistwan wrote:

> hendersj;2577201 Wrote:
>>
>>
>> Those processes can be restarted - an init 3/init 5 would do it for
>> those, but if you need to do a kernel update, a reboot is your only
>> option.
>>
>> Jim –
>> Jim Henderson openSUSE Forums Administrator Forum Use Terms &
>> Conditions at ‘openSUSE Forums FAQ’ (http://tinyurl.com/openSUSE-T-C)
> For upgrading the kernel without rebooting the OP might look at ksplice.
> ‘Never Reboot Linux for Linux Security Updates | Ksplice’
> (http://www.ksplice.com/)
>
> Unfortunately as far as I know this is only possible with Oracle custom
> kernel and might be unmaintainable without support from Oracle.

Yes, I had thought about ksplice, but as you note, since it was acquired
by Oracle, it’s not been ported to anything other than Oracle’s respin of
RedHat. Personally, I’ve not been impressed with Oracle’s interactions
with the OSS community (though I do still use VirtualBox, which is owned
by Oracle), and so based on that I wouldn’t recommend them for lower-
level stuff or mission critical stuff, even though their flagship
database product is one of the best out there.

Jim


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

On 2013-08-06 04:48, vazhavandan wrote:

> Thanks for the thread. I noticed that YaST doesn’t tell us to restart
> services after installation. Does YaST restart services automatically ?
> Only zypper does inform the user to restart the services. I never
> bothered about restarting services after using zypper but it might be a
> totally different ball game altogether on a server machine.

Both should restart services, IF the rpm gives the order.

Doing updates without restarting ALL affected services, daemons, and
applications, is the same as not doing updates at all.


Cheers / Saludos,

Carlos E. R.
(from 11.4, with Evergreen, x86_64 “Celadon” (Minas Tirith))

On 2013-08-06 04:29, grglsn wrote:

> So the question is, how do I restart the above listed processes and
> clear them out of my zypper ps list without rebooting the pc?
>
> I am going to do my best to avoid shutting down and rebooting until I am
> able to figure this thing out. However, power isn’t always that great
> here, and my UPS is currently undersized, so if we get a power glitch,
> the pc will power off and I will have to reboot. So here’s to hoping
> that doesn’t happen so I can learn something effective here!

You simply do not update the machines, ever.

I’m serious.

They are kept on an isolated section, without network if it can be. They
could be in kiosk mode, so that nothing can be run in them aside from
what is strictly needed.

If you consider updates, you test that on a separate machine, with
control hardware and software, and test it. If it goes right, you
schedule downtime to do it (and a full backup to undo the upgrade if
needed). Even replace one machine with another, but that is not often
feasible (calibration is gone, for instance)

Yes, you can go for a full support commercial alternative, but that is
no guarantee either (a promise of a solution leaves you dead in the
water till it is found). You still have to test it yourself - specially
because you have to verify that the control hardware remains working
within parameters.

(yes, I have worked in that sector, and updates were forbidden)


Cheers / Saludos,

Carlos E. R.
(from 11.4, with Evergreen, x86_64 “Celadon” (Minas Tirith))

On Tue, 06 Aug 2013 15:27:20 +0000, Carlos E. R. wrote:

> Yes, you can go for a full support commercial alternative, but that is
> no guarantee either (a promise of a solution leaves you dead in the
> water till it is found). You still have to test it yourself - specially
> because you have to verify that the control hardware remains working
> within parameters.

The reason I suggested a commercial solution is that when you’re dealing
with mission-critical stuff like this, where every minute of downtime
costs you (potentially) tens of thousands of dollars, you don’t want to
be waiting for an answer in an online forum, or hope that you find the
right expertise on IRC.

You want to be able to pick up the phone and talk to someone right now,
and work on resolving the problem rather than have to wait for an answer
while your business is losing money.

While it certainly is true that not all paid/commercial support is
created equal, sometimes being able to show management that you are in
fact talking to someone and working on the problem by being on the phone
has its own value. I’ve even gone so far (at one company) as having
someone onsite looking at the problem, even though they actually would
have had better resources available in their own office. (It was only a
45 mile drive for them, so getting someone onsite was pretty easy to do)
The point was for management to see that the vendor in question was
concerned about the extremely rare problem we were having (to my
knowledge, we were the first to see it, and only one of two customers to
ever encounter it). The vendor sent someone onsite and allocated a
second internal resource to work the problem at that end, so in the end,
we got a very visible demonstration of support and we got the problem
resolved in the shortest possible time (which was still several days).

Jim


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

On 2013-08-06 20:11, Jim Henderson wrote:
> On Tue, 06 Aug 2013 15:27:20 +0000, Carlos E. R. wrote:
>
>> Yes, you can go for a full support commercial alternative, but that is
>> no guarantee either (a promise of a solution leaves you dead in the
>> water till it is found). You still have to test it yourself - specially
>> because you have to verify that the control hardware remains working
>> within parameters.
>
> The reason I suggested a commercial solution is that when you’re dealing
> with mission-critical stuff like this, where every minute of downtime
> costs you (potentially) tens of thousands of dollars, you don’t want to
> be waiting for an answer in an online forum, or hope that you find the
> right expertise on IRC.

Absolutely, I know.


> we got a very visible demonstration of support and we got the problem
> resolved in the shortest possible time (which was still several days).

You can not have a factory production line stopped several days, that’s
a huge loss. You simply do not upgrade those machines at all.

You do nothing on them, not even look at them, or they hang you by
the… er… O;-)


Cheers / Saludos,

Carlos E. R.
(from 11.4, with Evergreen, x86_64 “Celadon” (Minas Tirith))

On Tue, 06 Aug 2013 20:38:18 +0000, Carlos E. R. wrote:

>> we got a very visible demonstration of support and we got the problem
>> resolved in the shortest possible time (which was still several days).
>
> You can not have a factory production line stopped several days, that’s
> a huge loss. You simply do not upgrade those machines at all.

I spent some time in college working on an assembly line - I remember it
well.

> You do nothing on them, not even look at them, or they hang you by
> the… er… O;-)

Yep.

Jim


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

On 2013-08-06 23:59, Jim Henderson wrote:
> On Tue, 06 Aug 2013 20:38:18 +0000, Carlos E. R. wrote:

> Yep.

And all that explains why (apparently) stuxnet was transmitted via usb
stick. No updating, no network, transfer files from office to plant via
removable media… They probably forgot to be strict about those sticks,
maybe even took them home. Just educated guessing. :-}


Cheers / Saludos,

Carlos E. R.
(from 11.4, with Evergreen, x86_64 “Celadon” (Minas Tirith))

On 08/05/2013 11:26 PM, gogalthorp pecked at the keyboard and wrote:
> Shut down the GUI
>
> Press ctrl-alt-F1 log in as root run init 3
>
> then restart it
>
> init 5
>
> when back in the GUI press ctrl-alt-F1 again and log out of the console
> with exit Press ctrl-alt-F7 to return to the GUI
>
> That should work for anything except a kernel change which does require
> a reboot
>
>

Instead use:

<code>
init 5 && logout
</code>

Ken