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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 15 additions and 1 deletions

View File

@ -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",

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) {