mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-04 02:05:21 +03:00
wip
This commit is contained in:
parent
2c02459bd6
commit
0f10831a0d
@ -818,16 +818,16 @@ def get_cpu_stats() -> dict[str, dict]:
|
|||||||
try:
|
try:
|
||||||
|
|
||||||
if docker_memlimit > 0:
|
if docker_memlimit > 0:
|
||||||
memRes = int(stats[5])
|
mem_res = int(stats[5])
|
||||||
memPct = str(
|
mem_pct = str(
|
||||||
round((float(memRes) / float(docker_memlimit)) * 100, 1)
|
round((float(mem_res) / float(docker_memlimit)) * 100, 1)
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
memPct = stats[9]
|
mem_pct = stats[9]
|
||||||
|
|
||||||
usages[stats[0]] = {
|
usages[stats[0]] = {
|
||||||
"cpu": stats[8],
|
"cpu": stats[8],
|
||||||
"mem": memPct,
|
"mem": mem_pct,
|
||||||
}
|
}
|
||||||
except:
|
except:
|
||||||
continue
|
continue
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user