The server load can easliy be done using the API.
Get the cpanel API class at:
http://sdk.cpanel.net/lib/xmlapi/php/cp_xmlapi_php_v1.0.6.tar.gz
(Read about it on this thread:
http://forums.cpanel.net/f42/xml-api-php-class-version-1-0-a-136449.html )
Unpack and upload it on the server where you want to display the load
I have made a script that will show the load below.
Just create a file called whateveryouwant.php, paste the code below (add ip and pass or hash) and upload it to the same directory as you have uploaded the xmlapi.php to.
<?php
include("xmlapi.php");
############### ENTER YOUR SERVER IP HERE
# Enter your server IP here
$ip = "";
############# ENTER PASSWORD OR HASH HERE
# Enter your root password between the " and " if you want to use password
$root_pass = "";
# If you want to use hash instead: In WHM go to Cluster/Remote Access - Setup Remote Access Key and copy the entire key (all lines) and paste it between " and " below.
$root_hash = "";
if ( $ip && ip2long($ip) ) { # checking that IP is OK
$xmlapi = new xmlapi($ip);
if ($root_pass || $root_hash) { # has to be one of theese
if ($root_pass) {
$xmlapi->password_auth("root",$root_pass);
}
else if ($root_hash) {
$xmlapi->hash_auth("root",$root_hash);
}
$xmlapi->set_output("array");
$xmlapi->set_debug(0);
$result = $xmlapi->loadavg();
echo "Average load <br />last minute: " . $result['one'] . "<br />last 5 minutes: " . $result['five'] . "<br />last 15 minutes: " . $result['fifteen'] . "<br />";
}
else {
echo "You have to set password or hash";
}
}
else {
echo "You have to set a correct IP";
}
?>
If you have checked the "Require security tokens for all interfaces" under WHM - Server Configuration - Tweak Settings . Security you might run into problems with the api
// kjg