「yum-ps」とは、パッケージをアップデートした際に旧パッケージ(サービス)で稼働しているプロセスを一覧化してくれます。
これにより、どのサービスを再起動すれば良いか管理者が把握する事が可能になります。
今までは、システムを再起動していた方も居られたのではないでしょうか?(最悪はアップデートしたままの状態とか・・・)
商用で稼働させている訳でもないのでシステム再起動で問題ないのですが、BIOSや周辺機器などに起動時間を要する場合などには「yum-ps」を利用する事で軽減できます。
「yum-ps」のインストール # yum -y install yum-plugin-ps |
yum にてパッケージアップデートなど行った後に以下を実施
# yum ps
利用例)
パッケージアップデートチェックを行った際に「openssh」が検出されてアップデートした場合
パッケージ更新のチェック
# yum check-update
読み込んだプラグイン:fastestmirror, langpacks, presto, ps, refresh-packagekit
Loading mirror speeds from cached hostfile
* fedora: ftp.kddilabs.jp
* updates: ftp.kddilabs.jp
openssh.x86_64 5.8p2-25.fc16 updates
「openssh」のアップデート
# yum update openssh
「yum-ps」にてチェック
# yum ps
読み込んだプラグイン:fastestmirror, langpacks, presto, ps, refresh-packagekit
pid proc CPU RSS State uptime
Loading mirror speeds from cached hostfile
* fedora: ftp.kddilabs.jp
* updates: ftp.kddilabs.jp
openssh-server-5.8p2-25.fc16.x86_64
1421 sshd 0:00 4.5 MB スリープ中: *03:03
1423 sshd 0:00 1.8 MB スリープ中: *02:53
1551 sshd 0:00 4.5 MB スリープ中: *02:10
1553 sshd 0:00 1.8 MB スリープ中: *02:06
1714 sshd 0:00 3.2 MB スリープ中: 00:29
上記の様にアップデートによって検出された旧プロセスが表示される
「ssh」サービスの再起動
【Fedora15 / CentOS6 の場合】
# /etc/rc.d/init.d/sshd restart
【Fedora16 の場合】
# systemctl start sshd.service
再度「yum-ps」にて確認
# yum ps
読み込んだプラグイン:fastestmirror, langpacks, presto, ps, refresh-packagekit
pid proc CPU RSS State uptime
Loading mirror speeds from cached hostfile
* fedora: ftp.kddilabs.jp
* updates: ftp.kddilabs.jp
検出されなくなった
|
余談ですが、kernelのアップデートの場合はどうなるのか試してみました。
# yum update kernel
# yum ps
読み込んだプラグイン:fastestmirror, langpacks, presto, ps, refresh-packagekit
pid proc CPU RSS State uptime
Loading mirror speeds from cached hostfile
* fedora: ftp.kddilabs.jp
* updates: ftp.kddilabs.jp
glibc-2.14.90-24.fc16.6.x86_64
1 systemd 0:02 4.3 MB スリープ中: *20:13
428 udevd 0:00 1.7 MB スリープ中: *20:04
436 systemd-stdout- 0:00 896 kB スリープ中: *20:04
551 udevd 0:00 1.1 MB スリープ中: *20:01
552 udevd 0:00 1.1 MB スリープ中: *20:01
694 auditd 0:00 988 kB スリープ中: *19:58
703 audispd 0:00 844 kB スリープ中: *19:58
710 sedispatch 0:00 808 kB スリープ中: *19:58
712 acpid 0:00 664 kB スリープ中: *19:58
713 gpm 0:00 368 kB スリープ中: *19:58
717 atd 0:00 752 kB スリープ中: *19:58
722 abrtd 0:00 1.2 MB スリープ中: *19:57
724 abrt-dump-oops 0:00 788 kB スリープ中: *19:57
726 systemd-logind 0:00 1.6 MB スリープ中: *19:57
727 system-setup-ke 0:00 288 kB スリープ中: *19:57
729 avahi-daemon 0:00 1.3 MB スリープ中: *19:57
731 mcelog 0:00 772 kB スリープ中: *19:57
745 rsyslogd 0:00 1.2 MB スリープ中: *19:57
750 irqbalance 0:00 700 kB スリープ中: *19:57
754 dbus-daemon 0:00 2.4 MB スリープ中: *19:57
777 avahi-daemon 0:00 192 kB スリープ中: *19:56
805 gdm-binary 0:00 2.2 MB スリープ中: *19:54
967 rpcbind 0:00 748 kB スリープ中: *19:50
970 xinetd 0:00 840 kB スリープ中: *19:50
976 rpc.idmapd 0:00 324 kB スリープ中: *19:49
980 rpc.statd 0:00 1.2 MB スリープ中: *19:48
1069 master 0:00 2.7 MB スリープ中: *19:46
1072 pickup 0:00 2.6 MB スリープ中: *19:46
1073 qmgr 0:00 2.5 MB スリープ中: *19:46
1077 console-kit-dae 0:00 5.8 MB スリープ中: *19:45
1079 accounts-daemon 0:00 3.5 MB スリープ中: *19:45
1143 polkitd 0:00 4.1 MB スリープ中: *19:45
1167 upowerd 0:00 3.5 MB スリープ中: *19:39
1216 rtkit-daemon 0:00 1.2 MB スリープ中: *19:36
1886 pulseaudio 0:00 3.0 MB スリープ中: *12:03
1889 gconf-helper 0:00 2.4 MB スリープ中: *12:03
1893 cupsd 0:00 3.5 MB スリープ中: *12:03
1904 udisks-daemon 0:00 3.3 MB スリープ中: *12:02
1905 udisks-daemon 0:00 724 kB スリープ中: *12:02
1913 colord 0:00 7.8 MB スリープ中: *12:02
2509 sshd 0:00 3.8 MB スリープ中: *09:32
2511 sshd 0:00 1.7 MB スリープ中: *09:28
2512 bash 0:00 4.7 MB スリープ中: *09:28
2575 su 0:00 2.7 MB スリープ中: *09:26
2578 bash 0:00 4.8 MB スリープ中: *09:24
2641 sshd 0:00 2.8 MB スリープ中: *08:44
2651 packagekitd 0:00 7.9 MB スリープ中: *07:01
11926 crond 0:00 1.5 MB スリープ中: 03:58
11971 gdm-simple-slav 0:00 4.1 MB スリープ中: 00:17
11973 Xorg 0:00 27 MB スリープ中: 00:17
11996 dbus-daemon 0:00 1.2 MB スリープ中: 00:13
11997 gdm-session-wor 0:00 3.3 MB スリープ中: 00:13
12000 gnome-session 0:00 10 MB スリープ中: 00:13
12012 gnome-settings- 0:00 17 MB スリープ中: 00:11
12018 gvfsd 0:00 2.6 MB スリープ中: 00:11
12023 pulseaudio 0:00 3.1 MB スリープ中: 00:10
12026 at-spi-bus-laun 0:00 3.2 MB スリープ中: 00:09
12030 dbus-daemon 0:00 1.4 MB スリープ中: 00:09
12033 at-spi2-registr 0:00 3.4 MB スリープ中: 00:09
12034 metacity 0:00 9.2 MB スリープ中: 00:09
12037 gconfd-2 0:00 3.3 MB スリープ中: 00:08
12038 gdm-simple-gree 0:00 15 MB スリープ中: 00:08
12040 dconf-service 0:00 4.3 MB スリープ中: 00:08
12046 gdm-session-wor 0:00 2.4 MB スリープ中: 00:07
12050 yum 0:00 46 MB 実行中: 00:02
glibc-common-2.14.90-24.fc16.6.x86_64
722 abrtd 0:00 1.2 MB スリープ中: *19:57
805 gdm-binary 0:00 2.2 MB スリープ中: *19:54
1079 accounts-daemon 0:00 3.5 MB スリープ中: *19:45
1886 pulseaudio 0:00 3.0 MB スリープ中: *12:03
1893 cupsd 0:00 3.5 MB スリープ中: *12:03
2512 bash 0:00 4.7 MB スリープ中: *09:28
2575 su 0:00 2.7 MB スリープ中: *09:26
2578 bash 0:00 4.8 MB スリープ中: *09:24
11926 crond 0:00 1.5 MB スリープ中: *03:58
11971 gdm-simple-slav 0:00 4.1 MB スリープ中: 00:17
11997 gdm-session-wor 0:00 3.3 MB スリープ中: 00:13
12000 gnome-session 0:00 10 MB スリープ中: 00:13
12012 gnome-settings- 0:00 17 MB スリープ中: 00:11
12018 gvfsd 0:00 2.6 MB スリープ中: 00:11
12023 pulseaudio 0:00 3.1 MB スリープ中: 00:10
12034 metacity 0:00 9.2 MB スリープ中: 00:09
12037 gconfd-2 0:00 3.3 MB スリープ中: 00:08
12038 gdm-simple-gree 0:00 15 MB スリープ中: 00:08
12046 gdm-session-wor 0:00 2.4 MB スリープ中: 00:07
12050 yum 0:00 46 MB 実行中: 00:02
kernel-3.2.7-1.fc16.x86_64
0 <kernel> 0:00 0 B Running: *20:13
当然の結果となりました。
本体更新の他、ライブラリ更新もあるので、ほぼすべてのパッケージに影響が出ます。
当たり前ですが、Kernelアップデートの場合はシステム再起動が必要になります。
|