Simple exemple

#!/usr/bin/env pythonimportos,sys(d1,d2,d3)=os.getloadavg()ifd1>=5.0:print"GETLOADAVG CRITICAL: Load average is %.2f"%(d1)sys.exit(2)elifd1>=2.0:print"GETLOADAVG WARNING: Load average is %.2f"%(d1)sys.exit(1)else:print"GETLOADAVG OK: Load average is %.2f"%(d1)sys.exit(0)