To determine whether you need to reboot the server, or reboot certain services running on the server, use the 1)//needs-restarting// command from the RHEL6/RHEL7 yum-utils package (Yum Package Manager utilities).
This is based on the list provided here:
This needs-restarting utility works be examining running processes and comparing their /proc/<PID> directory timestamps with installation times. It does this to determine whether or not the running process is running an outdated binary and needs to be restarted. It will then print the affected services so that you may issue restarts for these services, or a server reboot if necessary.
You should log into your server as the root user via SSH to run this command (remember that KnownHost sets the port to a non-default value or 2200 on our VPS, Cloud, and Dedicated servers to help alleviate SSHd bruteforcing).
If you only want to know whether or not the server requires a reboot, run the following command:
The output will include the list of core services or libraries that have been updated and a message explicitly stating whether or not a reboot is required. The results of this command with the -r modifier can also be used programmatically as its return status is a 1 if a reboot is required and a 0 if not.
If you want to see all services that need to be restarted (in the case that the previous command indicates that you do not require a full reboot on a busy production server), you can issue the command without any flags.
To issue a reboot, run the following command:
If you require any assistance with running these commands, please open a support ticket with your KnownHost support team. We're available 24/7 and happy to help!