Add pi3b hardware tier and resource guards for condo Pi deployment
- Add pi3b tier (700MB RAM limit, 8 passive/2 active modules, no bettercap/mitmproxy) - Update detect_hardware_tier() to detect Raspberry Pi 3B by model string and BCM2837 - Add pi3b section to hardware_tiers.yaml - Add systemd MemoryMax/CPUQuota/OOMScoreAdj to all three service files - Fix bigbrother-watchdog.service ExecStart (was calling non-existent ResourceMonitor().run()) - Add scripts/run_watchdog.py as standalone health monitor daemon
This commit is contained in:
+16
-1
@@ -37,6 +37,14 @@ HARDWARE_TIERS = {
|
||||
"allow_mitmproxy": True,
|
||||
"allow_bettercap": True,
|
||||
},
|
||||
"pi3b": {
|
||||
"max_passive": 8,
|
||||
"max_active": 2,
|
||||
"max_ram_mb": 700, # 900MB total - ~200MB OS overhead
|
||||
"max_cpu_pct": 75,
|
||||
"allow_mitmproxy": False,
|
||||
"allow_bettercap": False,
|
||||
},
|
||||
"pi_zero": {
|
||||
"max_passive": 4,
|
||||
"max_active": 0,
|
||||
@@ -78,9 +86,16 @@ def detect_hardware_tier() -> str:
|
||||
if "allwinner" in cpuinfo and "h618" in cpuinfo:
|
||||
return "opi_zero3"
|
||||
|
||||
if "raspberry pi zero 2" in model or "bcm2710" in cpuinfo:
|
||||
if "raspberry pi zero 2" in model:
|
||||
return "pi_zero"
|
||||
|
||||
if "raspberry pi 3" in model:
|
||||
return "pi3b"
|
||||
|
||||
# BCM2710/BCM2837 without a clear model string — Pi 3B family
|
||||
if "bcm2837" in cpuinfo or ("bcm2710" in cpuinfo and "raspberry pi zero 2" not in model):
|
||||
return "pi3b"
|
||||
|
||||
return "generic"
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user