I did an update of CentOS 6 last night which was rather large. By the time I decided to leave it to finish, the process was only a few packages away from completing the download. So, I scheduled a shutdown for +60 minutes and left.
When I checked in on the system this morning it had shutdown. I'm having some troubles (I expected something), only, while I was looking at logs, I noticed the end of the yum log seems like the update took longer then I expected.
When I noticed this, I reran yum update. Everything is up to date. Another question is,
Did it finish cleanly. How can I check?
Best Answer
On CentOS the file
/var/log/yum.log
shall have the time the last package was upgraded. For example on my CentOS (mine is currently running CentOS 7, but the file is in the same place):(Yes, I did not run
yum update
for some time)You can then compare this against syslog
messages
about the shutdown. Syslog rotates the logs, so you may have something likemessages-20160807
instead of plainmessages
, check that too. For example:(CentOS 6 will not have
systemd
messages, but something relevant will be printed.)Depending on the configuration in
/etc/rsyslog.conf
//etc/syslog.conf
shutdown may not be logged, but something certainly logs when the system goes down. Therefore searching forstopped|shut
is a good heuristic to check when things started going down.Comparing the timestamps in both logs you can get a good notion of whether
yum
finished its work before the system went down.