Add low shm warning to bottom bar (#19824)

* Add low shm warning to bottom bar

* change relevant link
This commit is contained in:
Josh Hawkins
2025-08-28 14:32:05 -05:00
committed by GitHub
parent a2ba4e4e39
commit 92555eb835
2 changed files with 15 additions and 1 deletions

View File

@@ -32,6 +32,19 @@ export default function useStats(stats: FrigateStats | undefined) {
return problems;
}
// check shm level
const shm = memoizedStats.service.storage["/dev/shm"];
if (shm?.total && shm?.min_shm && shm.total < shm.min_shm) {
problems.push({
text: t("stats.shmTooLow", {
total: shm.total,
min: shm.min_shm,
}),
color: "text-danger",
relevantLink: "/system#storage",
});
}
// check detectors for high inference speeds
Object.entries(memoizedStats["detectors"]).forEach(([key, det]) => {
if (det["inference_speed"] > InferenceThreshold.error) {