MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / _get_status_level

Method _get_status_level

resource_monitor.py:205–212  ·  view source on GitHub ↗

Determine status level (ok, warning, critical) based on value and thresholds

(self, value, warning_threshold, critical_threshold)

Source from the content-addressed store, hash-verified

203 'healthy': True # Fail open if we can't check
204 }
205
206 def get_power_status(self):
207 """Raspberry Pi power health from the SoC's throttle register.
208
209 Matters because Ragnar's own peripherals cause the failure: USB Wi-Fi
210 adapters (an Alfa draws ~0.5-1 A) can pull the 5 V rail below spec, and
211 an under-volting Pi resets the whole board — which presents as "Ragnar
212 crashed" with nothing in the logs, because the OS never got to write
213 any. Without this the condition is invisible.
214
215 Returns {'supported', 'undervoltage_now', 'undervoltage_occurred',

Callers 1

get_system_statusMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected