mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-07-12 23:11:15 +03:00
Add error logs for Intel GPU stats
This commit is contained in:
parent
26e25c159d
commit
767853636c
@ -416,6 +416,11 @@ def get_intel_gpu_stats(
|
|||||||
|
|
||||||
snapshot_a = _read_intel_drm_fdinfo(target_pdev)
|
snapshot_a = _read_intel_drm_fdinfo(target_pdev)
|
||||||
if not snapshot_a:
|
if not snapshot_a:
|
||||||
|
logger.warning(
|
||||||
|
"Unable to collect Intel GPU stats: no DRM fdinfo entries found"
|
||||||
|
"%s. Check that /proc is readable and the i915/xe driver is loaded",
|
||||||
|
f" for pdev {target_pdev}" if target_pdev else "",
|
||||||
|
)
|
||||||
return None
|
return None
|
||||||
|
|
||||||
start = time.monotonic()
|
start = time.monotonic()
|
||||||
@ -424,6 +429,9 @@ def get_intel_gpu_stats(
|
|||||||
|
|
||||||
snapshot_b = _read_intel_drm_fdinfo(target_pdev)
|
snapshot_b = _read_intel_drm_fdinfo(target_pdev)
|
||||||
if not snapshot_b or elapsed_ns <= 0:
|
if not snapshot_b or elapsed_ns <= 0:
|
||||||
|
logger.warning(
|
||||||
|
"Unable to collect Intel GPU stats: second DRM fdinfo sample was empty"
|
||||||
|
)
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def _new_engine_pct() -> dict[str, float]:
|
def _new_engine_pct() -> dict[str, float]:
|
||||||
@ -464,6 +472,10 @@ def get_intel_gpu_stats(
|
|||||||
pid_pct[data_b["pid"]] = pid_pct.get(data_b["pid"], 0.0) + client_total
|
pid_pct[data_b["pid"]] = pid_pct.get(data_b["pid"], 0.0) + client_total
|
||||||
|
|
||||||
if not per_pdev_engine_pct:
|
if not per_pdev_engine_pct:
|
||||||
|
logger.warning(
|
||||||
|
"Unable to collect Intel GPU stats: no per-engine counters available "
|
||||||
|
"(i915 requires kernel >= 5.19)"
|
||||||
|
)
|
||||||
return None
|
return None
|
||||||
|
|
||||||
names = intel_gpu_name_resolver.get_names()
|
names = intel_gpu_name_resolver.get_names()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user