服务器负载状态

This commit is contained in:
“wanyongkang”
2022-02-23 17:47:01 +08:00
parent 6aa5d43575
commit 9322ae2e0d

View File

@@ -5,7 +5,7 @@
* @Author: kangkang
* @Date: 2020-11-03 11:04:15
* @LastEditors: Please set LastEditors
* @LastEditTime: 2021-11-22 17:26:17
* @LastEditTime: 2022-02-23 17:46:48
*/
$is_script = 1;
include_once __DIR__ . '/../../index.php';
@@ -511,6 +511,17 @@ function mogu_getList($data, &$file, &$all )
}
$key = $city_name[0];
// 负载状态
$status = '正常';
if ($info['online'] > $info['allline']) {
$status = '超载';
} else if ($info['online'] == $info['allline']) {
$status = '满载';
} else {
$status = '正常';
}
$record['city'] = $city_name[1];
$record['supply'] = $info['yunying'];
@@ -519,7 +530,7 @@ function mogu_getList($data, &$file, &$all )
$record['onlineuser'] = '';
$record['maxuser'] = '';
$record['online'] = $info['status'];
$record['status'] = '';
$record['status'] = $status;
$record['nasname'] = $info['address'];
$list1[$key][] = $record;
}