nx_vsz_watchdog.nx
buildroot/runtime/nx_vsz_watchdog.nx
about
nx_vsz_watchdog.nx -- ONE-SHOT VSZ watchdog CLI (cron/piggyback-invoked): kills a conf-listed daemon whose
VSZ crossed its threshold so the nx_hostctl guard respawns it FRESH -- automating the proven manual fix for
outage MODE 2 (VSZ-bloat -> fork-fail -> child-exec silently empty; mgmt hit 160GB, restart -> 4.2GB and the
exact failed /api/unpack succeeded). DEATH-DECIDER ONLY: respawn is the guard's (no dueling supervisors).
usage: nx_vsz_watchdog [conf] [dry] conf default "vsz_watchdog.conf" rows: <cmdline-needle> <max_gb>
FAIL-SAFE: no conf -> INERT exit 0; parse failure -> row dropped; unreadable status -> skip; cooldown 600s
per row; never kills pid<=300 or itself. Always exits 0 (a watchdog must never fail the cron).
license_tier: ORIGINAL expect_exit: 0
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_vsz_watchdog_core.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 11 | const K_MAGIC_8192: i64 = 8192 |
| 12 | const K_MAGIC_8191: i64 = 8191 |
| 13 | const K_MAGIC_65536: i64 = 65536 |
functions
| 15 | func w_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } |
| 16 | func w_putn(v: i64) -> i64 |
| 26 | func w_streq(a: *u8, b: *u8) -> i64 called by 1: main |
| 33 | func w_cd_path(idx: i64, out: *u8) -> i64 |
| 45 | func w_cd_read(idx: i64) -> i64 |
| 56 | func w_cd_write(idx: i64, now: i64) -> i64 |
| 75 | func main(argc: i64, argv: *i64) -> i64 |