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

[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

Need help with Linux Server or WordPress? We can help!

Leave a Reply

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