File manager - Edit - /usr/lib64/nagios/plugins/check_load.py
Back
#!/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)
| ver. 1.4 |
Github
|
.
| PHP 8.2.30 | Generation time: 0 |
proxy
|
phpinfo
|
Settings