| Server IP : 198.38.94.13 / Your IP : 216.73.217.33 Web Server : Apache System : Linux d4744.dxb1.stableserver.net 5.14.0-611.49.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Apr 21 16:39:08 EDT 2026 x86_64 User : revivere ( 1140) PHP Version : 8.2.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /usr/lib64/nagios/plugins/ |
Upload File : |
#!/usr/bin/env python3
from subprocess import check_output
from sys import exit
average_load = float(check_output("(uptime | awk '{print $10+0}')", shell=True))
cpu_count = int(check_output("nproc", shell=True))
if average_load >= (cpu_count * 1.8):
print("CRITICAL: Load %d/%d" % (average_load, cpu_count))
exit(2)
else:
print("OK: Load Averages %d/%d" % (average_load, cpu_count))
exit(0)