linux没有环境,只要有wtmp日志即可。
15:23-->$ last | grep 'shutdown\|reboot' | head -1 | awk '{print $1}'
reboot表 热
15:23-->$ last | grep 'shutdown\|reboot' | head -1 | awk '{print $1}'
reboot表 热
shutdown表 冷
http://bbs.chinaunix.net/thread-1773341-1-1.html