function checkvip() { $openid = $_REQUEST['openid']; $rs = check_vip($openid); if ($rs) { $json['status'] = 1; } else { $redirec_url = "http://a.forcent.cn/ldh/exchange.php/Jiyuedu"; $url = checkFans($openid, $redirec_url, 1); $json['status'] = 0; $json['info'] = $url; } $this->ajaxReturn($json); }
// possible output strings $criticals = ""; $warnings = ""; $unknowns = ""; $normals = ""; // set default values for command line arguments $cmdargs = ['port' => '161', 'log_level' => LOG__NONE, 'memwarn' => 80, 'memcrit' => 90, 'reboot' => 3600, 'thres-cpu-1sec' => '95,98', 'thres-cpu-5sec' => '85,95', 'thres-cpu-1min' => '70,90']; // parse the command line arguments parseArguments(); //print_r( $cmdargs ); die(); require 'OSS_SNMP/OSS_SNMP/SNMP.php'; $snmp = new \OSS_SNMP\SNMP($cmdargs['host'], $cmdargs['community']); checkCPU(); checkReboot(); checkPower(); checkFans(); checkTemperature(); checkMemory(); checkOthers(); if ($status == STATUS_OK) { $msg = "OK -{$normals}\n"; } else { $msg = "{$criticals}{$warnings}{$unknowns}\n"; } echo $msg; exit($status); /** * Checks the chassis temperature * */ function checkTemperature()