Skip to content

Commit 92555eb

Browse files
authored
Add low shm warning to bottom bar (#19824)
* Add low shm warning to bottom bar * change relevant link
1 parent a2ba4e4 commit 92555eb

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

web/public/locales/en/views/system.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,8 @@
162162
"reindexingEmbeddings": "Reindexing embeddings ({{processed}}% complete)",
163163
"cameraIsOffline": "{{camera}} is offline",
164164
"detectIsSlow": "{{detect}} is slow ({{speed}} ms)",
165-
"detectIsVerySlow": "{{detect}} is very slow ({{speed}} ms)"
165+
"detectIsVerySlow": "{{detect}} is very slow ({{speed}} ms)",
166+
"shmTooLow": "/dev/shm allocation ({{total}} MB) should be increased to at least {{min}} MB."
166167
},
167168
"enrichments": {
168169
"title": "Enrichments",

web/src/hooks/use-stats.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,19 @@ export default function useStats(stats: FrigateStats | undefined) {
3232
return problems;
3333
}
3434

35+
// check shm level
36+
const shm = memoizedStats.service.storage["/dev/shm"];
37+
if (shm?.total && shm?.min_shm && shm.total < shm.min_shm) {
38+
problems.push({
39+
text: t("stats.shmTooLow", {
40+
total: shm.total,
41+
min: shm.min_shm,
42+
}),
43+
color: "text-danger",
44+
relevantLink: "/system#storage",
45+
});
46+
}
47+
3548
// check detectors for high inference speeds
3649
Object.entries(memoizedStats["detectors"]).forEach(([key, det]) => {
3750
if (det["inference_speed"] > InferenceThreshold.error) {

0 commit comments

Comments
 (0)