From 92555eb83585445eacf5fa4466bd280396e656a9 Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Thu, 28 Aug 2025 14:32:05 -0500 Subject: [PATCH] Add low shm warning to bottom bar (#19824) * Add low shm warning to bottom bar * change relevant link --- web/public/locales/en/views/system.json | 3 ++- web/src/hooks/use-stats.ts | 13 +++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/web/public/locales/en/views/system.json b/web/public/locales/en/views/system.json index 1357000c9..2732112cd 100644 --- a/web/public/locales/en/views/system.json +++ b/web/public/locales/en/views/system.json @@ -162,7 +162,8 @@ "reindexingEmbeddings": "Reindexing embeddings ({{processed}}% complete)", "cameraIsOffline": "{{camera}} is offline", "detectIsSlow": "{{detect}} is slow ({{speed}} ms)", - "detectIsVerySlow": "{{detect}} is very slow ({{speed}} ms)" + "detectIsVerySlow": "{{detect}} is very slow ({{speed}} ms)", + "shmTooLow": "/dev/shm allocation ({{total}} MB) should be increased to at least {{min}} MB." }, "enrichments": { "title": "Enrichments", diff --git a/web/src/hooks/use-stats.ts b/web/src/hooks/use-stats.ts index 566020b05..040dd7b1a 100644 --- a/web/src/hooks/use-stats.ts +++ b/web/src/hooks/use-stats.ts @@ -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) {