KNOWNHOST WIKI

User Tools

Site Tools


control-panels:directadmin:how-to-determine-if-you-need-to-reboot-directadmin

How Can I Determine Whether My DirectAdmin Server Requires a Reboot?

The yum-utils Utility Command needs-restarting

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).

Looking at the 2)code, the following require a server reboot upon being updated:

  • kernel
  • kernel-rt
  • glibc
  • linux-firmware
  • systemd
  • udev
  • openssl-libs
  • gnutls
  • dbus

This is based on the list provided here:

 https://access.redhat.com/solutions/27943

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.


Usage

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:

  needs-restarting -r

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.

Refer to the 3)man page for additional information, or use the -h flag to read the command's help output.


Issuing a Reboot

To issue a reboot, run the following command:

  reboot now

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!

control-panels/directadmin/how-to-determine-if-you-need-to-reboot-directadmin.txt · Last modified: 2020/09/28 11:54 by Karson N.