RE: Shutdown/reboot script order?

From: James Powell <james4591_at_hotmail.com>
Date: Tue, 9 Jun 2015 11:21:04 -0700

Killall5 sometimes can leave some dangling processes. You may want to use pkill as an alternative or with killall5 after the killall5 sequence.

pkill --inverse -s0,1 -TERM
sleep 3
pkill --inverse -s0,1 -KILL
sleep 3

This will collapse the entire process tree if any processes are left behind, especially if you use a file system as /(root) like JFS that deals with copy-on-write.

You get pkill with procps-ng.

Hope this helps.

Sent from my Windows Phone
________________________________
From: Steve Litt<mailto:slitt_at_troubleshooters.com>
Sent: ‎6/‎9/‎2015 7:24 AM
To: supervision_at_list.skarnet.org<mailto:supervision_at_list.skarnet.org>
Subject: Shutdown/reboot script order?

Hi all,

I know the last part of system shutdown or reboot, after I've killed my
daemontools-supervised processes, has the following features:

* killall5 -15; sleep 2; killall5 -9; sleep 2

* umount -a

* mount -o remount,ro /dev/sda1

* /sbin/halt or /sbin/reboot

Could somebody confirm which order these things come in?

Thanks,

SteveT

Steve Litt
June 2015 featured book: The Key to Everyday Excellence
http://www.troubleshooters.com/key
Received on Tue Jun 09 2015 - 18:21:04 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:44:19 UTC