Check if Cpanel Server need reboot from command line

To check if Cpanel/WHM server need reboot from command line, run

whmapi1 system_needs_reboot

Example

On a server with latest kernal

Advertisement

[root@ns522466 ~]# whmapi1 system_needs_reboot
---
data:
  details: {}

  needs_reboot: 0
metadata:
  command: system_needs_reboot
  reason: OK
  result: 1
  version: 1
[root@ns522466 ~]#

On a server that need reboot

[root@server22 ~]# whmapi1 system_needs_reboot
---
data:
  details:
    kernel:
      boot_version: 3.10.0-962.3.2.lve1.5.42.el7.x86_64
      running_version: 3.10.0-962.3.2.lve1.5.39.el7.x86_64
    updates:
      glibc: 2.17-323.el7_9
      linux-firmware: 20200421-80.git78c0348.el7_9
      openssl-libs: 1:1.0.2k-21.el7_9
  needs_reboot: 1
metadata:
  command: system_needs_reboot
  reason: OK
  result: 1
  version: 1
[root@server22 ~]#

See Getting WHM Access from SSH on Cpanel Server

Add a comment

Leave a Reply

Your email address will not be published. Required fields are marked *

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Advertisement