code wiki / _hdl_build / nx_netobs.nx

nx_netobs.nx

buildroot/runtime/_hdl_build/nx_netobs.nx

55636 B1206 linesdepth 5pulls 10 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_netobs.nx -- SOVEREIGN NET/HOST OBSERVABILITY + CLOSED-LOOP BENCH (operator 2026-07-20: "make sure our networking and hosting is state of the art ... sovereign version of the Prometheus/Telegraf/ Grafana/k6/analyzer stack, largest rock down"). One drift-immune organ (imports ONLY nx_syscalls): (no-arg|beat) clock-beat: 2s-window host counters (/proc: cpu,mem,load,net,tcp-snmp) + per-service loopback latency probes (manifest-driven) -> METRIC rows (ledger, rotated) -> page. burst <n> <ms> high-frequency sampler (operator's sub-second ask, bounded envelope) -> same series. page emit sites/nishifamily/netobs.html: CORRELATIVE aligned-timeline SVG rows (Grafana role). bench <conc> <total> <port> <path> sovereign loadgen (k6 role): fork workers, loopback-ONLY by construction, p50/p90/p95/p99 percentiles + rps -> ledger + netobs_bench.log. verdict analyzer (closed-loop brain): thresholds from knowledge/registry/netobs_thresholds.tsv (rule 11: NO magic numbers in code) vs latest ledger samples -> netobs_gate.log VERDICT=GREEN|RED (deploy_ready/cron_watch evidence-pointer format). selftest KAT teeth (cpu-parse bounds, percentile KAT, ledger roundtrip, probe). Ledger: knowledge/status/netobs_metrics.log, METRIC line protocol (contract-compatible with nx_metric_ledger; ADDITIVE ts=<epoch> field). Rotation at 3MiB -> .1 (bounded, declared). Rule 26: ZERO hardware writes -- /proc,/sys READS only; tuning half emits RECOMMENDATIONS, never sysctl. Envelopes DECLARED IN OUTPUT (scale law): beat=2s-window, probes<=16, probe-timeout=5s, page=12h/720pt, bench conc<=64 total<=100000 loopback-only, burst n<=600 ms>=200, ledger-rot=3MiB. CONFIG = SOVEREIGN SEG-STORE PLANES (no-tsv law, operator emphatic 2026-06-21/07-20): probes + thresholds live in knowledge/store/netobs-probes- / netobs-thresholds- (read via sts_load = the canonical store-seed codec); `seedcfg` migrates the retired .tsv in one-time; a .tsv read remains ONLY as a zero-downtime fallback. license_tier: ORIGINAL expect_exit: 0

dependencies 4 imports · 0 importers

nx_sovjson_lib.nx nx_connect.nx nx_syscalls.nx nx_store_seed_lib.nx nx_netobs.nx

imports: nx_sovjson_lib.nxnx_connect.nxnx_syscalls.nxnx_store_seed_lib.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main no_beat sys_now_realtime_sec sys_mmap sys_clock_gettime_real sys_mmap ↻ no_cpu sys_mmap ↻ no_read sys_openat_rd sys_read sys_close no_line_end no_netdev sys_mmap ↻ no_read ↻ no_line_end ↻ no_tokn no_snmp sys_mmap ↻ no_read ↻ no_line_end ↻ no_tokn ↻ sys_clock_now_us sys_now_us sys_mmap ↻ sys_clock_gettime_mono sys_sleep_ms sys_mmap ↻ sys_munmap sys_now_us ↻ no_mrow no_cat sj_cat no_catn sj_catn sys_mmap ↻ no_mem_avail_mb sys_mmap ↻ no_read ↻

structs

none

consts

27const NO_MAGIC_65536: i64 = 65536
28const NO_MAGIC_65535: i64 = 65535
29const NO_MAGIC_1024: i64 = 1024
30const NO_MAGIC_2000: i64 = 2000
31const NO_MAGIC_131072: i64 = 131072
32const NO_MAGIC_1048576: i64 = 1048576
33const NO_MAGIC_65000: i64 = 65000
34const NO_MAGIC_2097152: i64 = 2097152
35const NO_MAGIC_2097151: i64 = 2097151
36const NO_MAGIC_1000000000: i64 = 1000000000
37const NO_MAGIC_50000: i64 = 50000
38const NO_MAGIC_4096: i64 = 4096
39const NO_MAGIC_7777: i64 = 7777
40const NO_MAGIC_1111: i64 = 1111
41const NO_MAGIC_8888: i64 = 8888
42const NO_MAGIC_2222: i64 = 2222
43const NO_MAGIC_4095: i64 = 4095
44const NO_MAGIC_8443: i64 = 8443
45const NO_MAGIC_18090: i64 = 18090
47const NO_CAP: i64 = 4194304
48const NO_ROT: i64 = 3145728
49const NO_WIN: i64 = 43200
50const NO_PTS: i64 = 720
51const NO_PROBES_MAX: i64 = 16
52const NO_BENCH_CONC_MAX: i64 = 64
53const NO_BENCH_TOTAL_MAX: i64 = 100000
54const NO_BURST_N_MAX: i64 = 600
55const NO_BURST_MS_MIN: i64 = 200
56const NO_DRAIN_CAP: i64 = 262144
57const NO_TMO_S: i64 = 5

functions

59func no_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 2: no_wno_num_after
60func no_w(s: *u8) -> i64 { let n: i64 = no_len(s); sys_write(1, s, n); return 0 }
61func no_cat(d: *u8, o: i64, s: *u8) -> i64 { return sj_cat(d, o, s) }
62func no_catn(d: *u8, o: i64, v: i64) -> i64 { return sj_catn(d, o, v) }
63func no_wn(v: i64) -> i64 { let b: *u8 = sys_mmap(32); let o: i64 = no_catn(b, 0, v); sys_write(1, b, o); return 0 }
64func no_eq(a: *u8, b: *u8) -> i64 { var i: i64 = 0; var g: i64 = 1; var r: i64 = 1; while g == 1 { if a[i] != b[i] { r = 0; g = 0 } else { if a[i] == (0 as u8) { g = 0 } else { i = i + 1 } } } return r }
called by 1: main
65func no_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
66func no_read(path: *u8, buf: *u8, cap: i64) -> i64
76func no_load_cfg(plane: *u8, tsv: *u8, buf: *u8, cap: i64) -> i64
81func no_wfd(fd: i64, buf: *u8, n: i64) -> i64 { var w: i64 = 0; while w < n { let src: *u8 = ((buf as i64) + w) as *u8; let r: i64 = sys_write(fd, src, n - w); if r <= 0 { w = n } else { w = w + r } } return 0 }
83func no_atomic(path: *u8, buf: *u8, n: i64) -> i64
96func no_append(path: *u8, buf: *u8, n: i64) -> i64
104func no_fsize(path: *u8) -> i64
called by 1: no_beat calls 2: sys_mmapsys_fstatat
112func no_num_after(buf: *u8, n: i64, marker: *u8) -> i64
134func no_line_end(q: *u8, i: i64, n: i64) -> i64 { var e: i64 = i; var s: i64 = 1; while s == 1 { if e >= n { s = 0 } else { if q[e] == (10 as u8) { s = 0 } else { e = e + 1 } } } return e }
136func no_col(q: *u8, ls: i64, le: i64, c: i64, out: *i64) -> i64
152func no_cstr(q: *u8, s: i64, e: i64, dst: *u8) -> i64 { var i: i64 = 0; while s + i < e { dst[i] = q[s+i]; i = i + 1 } dst[i] = 0 as u8; return i }
153func no_span_atoi(q: *u8, s: i64, e: i64) -> i64 { var v: i64 = 0; var i: i64 = s; while i < e { let c: i64 = q[i] as i64; if c >= 48 { if c <= 57 { v = v * 10 + (c - 48) } } i = i + 1 } return v }
155func no_tokn(q: *u8, p0: i64, le: i64, nth: i64) -> i64
called by 2: no_netdevno_snmp
177func no_cpu(out: *i64) -> i64
204func no_mem_avail_mb() -> i64
called by 1: no_beat calls 3: sys_mmapno_readno_num_after
212func no_load_milli() -> i64
called by 1: no_beat calls 2: sys_mmapno_read
225func no_netdev(out: *i64) -> i64
261func no_snmp(out: *i64) -> i64
310func no_probe(port: i64, path: *u8, mode: i64, out: *i64, scr: *u8) -> i64
352func no_req(port: i64, path: *u8, scr: *u8) -> i64
363func no_mrow(lb: *u8, o: i64, name: *u8, tu: i64, ts: i64, val: i64, unit: *u8) -> i64
378func no_last(buf: *u8, n: i64, name: *u8, out: *i64) -> i64
406func no_series(buf: *u8, n: i64, name: *u8, ts0: i64, xs: *i64, ys: *i64, maxp: i64) -> i64
447func no_sift(a: *i64, n: i64, i0: i64) -> i64
called by 1: no_sort
460func no_sort(a: *i64, n: i64) -> i64
called by 2: no_bench_runno_selftest calls 1: no_sift
468func no_pct(a: *i64, n: i64, p: i64) -> i64 { if n <= 0 { return 0 - 1 } let ix: i64 = ((n - 1) * p) / 100; return a[ix] }
471func no_beat(do_page: i64) -> i64
597func no_burst(n: i64, ms: i64) -> i64
656func no_svg_series(pg: *u8, po: i64, buf: *u8, n: i64, name: *u8, unit: *u8, ts0: i64, tsN: i64) -> i64
698func no_page() -> i64
773func no_bench_run(conc: i64, total: i64, port: i64, path: *u8, res: *i64) -> i64
880func no_ramp(port: i64, path: *u8, target_us: i64) -> i64
966func no_bench(conc: i64, total: i64, port: i64, path: *u8) -> i64
1025func no_verdict() -> i64
1092func no_selftest() -> i64
1142func no_seedcfg() -> i64
1169func main(argc: i64, argv: *i64) -> i64