feat(axelera): include Metis board temperature in npu_usages

Exposes the Metis temperature read (axcmd --board-temp) under
npu_usages so the /api/stats endpoint lists the NPU instead of
returning null. There is no utilization readout without the
axsystemserver broker, which cannot run alongside a live detector.
This commit is contained in:
patrykorwat 2026-08-19 13:11:46 +00:00
parent f1eef0da66
commit 24dc4edf51

View File

@ -340,6 +340,14 @@ async def set_npu_usages(config: FrigateConfig, all_stats: dict[str, Any]) -> No
# AXERA NPU usage
axcl_usage = get_axcl_npu_stats()
stats["axengine"] = axcl_usage
elif detector.type == "axelera":
# Axelera Metis: temperature from the board controller.
# There is no utilization readout without the axsystemserver
# broker, which cannot run alongside a live detector.
metis_temp = get_axelera_board_temp()
if metis_temp is not None:
stats["axelera"] = {"mem": "-%", "temp": metis_temp}
if stats:
all_stats["npu_usages"] = stats