code wiki / _hdl_build / nx_apm_pulse.nx
nx_apm_pulse.nx
buildroot/runtime/_hdl_build/nx_apm_pulse.nx
about
nx_apm_pulse.nx -- SOVEREIGN active-monitoring cadence ("the New-Relic heartbeat"). Each cycle it
runs the collector (probe daemons -> append apm_collect.tsv) then the dashboard (regen apm_dashboard.html),
prints a heartbeat, and sleeps `interval` seconds. Thin orchestrator over two already-gated organs
(nx_apm_collect 5/5, nx_apm_dashboard 5/5) -- it sequences them on a timer; cycles=0 runs forever.
usage: nx_apm_pulse [interval_sec=30] [cycles=0(forever)] [ip=127.0.0.1] [collector_elf] [dashboard_elf]
ip=127.0.0.1 on the NAS (loopback) OR a.b.c.d to monitor over LAN. Run with CWD=nxc2 so the organs'
relative knowledge/status/ paths resolve. license_tier: ORIGINAL
dependencies 1 imports · 0 importers
imports: nx_syscalls.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 AP_COLLECT: *u8 = "_offc/nx_apm_collect.elf" |
| 12 | const AP_DASH: *u8 = "_offc/nx_apm_dashboard.elf" |
functions
| 14 | func ap_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } called by 1: ap_w |
| 15 | func ap_w(s: *u8) -> i64 { return sys_write(1, s, ap_slen(s)) } |
| 16 | func ap_wn(v: i64) -> i64 |
| 23 | func ap_atoi(s: *u8) -> i64 { var v: i64 = 0; var i: i64 = 0; while s[i] != (0 as u8) { let c: i64 = s[i] as i64; if c >= 48 { if c <= 57 { v = v*10 + (c-48) } } i = i + 1 } return v } called by 1: main |
| 26 | func ap_run(elf: *u8, arg1: *u8) -> i64 |
| 39 | func main(argc: i64, argv: *i64) -> i64 |