mirror of
https://github.com/Ysurac/openmptcprouter-vps-admin.git
synced 2025-02-12 10:31:52 +00:00
This commit is contained in:
parent
21d071ebec
commit
969a80125c
2 changed files with 10 additions and 1 deletions
6
debian/changelog
vendored
6
debian/changelog
vendored
|
@ -1,3 +1,9 @@
|
|||
omr-vps-admin (0.11+20240705) unstable; urgency=medium
|
||||
|
||||
* psutil.cpu_freq only available in psutil >5.1.0 put request in a try/except block
|
||||
|
||||
-- OpenMPTCProuter <contact@openmptcprouter.com> Fri, 05 Jul 2024 17:44:31 +0200
|
||||
|
||||
omr-vps-admin (0.11+20240704) unstable; urgency=medium
|
||||
|
||||
* Use subprocess for ss -M command
|
||||
|
|
|
@ -1371,7 +1371,10 @@ async def status(userid: Optional[int] = Query(None), username: Optional[str] =
|
|||
vps_disk_used = vps_disk.used
|
||||
vps_disk_free = vps_disk.free
|
||||
vps_disk_percent = vps_disk.percent
|
||||
vps_cpu_freq = psutil.cpu_freq().current
|
||||
try:
|
||||
vps_cpu_freq = psutil.cpu_freq().current
|
||||
except:
|
||||
vps_cpu_freq = None
|
||||
vps_cpu_model = os.popen("cat /proc/cpuinfo | awk -F: '/model name/ {print $2;exit}'").read().strip()
|
||||
vps_uptime = os.popen("cat /proc/uptime | awk '{print $1}'").read().rstrip()
|
||||
vps_hostname = socket.gethostname()
|
||||
|
|
Loading…
Reference in a new issue