Results 1 to 9 of 9

Thread: How to restart a process after zypper patch

  1. #1
    Join Date
    Apr 2012
    Location
    Philippines
    Posts
    218

    Default How to restart a process after zypper patch

    Howdy all,


    I just did a zypper patch, and then I ran zypper ps to see what needed to be restarted. I was wanting to figure out how to set everything right so that my system is not running on any deleted processes, but I want to do it without a reboot.


    So I logged out of KDE and logged back in (should fix all the kde processes, right?), and then I ran zypper patch again. Here are the results:


    george@tribaltrekker:~> zypper ps
    The following running processes use deleted files:


    Code:
     
    
     george@tribaltrekker:~> zypper ps
     The following running processes use deleted files:
     
    
     PID  | PPID | UID  | Login  | Command        | Service | Files                      
     -----+------+------+--------+----------------+---------+----------------------------
     3940 | 1    | 1000 | george | alsa-source    |         | /usr/lib64/libuuid.so.1.3.0
     6677 | 1    | 1000 | george | winedevice.exe |         | /usr/lib/libuuid.so.1.3.0  
     6709 | 1    | 1000 | george | wine-preloader |         | /usr/lib/libuuid.so.1.3.0  
     6711 | 1    | 1000 | george | wine-preloader |         | /usr/lib/libuuid.so.1.3.0

    So now I am thinking, how do I restart these processes with a command line command? I know how to end the processes with a kill signal, but not how to restart one, or even what is requiring these processes. When I search for the process on the system activity gui, it gives me the parent process, so I suppose I can use the system activity gui to restart those.


    But I was wondering how this could be done with a command line. If I have to restart the entire parent process, it would be good to know how to use the command line to figure out what is the correct parent process also.


    Ultimately the goal is to be able to do this over ssh, and I know that doing graphical over ssh makes things *really* slow, especially from where I am. So I want to make sure I know how to do it with the command line.


    Also, apparently a process is different from a system service (is that right?), so the systemctl restart command in systemd won't help. At least, that is how I understand it, please correct me if I am wrong.


    Thanks in advance,


    --
    George Olson
    Box #1: 12.2 | KDE 4.9.2 | AMD Phenom IIX4 | 64 | ATI Radeon HD 3300 | 16GB
    Box #2: 12.2 | KDE 4.9.1 | AMD Athlon X3 | 64 | nVidia C61 GeForce 7025 | 4GB
    Laptop: 12.2 | KDE 4.9.2 | Core i7-2620M | 64 | Intel HD Graphics 3000 | 8GB
    learning openSUSE and loving it

  2. #2
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    26,518
    Blog Entries
    15

    Default Re: How to restart a process after zypper patch

    On Fri 16 Nov 2012 04:16:01 AM CST, golson765 wrote:


    Howdy all,


    I just did a zypper patch, and then I ran zypper ps to see what needed
    to be restarted. I was wanting to figure out how to set everything right
    so that my system is not running on any deleted processes, but I want to
    do it without a reboot.


    So I logged out of KDE and logged back in (should fix all the kde
    processes, right?), and then I ran zypper patch again. Here are the
    results:


    george@tribaltrekker:~> zypper ps
    The following running processes use deleted files:



    Code:
    --------------------



    george@tribaltrekker:~> zypper ps
    The following running processes use deleted files:


    PID | PPID | UID | Login | Command | Service |
    Files
    -----+------+------+--------+----------------+---------+----------------------------
    3940 | 1 | 1000 | george | alsa-source |
    | /usr/lib64/libuuid.so.1.3.0 6677 | 1 | 1000 | george |
    winedevice.exe | | /usr/lib/libuuid.so.1.3.0 6709 | 1 | 1000
    | george | wine-preloader | | /usr/lib/libuuid.so.1.3.0 6711 |
    1 | 1000 | george | wine-preloader |
    | /usr/lib/libuuid.so.1.3.0
    --------------------



    So now I am thinking, how do I restart these processes with a command
    line command? I know how to end the processes with a kill signal, but
    not how to restart one, or even what is requiring these processes. When
    I search for the process on the system activity gui, it gives me the
    parent process, so I suppose I can use the system activity gui to
    restart those.


    But I was wondering how this could be done with a command line. If I
    have to restart the entire parent process, it would be good to know how
    to use the command line to figure out what is the correct parent process
    also.


    Ultimately the goal is to be able to do this over ssh, and I know that
    doing graphical over ssh makes things *really* slow, especially from
    where I am. So I want to make sure I know how to do it with the command
    line.


    Also, apparently a process is different from a system service (is that
    right?), so the systemctl restart command in systemd won't help. At
    least, that is how I understand it, please correct me if I am wrong.


    Thanks in advance,


    Hi
    In my case I had some udev processes hang onto the same lib, a restart
    of the udev systemd service removed them.

    So you have some sort of wine server running? A restart of that should
    help. The pstree command on the pid may help identify the starting
    service or daemon;
    Code:
    pstree -p
    Look at the output to identify the main process pid.

    --
    Cheers Malcolm °¿° (Linux Counter #276890)
    openSUSE 12.2 (x86_64) Kernel 3.4.11-2.16-desktop
    up 4 days 2:27, 4 users, load average: 0.03, 0.06, 0.05
    CPU Intel i5 CPU M520@2.40GHz | Intel Arrandale GPU


  3. #3
    Join Date
    Apr 2012
    Location
    Philippines
    Posts
    218

    Default Re: How to restart a process after zypper patch

    malcolmlewis wrote:
    >
    > [/QUOTE]
    > Hi
    > In my case I had some udev processes hang onto the same lib, a restart
    > of the udev systemd service removed them.
    >
    > So you have some sort of wine server running? A restart of that should
    > help. The pstree command on the pid may help identify the starting
    > service or daemon;
    >
    Code:
    > pstree -p
    >
    > Look at the output to identify the main process pid.
    >


    Thanks, that is helpful. Yes, I am running some sort of wine server, so that I can use my
    Evernote client.

    Now this was very interesting, because how do you know the actual name of the service? For
    example, when I ran zypper ps as root, I got the following:

    Code:
    tribaltrekker:/home/george # zypper ps
    The following running processes use deleted files:
    
    PID   | PPID | UID  | Login  | Command        | Service | Files
    ------+------+------+--------+----------------+---------+-----------------------------
    390   | 1    | 0    | root   | udevd          |         | /usr/lib64/libblkid.so.1.1.0
    |      |      |        |                |         | /usr/lib64/libuuid.so.1.3.0
    801   | 1    | 0    | root   | agetty         |         | /usr/sbin/agetty (deleted)
    3940  | 1    | 1000 | george | alsa-source    |         | /usr/lib64/libuuid.so.1.3.0
    6677  | 1    | 1000 | george | winedevice.exe |         | /usr/lib/libuuid.so.1.3.0
    6709  | 1    | 1000 | george | wine-preloader |         | /usr/lib/libuuid.so.1.3.0
    6711  | 1    | 1000 | george | wine-preloader |         | /usr/lib/libuuid.so.1.3.0
    8484  | 390  | 0    | root   | udevd          |         | /usr/lib64/libblkid.so.1.1.0
    |      |      |        |                |         | /usr/lib64/libuuid.so.1.3.0
    11582 | 390  | 0    | root   | udevd          |         | /usr/lib64/libblkid.so.1.1.0
    |      |      |        |                |         | /usr/lib64/libuuid.so.1.3.0
    So it turns out that udev is an issue on my machine as well. But note that the service column is
    blank, and that the command for udev is "udevd". When I ran "systemctl status udevd.service", I
    got an error saying "udevd.service" did not exist. But when I ran "systemctl status
    udev.service", it gave me information about the udev service. So the name of the service is
    "udev" without the trailing "d".

    So, with udev, that is a pretty big service, so it should probably be common knowledge that the
    name of the service is "udev" without any trailing "d". However, with other services, how do you
    find the actual *name* of the service so that you can restart it?

    When I did pstree on my alsa-source pid, here was the result:

    Code:
    tribaltrekker:/home/george # pstree -s 3940
    systemd───pulseaudio───4*[{pulseaudio}]
    tribaltrekker:/home/george # systemctl status pulseaudio.service
    pulseaudio.service
    Loaded: error (Reason: No such file or directory)
    Active: inactive (dead)
    So you can see that pulseaudio is the culprit, but how do I find out the actual *name* of the
    pulseaudio service so that I can restart it using "systemctl restart <name>.service"?

    --
    George Olson
    Box #1: 12.2 | KDE 4.9.2 | AMD Phenom IIX4 | 64 | ATI Radeon HD 3300 | 16GB
    Box #2: 12.2 | KDE 4.9.1 | AMD Athlon X3 | 64 | nVidia C61 GeForce 7025 | 4GB
    Laptop: 12.2 | KDE 4.9.2 | Core i7-2620M | 64 | Intel HD Graphics 3000 | 8GB
    learning openSUSE and loving it

  4. #4
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    26,518
    Blog Entries
    15

    Default Re: How to restart a process after zypper patch

    On Fri 16 Nov 2012 07:45:51 AM CST, golson765 wrote:

    malcolmlewis wrote:
    >
    >

    > Hi
    > In my case I had some udev processes hang onto the same lib, a restart
    > of the udev systemd service removed them.
    >
    > So you have some sort of wine server running? A restart of that should
    > help. The pstree command on the pid may help identify the starting
    > service or daemon;
    >
    Code:
    > pstree -p
    >
    > Look at the output to identify the main process pid.
    >


    Thanks, that is helpful. Yes, I am running some sort of wine server, so
    that I can use my Evernote client.

    Now this was very interesting, because how do you know the actual name
    of the service? For example, when I ran zypper ps as root, I got the
    following:

    Code:
    tribaltrekker:/home/george # zypper ps
    The following running processes use deleted files:
    
    PID   | PPID | UID  | Login  | Command        | Service |
    Files
    ------+------+------+--------+----------------+---------+-----------------------------
    390   | 1    | 0    | root   | udevd          |
    | /usr/lib64/libblkid.so.1.1.0 |      |      |        |
    |         | /usr/lib64/libuuid.so.1.3.0 801   | 1    | 0    | root   |
    agetty         |         | /usr/sbin/agetty (deleted) 3940  | 1    |
    1000 | george | alsa-source    |         | /usr/lib64/libuuid.so.1.3.0
    6677  | 1    | 1000 | george | winedevice.exe |
    | /usr/lib/libuuid.so.1.3.0 6709  | 1    | 1000 | george |
    wine-preloader |         | /usr/lib/libuuid.so.1.3.0 6711  | 1    |
    1000 | george | wine-preloader |         | /usr/lib/libuuid.so.1.3.0
    8484  | 390  | 0    | root   | udevd          |
    | /usr/lib64/libblkid.so.1.1.0 |      |      |        |
    |         | /usr/lib64/libuuid.so.1.3.0 11582 | 390  | 0    | root   |
    udevd          |         | /usr/lib64/libblkid.so.1.1.0 |      |
    |        |                |         | /usr/lib64/libuuid.so.1.3.0
    So it turns out that udev is an issue on my machine as well. But note
    that the service column is blank, and that the command for udev is
    "udevd". When I ran "systemctl status udevd.service", I got an error
    saying "udevd.service" did not exist. But when I ran "systemctl status
    udev.service", it gave me information about the udev service. So the
    name of the service is "udev" without the trailing "d".

    So, with udev, that is a pretty big service, so it should probably be
    common knowledge that the name of the service is "udev" without any
    trailing "d". However, with other services, how do you find the actual
    *name* of the service so that you can restart it?

    When I did pstree on my alsa-source pid, here was the result:

    Code:
    tribaltrekker:/home/george # pstree -s 3940
    systemd───pulseaudio───4*[{pulseaudio}]
    tribaltrekker:/home/george # systemctl status pulseaudio.service
    pulseaudio.service
    Loaded: error (Reason: No such file or directory)
    Active: inactive (dead)
    So you can see that pulseaudio is the culprit, but how do I find out
    the actual *name* of the pulseaudio service so that I can restart it
    using "systemctl restart <name>.service"?


    [/QUOTE]
    Hi
    Just run the command systemctl list-units to see what's loaded.

    If you just run the pstree -p command to see the whole
    tree then should get back further rather than isolate one pid which may
    be out on the branch rather at the trunk

    --
    Cheers Malcolm °¿° (Linux Counter #276890)
    openSUSE 12.2 (x86_64) Kernel 3.4.11-2.16-desktop
    up 4 days 10:11, 4 users, load average: 0.00, 0.01, 0.05
    CPU Intel i5 CPU M520@2.40GHz | Intel Arrandale GPU


  5. #5
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: How to restart a process after zypper patch

    On 2012-11-16 08:45, golson765 wrote:

    >
    > So it turns out that udev is an issue on my machine as well. But note that the service column is
    > blank, and that the command for udev is "udevd". When I ran "systemctl status udevd.service", I


    At this point, I do not care: I do an "init 1, init 5" sequence.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 11.4 x86_64 "Celadon" (Minas Tirith))

  6. #6
    Join Date
    Apr 2012
    Location
    Philippines
    Posts
    218

    Default Re: How to restart a process after zypper patch

    malcolmlewis wrote:

    >

    > Hi
    > Just run the command systemctl list-units to see what's loaded.
    >
    > If you just run the pstree -p command to see the whole
    > tree then should get back further rather than isolate one pid which may
    > be out on the branch rather at the trunk

    Hmm, interesting. For pulseaudio, the next thing up on the tree hierarchy is systemd itself. Same
    for winedevice.

    Still don't know how I would restart pulseaudio from the command line. I could kill the process,
    but then how do you get it going again? Apparently there is no specific "service" that governs
    it? So its parent process is systemd, and you can't restart systemd without a reboot, can you?

    --
    George Olson
    Box #1: 12.2 | KDE 4.9.2 | AMD Phenom IIX4 | 64 | ATI Radeon HD 3300 | 16GB
    Box #2: 12.2 | KDE 4.9.1 | AMD Athlon X3 | 64 | nVidia C61 GeForce 7025 | 4GB
    Laptop: 12.2 | KDE 4.9.2 | Core i7-2620M | 64 | Intel HD Graphics 3000 | 8GB
    learning openSUSE and loving it

  7. #7
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: How to restart a process after zypper patch

    On 2012-11-16 14:18, golson765 wrote:

    > Hmm, interesting. For pulseaudio, the next thing up on the tree hierarchy is systemd itself. Same
    > for winedevice.


    For pulse I log out from all graphical sessions. Then I log in text mode
    as user, check if it is running, and kill it. It is restarted as I log
    in graphical mode again.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 11.4 x86_64 "Celadon" (Minas Tirith))

  8. #8
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    26,518
    Blog Entries
    15

    Default Re: How to restart a process after zypper patch

    On Fri 16 Nov 2012 01:18:24 PM CST, golson765 wrote:

    malcolmlewis wrote:

    >

    > Hi
    > Just run the command systemctl list-units to see what's loaded.
    >
    > If you just run the pstree -p command to see the whole
    > tree then should get back further rather than isolate one pid which
    > may be out on the branch rather at the trunk

    Hmm, interesting. For pulseaudio, the next thing up on the tree
    hierarchy is systemd itself. Same for winedevice.

    Still don't know how I would restart pulseaudio from the command line.
    I could kill the process, but then how do you get it going again?
    Apparently there is no specific "service" that governs it? So its
    parent process is systemd, and you can't restart systemd without a
    reboot, can you?
    Hi
    You could try sending a signal to the process (probably check
    pulseaudio and wine documentation), to get a list of signals use the
    command kill -l. Else as Carlos pointed out, drop to runlevel 1 and
    back to 5....

    --
    Cheers Malcolm °¿° (Linux Counter #276890)
    openSUSE 12.2 (x86_64) Kernel 3.4.11-2.16-desktop
    up 4 days 11:26, 4 users, load average: 0.01, 0.03, 0.05
    CPU Intel i5 CPU M520@2.40GHz | Intel Arrandale GPU


  9. #9
    Join Date
    Sep 2012
    Posts
    4,976

    Default Re: How to restart a process after zypper patch

    If you are using systemd, you can use systemd-cgls to get overview of all services and processes that belong to services. To find out service for one particular process you can use ps:
    Code:
    bor@opensuse:~/src/grub> pgrep -l udevd
    331 udevd
    28402 udevd
    28456 udevd
    bor@opensuse:~/src/grub> ps -o cgroup -p 331,28402,28456
    CGROUP
    3:cpuacct,cpu:/system/udev.service,1:name=systemd:/system/udev.service
    3:cpuacct,cpu:/system/udev.service,1:name=systemd:/system/udev.service
    3:cpuacct,cpu:/system/udev.service,1:name=systemd:/system/udev.service
    bor@opensuse:~/src/grub> pgrep -l pulseaudio
    11795 pulseaudio
    bor@opensuse:~/src/grub> ps -o cgroup -p 11795
    CGROUP
    1:name=systemd:/user/bor/47
    bor@opensuse:~/src/grub>
    In this case pulseaudio is not a service, but is started as part of user session as is indicated by /user hierarchy as opposed to /system. And you can look at all processes in this session using systemd-loginctl:
    Code:
    bor@opensuse:~/src/grub> systemd-loginctl --no-pager session-status 47
    47 - bor (501)
           Since: Tue, 13 Nov 2012 19:07:31 +0400; 3 days ago
          Leader: 11689 (gdm-session-wor)
            Seat: seat0; vc8
         Display: :0
         Service: gdm; type x11; class user
          Active: yes
          CGroup: /user/bor/47
              ├ 11689 gdm-session-worker [pam/gdm]
              ├ 11701 /usr/bin/gnome-keyring-daemon --daemonize --login
              ├ 11720 /usr/bin/gnome-session
              ├ 11765 dbus-launch --exit-with-session /usr/bin/gnome-ses...
              ├ 11766 /bin/dbus-daemon --fork --print-pid 5 --print-addr...
              ├ 11768 /usr/lib/gvfs/gvfsd
              ├ 11770 /usr/lib/gvfs//gvfs-fuse-daemon -f /run/user/bor/g...
              ├ 11784 /usr/lib/gnome-settings-daemon-3.0/gnome-settings-...
              ├ 11795 /usr/bin/pulseaudio --start --log-target=syslog
              ├ 11798 /usr/lib/pulse/gconf-helper
              ├ 11800 /usr/lib/GConf/2/gconfd-2
              ├ 11802 /usr/lib/gnome-settings-daemon-3.0/gsd-printer
              ├ 11807 /usr/lib/gvfs/gvfs-udisks2-volume-monitor
              ├ 11810 /usr/lib/gvfs/gvfs-afc-volume-monitor
              ├ 11813 /usr/lib/gvfs/gvfs-gphoto2-volume-monitor
              ├ 11821 /usr/bin/gnome-shell
              ├ 11823 syndaemon -i 1.0 -K -R -t
              ├ 11877 /usr/lib/tracker-store
              ├ 11879 /usr/bin/python /usr/share/system-config-printer/a...
              ├ 11891 gnome-screensaver
              ├ 11896 /usr/lib/tracker-miner-fs
              ├ 11904 /usr/lib/evolution/3.4/evolution-alarm-notify
              ├ 11906 nm-applet
              ├ 11914 /usr/lib/gnome-shell/gnome-shell-calendar-server
              ├ 11916 /usr/lib/mission-control-5
              ├ 11919 /usr/lib/evolution-data-server/evolution-calendar-...
              ├ 11926 /usr/lib/goa-daemon
              ├ 11951 /usr/lib/evolution-data-server/evolution-addressbo...
              ├ 11961 /usr/lib/gvfs/gvfsd-afc --spawner :1.1 /org/gtk/gv...
              ├ 11963 /usr/lib/gvfs/gvfsd-afc --spawner :1.1 /org/gtk/gv...
              ├ 11969 /usr/lib/libsocialweb-core
              ├ 11991 gnome-terminal
              ├ 11997 gnome-pty-helper
              ├ 11998 bash
              ├ 12045 claws-mail
              ├ 12059 /usr/lib64/firefox/firefox
              ├ 12076 /usr/lib/at-spi2/at-spi-bus-launcher
              ├ 12101 /usr/lib/gvfs/gvfsd-http --spawner :1.1 /org/gtk/g...
              ├ 12229 bash
              ├ 14983 /usr/lib/dconf-service
              ├ 20677 bash
              └ 28911 systemd-loginctl --no-pager session-status 47

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •