加入了LOGO,
This commit is contained in:
@@ -11,6 +11,8 @@ from collections import deque
|
||||
# 创建系统信息蓝图
|
||||
system_bp = Blueprint('system', __name__)
|
||||
logger = logging.getLogger("SystemBlueprint")
|
||||
# 记录应用启动时间
|
||||
APP_START_TIME = time.time()
|
||||
|
||||
# 页面路由
|
||||
@system_bp.route('/wx_logs')
|
||||
@@ -31,7 +33,7 @@ def api_system_info():
|
||||
"cpu_usage": psutil.cpu_percent(),
|
||||
"memory_usage": psutil.virtual_memory().percent,
|
||||
"disk_usage": psutil.disk_usage('/').percent,
|
||||
"uptime": time.time() - psutil.boot_time(),
|
||||
"uptime": time.time() - APP_START_TIME, # 使用应用启动时间计算运行时长
|
||||
"timestamp": datetime.now().strftime("%Y-%m-%d %H:%M:%S")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user