Linux
grep -iva ': starting\|kernel: .*: Power Button\|watching system buttons\|Stopped Cleaning Up\|Started Crash recovery kernel' /var/log/messages /var/log/syslog /var/log/apcupsd* | grep -iw 'recover[a-z]*\|power[a-z]*\|shut[a-z ]*down\|rsyslogd\|ups'
Windows
Event ID | Description |
---|---|
41 | The system has rebooted without cleanly shutting down first. |
1074 | The system has been shutdown properly by a user or process. |
1076 | Follows after Event ID 6008 and means that the first user with shutdown privileges logged on to the server after an unexpected restart or shutdown and specified the cause. |
6005 | The Event Log service was started. Indicates the system startup. |
6006 | The Event Log service was stopped. Indicates the proper system shutdown. |
6008 | The previous system shutdown was unexpected. |
6009 | The operating system version detected at the system startup. |
6013 | The system uptime in seconds. |