Return whether system needs reboot

This function determines if your system requires a reboot to apply quotas, software package updates, or kernel updates.

Important:

This function cannot detect whether your system needs a reboot if you use cPanel & WHM inside of a Linux Container (LXC).

SecurityBasicAuth
Responses
200

HTTP Request was successful.

Response Schema: application/json
object

An object that contains reasons why the system requires a reboot.

object
needs_reboot
integer

Whether the system requires a reboot.

  • 1 — System requires a reboot.
  • 0 — System does not require a reboot.
Enum: 0 1
get/system_needs_reboot
Request samples
whmapi1 --output=jsonpretty \
  system_needs_reboot
Response samples
application/json
{
  • "details": {
    • "kernel": {
      • "boot_version": "3.10.0-514.10.2.e17.x86_64",
      • "running_version": "3.10.0-514.10.2.e17.x86_64"
      },
    • "quota": 1,
    • "updates": {
      • "glibc": "2.17-157.el7_3.1"
      }
    },
  • "metadata": {
    • "command": "system_needs_reboot",
    • "reason": "OK",
    • "result": 1,
    • "version": 1
    },
  • "needs_reboot": 1
}