serverstatus.php
This script allows to do some load tests.
By default only the tests enabled inside the config.ini will be used.
Usage:
serverstatus.php [cpu] [hdd:wl] [memory:wl] [swap:wl] [check]
Parameters:
- check do tests and not just output top -n 1 -b -c and df -h -T.
- cpu check whether the system load is above the cpu core count.
- hdd:wl check whether hdd usage of any hhd is more than warnlevel (wl) percent.
- memory:wl check whether less than than warnlevel (wl) percent of memory are still free.
- swap:wl check whether more than warnlevel (wl) percent of the avaiable swap space are used.
Note:
When 'check' isn't used the other parameters are ignored and only the output of top -n 1 -b -c and df -h -T will be reported.
Example:
- serverstatus.php
Sends the output of 'top -n 1 -b -c' and 'df -h -T' via email
- serverstatus.php check
Runs the tests from the config.ini and sends an email in case a problem was detected.
- serverstatus.php cpu check
Only tests whether the system load is above the cpu core count.
- serverstatus.php hdd:50 memory:10 check
tests:
a. whether more than 50% of hdd space are used on any hdd
and
b. whether less then 10% of the memory are still free