mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-21 19:07:46 +01:00
Make error messages for gpu stats more clear (#4962)
* Make error messages for gpu stats more clear * Make error messages for gpu stats more clear
This commit is contained in:
parent
5f4c439f57
commit
61243ad34b
@ -780,7 +780,7 @@ def get_amd_gpu_stats() -> dict[str, str]:
|
|||||||
)
|
)
|
||||||
|
|
||||||
if p.returncode != 0:
|
if p.returncode != 0:
|
||||||
logger.error(p.stderr)
|
logger.error(f"Unable to poll radeon GPU stats: {p.stderr}")
|
||||||
return None
|
return None
|
||||||
else:
|
else:
|
||||||
usages = p.stdout.split(",")
|
usages = p.stdout.split(",")
|
||||||
@ -816,7 +816,7 @@ def get_intel_gpu_stats() -> dict[str, str]:
|
|||||||
|
|
||||||
# timeout has a non-zero returncode when timeout is reached
|
# timeout has a non-zero returncode when timeout is reached
|
||||||
if p.returncode != 124:
|
if p.returncode != 124:
|
||||||
logger.error(p.stderr)
|
logger.error(f"Unable to poll intel GPU stats: {p.stderr}")
|
||||||
return None
|
return None
|
||||||
else:
|
else:
|
||||||
reading = "".join(p.stdout.split())
|
reading = "".join(p.stdout.split())
|
||||||
@ -866,7 +866,7 @@ def get_nvidia_gpu_stats() -> dict[str, str]:
|
|||||||
)
|
)
|
||||||
|
|
||||||
if p.returncode != 0:
|
if p.returncode != 0:
|
||||||
logger.error(p.stderr)
|
logger.error(f"Unable to poll nvidia GPU stats: {p.stderr}")
|
||||||
return None
|
return None
|
||||||
else:
|
else:
|
||||||
usages = p.stdout.split("\n")[1].strip().split(",")
|
usages = p.stdout.split("\n")[1].strip().split(",")
|
||||||
|
Loading…
Reference in New Issue
Block a user