Added Platform Information on Status Page

This commit is contained in:
DerLinkman
2023-05-02 16:08:58 +00:00
parent 6b65f0fc74
commit b5acf56e20
5 changed files with 23 additions and 5 deletions

View File

@@ -9,6 +9,7 @@ import os
import json
import asyncio
import redis
import platform
from datetime import datetime
import logging
from logging.config import dictConfig
@@ -485,7 +486,8 @@ async def get_host_stats(wait=5):
"swap": psutil.swap_memory()
},
"uptime": time.time() - psutil.boot_time(),
"system_time": system_time.strftime("%d.%m.%Y %H:%M:%S")
"system_time": system_time.strftime("%d.%m.%Y %H:%M:%S"),
"architecture": platform.machine()
}
redis_client.set('host_stats', json.dumps(host_stats), ex=10)