Yet another small addition to Solaris 11.4. This one was released with SRU 57. reboot
, shutdown
and poweroff
got a new option. With -c
you can now specify a comment that is stored in the wmtpx
file for mentioned administrative commands. For example to document the reason why yo rebooted the system.
root@testbed:~# reboot -c "reboot for no reason"
root@testbed:~# halt -c "Halting for no reason"
root@testbed:~# poweroff -c "poweroff for no reason"
You can view this comments when executing last
:
jmoekamp reboot reboot for no re Wed Jul 10 21:39 - down (23:59)
jmoekamp poweroff poweroff for no Wed Jul 10 21:34 - down (00:01)
jmoekamp halt Halting for no r Wed Jul 10 21:30 - down (00:01)
Or you could look at the comments simply by dumping the wtmpx
file:
jmoekamp@testbed:/var/adm$ /usr/lib/acct/fwtmp < /var/adm/wtmpx | grep "reason" | tr -s ' '
jmoekamp halt 0 11 0000 0000 1720639844 0 0 22 Halting for no reason Wed Jul 10 19:30:44 2024
jmoekamp poweroff 0 11 0000 0000 1720640058 0 0 23 poweroff for no reason Wed Jul 10 19:34:18 2024
jmoekamp reboot 0 11 0000 0000 1720640363 0 0 21 reboot for no reason Wed Jul 10 19:39:23 2024
For example, you could refer to an internal ticket in the comment or just write down a short comment there like “check for configuration persistency”. Of course the length of comments has to be in the limits of the wtmpx
file. So be concise.