We have a new documentation site for cPanel & WHM! You can find our new documentation site at docs.cpanel.net.

We will continue to maintain our API documentation on this server.

Child pages
  • WHM API 1 Functions - loadavg
Skip to end of metadata
Go to start of metadata

Description


This function retrieves the server's load average.

Examples


 JSON API
https://hostname.example.com:2087/cpsess##########/json-api/loadavg?api.version=1
 XML API
https://hostname.example.com:2087/cpsess##########/xml-api/loadavg?api.version=1
 Command Line

Note:

This function is not available through the command line. Instead, use WHM API 1's systemloadavg function.



 Output (JSON)
{
   "one":"0.17",
   "five":"0.18",
   "fifteen":"0.19"
}
 Output (XML)
<loadavg>
       <one>0.17</one>
       <five>0.18</five>
       <fifteen>0.19</fifteen>
</loadavg>


Note:

Use WHM's API Shell interface (WHM >> Home >> Development >> API Shell) to directly test WHM API calls.

   

Parameters

This function does not accept parameters.

Returns

This function does not include metadata.

ReturnTypeDescriptionPossible valuesExample
onestring

The server's load average over the previous minute.

A decimal number.

For example, a value of .18 represents 18% of a single CPU's processor capacity.

0.17
fivestringThe server's load average over the previous five minutes.

A decimal number.

For example, a value of .18 represents 18% of a single CPU's processor capacity.

0.18
fifteenstringThe server's load average over the previous fifteen minutes.

A decimal number.

For example, a value of .18 represents 18% of a single CPU's processor capacity.

0.19