优化IO问题
This commit is contained in:
@@ -41,7 +41,8 @@ def api_system_info():
|
||||
"memory_usage": psutil.virtual_memory().percent,
|
||||
"disk_usage": psutil.disk_usage('/').percent,
|
||||
"uptime": time.time() - APP_START_TIME, # 使用应用启动时间计算运行时长
|
||||
"timestamp": datetime.now().strftime("%Y-%m-%d %H:%M:%S")
|
||||
"timestamp": datetime.now().strftime("%Y-%m-%d %H:%M:%S"),
|
||||
"open_files": psutil.Process(os.getpid()).open_files()
|
||||
}
|
||||
|
||||
return jsonify({"success": True, "data": system_info})
|
||||
|
||||
@@ -177,6 +177,7 @@
|
||||
Python版本: {% raw %}{{ systemInfo.python_version }}{% endraw %} |
|
||||
运行时间: {% raw %}{{ formattedUptime }}{% endraw %} |
|
||||
最后更新: {% raw %}{{ systemInfo.timestamp }}{% endraw %}
|
||||
打开文件数: {% raw %}{{ systemInfo.open_files }}{% endraw %}
|
||||
</span>
|
||||
</div>
|
||||
<el-row :gutter="20">
|
||||
|
||||
Reference in New Issue
Block a user