This commit is contained in:
dami
2025-04-15 23:49:42 +08:00
parent 00d3aaeb22
commit 3029f8d263
3 changed files with 21 additions and 12 deletions
+16 -12
View File
@@ -436,18 +436,22 @@ def runInfo():
data['Waiting'] = tmp[15]
return mw.getJson(data)
except Exception as e:
url = 'http://' + mw.getHostAddr() + ':%s/nginx_status' % port
result = mw.httpGet(url)
tmp = result.split()
data = {}
data['active'] = tmp[2]
data['accepts'] = tmp[9]
data['handled'] = tmp[7]
data['requests'] = tmp[8]
data['Reading'] = tmp[11]
data['Writing'] = tmp[13]
data['Waiting'] = tmp[15]
return mw.getJson(data)
try:
url = 'http://' + mw.getHostAddr() + ':%s/nginx_status' % port
result = mw.httpGet(url)
tmp = result.split()
data = {}
data['active'] = tmp[2]
data['accepts'] = tmp[9]
data['handled'] = tmp[7]
data['requests'] = tmp[8]
data['Reading'] = tmp[11]
data['Writing'] = tmp[13]
data['Waiting'] = tmp[15]
return mw.getJson(data)
except Exception as e:
return mw.returnJson(False, "oprenresty异常!")
except Exception as e:
return mw.returnJson(False, "oprenresty not started!")
+2
View File
@@ -5,6 +5,8 @@ export PATH
# cd /Users/midoks/Desktop/mwdev/server/mdserver-web/plugins/openresty && bash install.sh install 1.21.4
# cd /www/server/mdserver-web/plugins/openresty && bash install.sh install 1.21.4
# cd /www/server/mdserver-web && python3 plugins/openresty/index.py run_info
curPath=`pwd`
rootPath=$(dirname "$curPath")
rootPath=$(dirname "$rootPath")