code wiki / _hdl_build / nx_clock_sitecheck.nx

nx_clock_sitecheck.nx

buildroot/runtime/_hdl_build/nx_clock_sitecheck.nx

2917 B30 linesdepth 22pulls 130 transitivereach 0 importersview sourcekind tooltopic clock
docsdependenciesstructsconstsfunctions

about

nx_clock_sitecheck.nx -- a NAS-APPROPRIATE clock job: probe the live site and record UP/DOWN. Unlike the local jobs (publisher_drain etc. operate on local data), a health probe is data-independent and BELONGS on the always-on server -- it is exactly the kind of periodic task the consolidated clock should run on the NAS. Uses the sovereign fetch stack (our DNS + TLS-1.3). Writes the latest status (truncate, so the file is always the current state) to sites/nishifamily/clock_health.txt (docroot, cwd=nishihost). CORRECTED 2026-08-06: this line named knowledge/status/sitecheck.txt, a path the code has never written -- and nx_schema_backfill derives tool descriptions from exactly this header line, so a stale header propagates into the registry as fact. license_tier: ORIGINAL expect_exit: 0

dependencies 2 imports · 0 importers

nx_fetch_unit.nx nx_syscalls.nx nx_clock_sitecheck.nx

imports: nx_fetch_unit.nxnx_syscalls.nx

imported by: nobody (leaf or entry point)

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

main sys_mmap nxa_die sys_write sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ sys_now_realtime_sec sys_mmap ↻ sys_clock_gettime_real cat catnum sys_mmap ↻ sys_openat_wr sys_write ↻ sys_close nx_fetch_staged nx_pem_trust_load_file sys_mmap ↻ sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_munmap sys_close ↻ nx_pem_trust_load nx_str_len _pem_find nx_str_len ↻ sys_mmap ↻

structs

none

consts

none

functions

9func w(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
calls 1: sys_write
10func cat(dst: *u8, o: i64, s: *u8) -> i64 { var x: i64=o; var i: i64=0; while s[i]!=(0 as u8){dst[x]=s[i];x=x+1;i=i+1} return x }
called by 1: main
11func catnum(dst: *u8, o: i64, v: i64) -> i64 { var x: i64=o; var m: i64=v; if m<0{dst[x]=45 as u8;x=x+1;m=0-m} if m==0{dst[x]=48 as u8;return x+1} let t:*u8=sys_mmap(24); var k:i64=0; while m>0{t[k]=(48+(m%10)) as u8;m=m/10;k=k+1} var j:i64=0; while j<k{dst[x]=t[k-1-j];x=x+1;j=j+1} return x }
called by 1: main calls 1: sys_mmap
13func main(argc: i64, argv: *i64) -> i64