code wiki / _hdl_build / nx_clock_sitecheck.nx

nx_clock_sitecheck.nx

buildroot/runtime/_hdl_build/nx_clock_sitecheck.nx

2645 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 knowledge/status/sitecheck.txt. 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 sys_now_realtime_sec sys_mmap ↻ sys_clock_gettime_real cat catnum sys_mmap ↻ sys_openat_wr sys_write sys_close nx_fetch_staged trust_store_alloc sys_mmap ↻ nx_pem_trust_load_file sys_mmap ↻ sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close ↻ nx_pem_trust_load nx_str_len _pem_find nx_str_len ↻ sys_mmap ↻ b64_decode b64_grab b64_dec_char x509_parse sys_mmap ↻ asn1_cursor_init asn1_expect_tag sys_mmap ↻ asn1_read_tlv_header asn1_read_length x509_read_tlv sys_mmap ↻ asn1_expect_tag ↻

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