ubuntuでapt upgradeした後、checkrestartで再起動が必要なプロセスを確認すると・・・
$ sudo checkrestart Found 13 processes using old versions of upgraded files (9 distinct programs) (1 distinct packages) Of these, 1 seem to contain systemd service definitions or init scripts which can be used to restart them. The following packages seem to have definitions that could be used to restart their services: util-linux: 538 /sbin/agetty 544 /sbin/agetty These are the systemd services: systemctl restart fstrim.service
fstrim.serviceをリスタートせよ出てくるが、リスタートしてもプロセスが古いままである。
$ systemctl restart fstrim.service $ ps auxww | grep agetty root 538 0.0 0.0 15992 1232 ttyS0 Ss+ 5月27 0:00 /sbin/agetty -o -p -- \u --keep-baud 115200,38400,9600 ttyS0 vt220 root 544 0.0 0.0 16216 976 tty1 Ss+ 5月27 0:00 /sbin/agetty -o -p -- \u --noclear tty1 linux
ググってみると getty@tty1.service
を再起動せよと言う記述を見つけた。
$ sudo systemctl restart getty@tty1.service
しかし2つあるagettyプロセスのうち片方しか再起動されていない
$ ps auxww | grep agetty root 538 0.0 0.0 15992 1232 ttyS0 Ss+ 5月27 0:00 /sbin/agetty -o -p -- \u --keep-baud 115200,38400,9600 ttyS0 vt220 root 9157 0.3 0.0 16216 1900 tty1 Ss+ 17:20 0:00 /sbin/agetty -o -p -- \u --noclear tty1 linux
さらに調べてみると、もう一つは serial-getty@ttyS0
というサービス名のようだ
$ sudo systemctl restart serial-getty@ttyS0.service
これで2つとも再起動された。
ttyS0はシリアルコンソール接続用のgettyプロセスらしいが、シリアル接続の端末なんてお世話になったことがない・・・