mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-03 17:55:21 +03:00
Make names more clear
This commit is contained in:
parent
94766f511b
commit
0d8349fdd9
@ -331,17 +331,17 @@ class FrigateApp:
|
|||||||
self.frigate_watchdog.start()
|
self.frigate_watchdog.start()
|
||||||
|
|
||||||
def check_shm(self) -> None:
|
def check_shm(self) -> None:
|
||||||
current_shm = round(shutil.disk_usage("/dev/shm").total / 1000000, 1)
|
available_shm = round(shutil.disk_usage("/dev/shm").total / 1000000, 1)
|
||||||
calculated_shm = 30
|
min_req_shm = 30
|
||||||
|
|
||||||
for _, camera in self.config.cameras.items():
|
for _, camera in self.config.cameras.items():
|
||||||
calculated_shm += round(
|
min_req_shm += round(
|
||||||
(camera.detect.width * camera.detect.height * 1.5 * 9 + 270480)
|
(camera.detect.width * camera.detect.height * 1.5 * 9 + 270480)
|
||||||
/ 1048576,
|
/ 1048576,
|
||||||
1,
|
1,
|
||||||
)
|
)
|
||||||
|
|
||||||
if calculated_shm < current_shm:
|
if available_shm < min_req_shm
|
||||||
logger.warning(
|
logger.warning(
|
||||||
f"The current SHM size of {current_shm}MB is too small, recommend increasing it to at least {calculated_shm}MB."
|
f"The current SHM size of {current_shm}MB is too small, recommend increasing it to at least {calculated_shm}MB."
|
||||||
)
|
)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user