I'm using CentOS and Red Hat Enterprise Linux on a few machines without the GUI. How can I check if recently installed updates require a reboot? In Ubuntu, I'm used to checking if /var/run/reboot-required is present.
|
|
|
https://access.redhat.com/discussions/3106621#comment-1196821
|
||||
|
|
|
About comparing installed kernels with running one:
Hope that helps! |
|||||||||||||
|
|
You could compare the ouput of uname -a with the list of installed kernel packages |
|||||||||||||||||
|
|
|
|||
|
|
|
One thing that can be helpful to look at in terms of "is a reboot required" is whether or not there are any files that have been removed/replaced by the update but for which the old files are still loaded/used by active processes. Basically, when YUM updates a file that is in use by a process, the file itself may have been marked for deletion, but the process keeps using the old file since it has an open file-descriptor to the old file's inode. A command to get a count of the number of old files still in use:
That command will give you a count of the files. Use this instead to see which files are actually in use:
That command will produce output similar to the following on a YUM-updated box:
|
|||
|
|
|
Check whether running kernel is the latest one. If it's not, check whether system was restarted since kernel install. If it was not, reboot.
|
|||||
|
|
I know this question has been answered already and that folks have posted information about checking for newer kernels as well as deleted files, but I recently wrote a script that checks for both. If either condition is detected, the reboot is scheduled for +30 minutes.
|
|||
|
|
|
Here is my version of the alexm code. You can do this:
|
||||
|
|
|
install.log install.log.syslog yum.log you check this place what all got new rpm got install |
|||
|
|