code wiki / _hdl_build / nx_hostctl.nx
nx_hostctl.nx
buildroot/runtime/_hdl_build/nx_hostctl.nx
about
nx_hostctl.nx -- the PURE-NISHI host control plane (operator: "no .sh or any non nishi stuff in the
mix... pure enterprise S-class hosting and deployment"). Retires nishi_supervisor.sh. Two subcommands,
argv-driven, all via sovereign syscalls -- NO shell, NO cp/mv/pkill:
supervise : fork/execve the sites daemon, record its PID, wait4; respawn on death (crash OR deploy-kill).
deploy : atomically publish the staged *.new artifacts (sys_renameat), +x the new binary (nx_chmod),
then nx_kill the running daemon -> supervise respawns the NEW binary. Brief restart only
(FD-passing/SCM_RIGHTS is the future zero-downtime rung). CONTENT hot-update needs NO deploy:
the router serves the doc-root file per request, so pushing index.html is live next request.
selftest : LOCAL Engineer gate of the deploy primitives (atomic rename + pidfile + kill) -- no NAS.
license_tier: ORIGINAL
SUPERVISION UPGRADE 2026-06-16 (closes hosting_research gaps #5 health-probe + #4 restart-loop-guard):
cmd_supervise no longer trusts PID-liveness alone. For PLAINTEXT daemons it BLACK-BOX health-probes the
port (nx_health_probe) and restarts a HUNG daemon (process up + bound but not serving) -- the failure
systemd PID-liveness and a LISTEN check both miss. Every restart (crash OR hang) is gated by the
crash-loop guard (nx_restart_guard) so a daemon that keeps dying/wedging backs off instead of spinning.
The TLS daemon (sites.elf:8443) stays PID-only -- a plaintext GET to a TLS port would false-HUNG; a
TLS-aware serving probe is the next rung (noted, not faked).
dependencies 7 imports · 1 importers
imports: nx_syscalls.nxnx_connect.nxnx_health_probe.nxnx_restart_guard.nxnx_os_introspect.nxnx_fd_hygiene.nxnx_proc_snapshot.nx
imported by: nx_hostctl_supervise_gate.nx
structs
| none |
consts
| 29 | const HC_CRAWL_STALE_S: i64 = 600 |
| 30 | const HC_MAGIC_65536: i64 = 65536 |
| 31 | const HC_MAGIC_8192: i64 = 8192 |
| 32 | const HC_MAGIC_60000: i64 = 60000 |
| 33 | const HC_MAGIC_300000: i64 = 300000 |
| 34 | const HC_MAGIC_8791: i64 = 8791 |
| 35 | const HC_MAGIC_5000: i64 = 5000 |
| 36 | const HC_MAGIC_5000000: i64 = 5000000 |
| 37 | const HC_MAGIC_300000000: i64 = 300000000 |
| 38 | const HC_MAGIC_4096: i64 = 4096 |
| 39 | const HC_MAGIC_8443: i64 = 8443 |
| 40 | const HC_MAGIC_18791: i64 = 18791 |
| 41 | const HC_MAGIC_18190: i64 = 18190 |
| 42 | const HC_MAGIC_18090: i64 = 18090 |
| 43 | const HC_MAGIC_8080: i64 = 8080 |
| 44 | const HC_MAGIC_18793: i64 = 18793 |
| 45 | const HC_MAGIC_18098: i64 = 18098 |
| 46 | const HC_MAGIC_18456: i64 = 18456 |
| 47 | const HC_MAGIC_8456: i64 = 8456 |
| 48 | const HC_MAGIC_15274: i64 = 15274 |
| 49 | const HC_MAGIC_18465: i64 = 18465 |
| 50 | const HC_MAGIC_18466: i64 = 18466 |
| 51 | const HC_MAGIC_8446: i64 = 8446 |
| 52 | const HC_MAGIC_18096: i64 = 18096 |
| 53 | const HC_MAGIC_16384: i64 = 16384 |
| 54 | const HC_MAGIC_7443: i64 = 7443 |
| 55 | const HC_MAGIC_18792: i64 = 18792 |
| 56 | const HC_MAGIC_9091: i64 = 9091 |
| 57 | const HC_MAGIC_8097: i64 = 8097 |
| 58 | const HC_MAGIC_18795: i64 = 18795 |
| 59 | const HC_MAGIC_18794: i64 = 18794 |
| 60 | const HC_MAGIC_18796: i64 = 18796 |
| 61 | const HC_MAGIC_18797: i64 = 18797 |
| 62 | const HC_MAGIC_18099: i64 = 18099 |
| 63 | const HC_MAGIC_18097: i64 = 18097 |
| 64 | const HC_MAGIC_18120: i64 = 18120 |
| 65 | const HC_MAGIC_7702: i64 = 7702 |
| 66 | const HC_MAGIC_6881: i64 = 6881 |
| 67 | const HC_MAGIC_8445: i64 = 8445 |
| 68 | const HC_MAGIC_8027: i64 = 8027 |
| 69 | const HC_MAGIC_8028: i64 = 8028 |
| 70 | const HC_MAGIC_8102: i64 = 8102 |
| 71 | const HC_MAGIC_8029: i64 = 8029 |
| 72 | const HC_MAGIC_8055: i64 = 8055 |
| 73 | const HC_MAGIC_8447: i64 = 8447 |
| 74 | const HC_MAGIC_1195: i64 = 1195 |
| 75 | const HC_MAGIC_5080: i64 = 5080 |
| 76 | const HC_MAGIC_15000: i64 = 15000 |
| 77 | const HC_MAGIC_1500: i64 = 1500 |
| 78 | const HC_MAGIC_2500: i64 = 2500 |
| 79 | const HC_MAGIC_4000: i64 = 4000 |
| 80 | const HC_MAGIC_1200: i64 = 1200 |
| 81 | const HC_MAGIC_2000: i64 = 2000 |
| 82 | const HC_MAGIC_131072: i64 = 131072 |
| 83 | const HC_MAGIC_3600000: i64 = 3600000 |
| 84 | const HC_MAGIC_262144: i64 = 262144 |
| 85 | const HC_MAGIC_2048: i64 = 2048 |
| 86 | const HC_MAGIC_40302: i64 = 40302 |
| 87 | const HC_MAGIC_1048576: i64 = 1048576 |
| 88 | const HC_MAGIC_16000: i64 = 16000 |
| 89 | const HC_MAGIC_16777232: i64 = 16777232 |
| 90 | const HC_MAGIC_16777216: i64 = 16777216 |
| 91 | const HC_MAGIC_90000: i64 = 90000 |
| 92 | const HC_MAGIC_1024: i64 = 1024 |
| 93 | const HC_MAGIC_65535: i64 = 65535 |
| 94 | const HC_MAGIC_8191: i64 = 8191 |
| 95 | const HC_MAGIC_2026: i64 = 2026 |
| 96 | const HC_MAGIC_25000: i64 = 25000 |
| 97 | const HC_MAGIC_86400000: i64 = 86400000 |
| 98 | const HC_MAGIC_3000: i64 = 3000 |
| 99 | const HC_MAGIC_6000: i64 = 6000 |
| 101 | const HC_ELF: *u8 = "/volume1/homes/elderwesto/nishihost/sites.elf" as *u8 |
| 102 | const HC_ELF_NEW: *u8 = "/volume1/homes/elderwesto/nishihost/sites.elf.new" as *u8 |
| 103 | const HC_ELF_PREV: *u8 = "/volume1/homes/elderwesto/nishihost/sites.elf.prev" as *u8 // rollback copy (never-brick) |
| 104 | const HC_REDIRECT: *u8 = "/volume1/homes/elderwesto/nishihost/redirect.elf" as *u8 |
| 105 | const HC_VROOM: *u8 = "/volume1/homes/elderwesto/nishihost/nx_vroom_daemon.elf" as *u8 |
| 106 | const HC_SNIROUTER:*u8 = "/volume1/homes/elderwesto/nishihost/sni_router.elf" as *u8 // sovereign public-edge SNI router (:7443, TLS passthrough) |
| 107 | const HC_XLATE: *u8 = "/volume1/homes/elderwesto/nishihost/nx_translate_daemon.elf" as *u8 |
| 108 | const HC_XLATE_NEW: *u8 = "/volume1/homes/elderwesto/nishihost/nx_translate_daemon.sov.elf.new" as *u8 |
| 109 | const HC_XLATE_PREV: *u8 = "/volume1/homes/elderwesto/nishihost/nx_translate_daemon.elf.prev" as *u8 |
| 110 | const HC_SIGKILL: i64 = 9 |
| 111 | const HC_CLOCK: *u8 = "/volume1/homes/elderwesto/nishihost/nx_clock_tickless.elf" as *u8 // the ONE consolidated scheduler (const, NOT an inline argv literal -- see the .nx gotcha note below) |
| 112 | const HC_CONF: *u8 = "/volume1/homes/elderwesto/nishihost/sites.conf" as *u8 |
| 113 | const HC_CONF_NEW: *u8 = "/volume1/homes/elderwesto/nishihost/sites.conf.new" as *u8 |
| 114 | const HC_DOCROOT: *u8 = "/volume1/homes/elderwesto/nishihost/sites/andelinwest" as *u8 |
| 115 | const HC_INDEX: *u8 = "/volume1/homes/elderwesto/nishihost/sites/andelinwest/index.html" as *u8 |
| 116 | const HC_INDEX_NEW:*u8 = "/volume1/homes/elderwesto/nishihost/andelinwest_index.html.new" as *u8 |
| 117 | const HC_PID: *u8 = "/volume1/homes/elderwesto/nishihost/sites.pid" as *u8 |
| 119 | const HC_CERT_LIVE: *u8 = "/volume1/homes/elderwesto/nishihost/certs/le_fullchain.der" as *u8 |
| 120 | const HC_CERT_NEW: *u8 = "/volume1/homes/elderwesto/nishihost/certs/le_fullchain.der.new" as *u8 |
| 121 | const HC_CERT_BAK: *u8 = "/volume1/homes/elderwesto/nishihost/certs/le_fullchain.der.bak" as *u8 |
| 122 | const HC_KEY_LIVE: *u8 = "/volume1/homes/elderwesto/nishihost/certs/le_ecdsa_key.bin" as *u8 |
| 123 | const HC_KEY_NEW: *u8 = "/volume1/homes/elderwesto/nishihost/certs/le_ecdsa_key.bin.new" as *u8 |
| 124 | const HC_KEY_BAK: *u8 = "/volume1/homes/elderwesto/nishihost/certs/le_ecdsa_key.bin.bak" as *u8 |
| 126 | const HC_READER: *u8 = "/volume1/homes/elderwesto/nishi-reader/nx_media_server_auth.elf" as *u8 |
| 127 | const HC_READER_DIR: *u8 = "/volume1/homes/elderwesto/nishi-reader" as *u8 |
| 128 | const HC_READER_KEYS: *u8 = "/volume1/homes/elderwesto/nishihost/auth/keys" as *u8 |
| 129 | const HC_READER_STORE:*u8 = "/volume1/homes/elderwesto/nishihost/auth/store" as *u8 |
| 132 | const HC_SELF: *u8 = "/volume1/homes/elderwesto/nishihost/nx_hostctl" as *u8 |
| 133 | const HC_SELF_NEW: *u8 = "/volume1/homes/elderwesto/nishihost/nx_hostctl.new" as *u8 |
| 137 | const HC_SELF_NEW_SOV: *u8 = "/volume1/homes/elderwesto/nishihost/nx_hostctl.sov.elf.new" as *u8 |
| 138 | const HC_SELF_PREV: *u8 = "/volume1/homes/elderwesto/nishihost/nx_hostctl.prev" as *u8 // never-brick (#26): keep the old supervisor binary for rollback (selfswap had NONE) |
| 139 | const HC_SUP_LOCK: *u8 = "/volume1/homes/elderwesto/nishihost/supervisor.heartbeat" as *u8 // single-supervisor lease: epoch heartbeat (getpid is BROKEN on this backend -> can't pid-exclude self) |
| 143 | const HC_REALM: *u8 = "Nishi Wiki" as *u8 |
| 144 | const HC_PORT: *u8 = "8791" as *u8 |
| 145 | const HC_SUPERVISE: *u8 = "supervise" as *u8 // selfswap's re-exec argv[1] -- same const-not-inline-literal rule |
| 146 | const HC_RUNSITE: *u8 = "runsite" as *u8 // startsite's hc_dfork_exec arg -> cmd_runsite execs sites.elf (sovereign, no sh -c) |
| 151 | const HC_SLEEPER: *u8 = "sleeper" as *u8 // daemontest payload: a sovereign sleep loop (no OS /bin/sleep) |
| 155 | const HC_RUNMIRROR: *u8 = "runmirror" as *u8 |
| 156 | const HC_MIRROR_BIN: *u8 = "/volume1/ai/apertus/nx_apertus_mirror_nas.elf" as *u8 |
| 159 | const HC_RUNMIRRORPAR: *u8 = "runmirrorpar" as *u8 |
| 160 | const HC_MIRRORPAR_BIN: *u8 = "/volume1/ai/apertus/nx_par_pull_nas.elf" as *u8 |
| 162 | const HC_DISTPUB_BIN: *u8 = "/volume1/ai/dist/nx_dist_publish_run.elf" as *u8 |
| 163 | const HC_RUNDISTPUB: *u8 = "rundistpub" as *u8 |
| 166 | const HC_DISTSERVE_BIN: *u8 = "/volume1/ai/dist/nx_dist_serve.elf" as *u8 |
| 167 | const HC_RUNDISTSERVE: *u8 = "rundistserve" as *u8 |
| 168 | const HC_RUNDISTPROBE: *u8 = "rundistprobe" as *u8 |
| 169 | const HC_A_SERVE: *u8 = "serve" as *u8 |
| 170 | const HC_A_PROBE: *u8 = "probe" as *u8 |
| 171 | const HC_A_PORT: *u8 = "18120" as *u8 |
| 172 | const HC_DIST_PROBE_PATH: *u8 = "/dist/509b6d9d22987cf7b1067a7cc6b74b88cf0c8c2739748fe5e85a4da0f69ebf1a/model.safetensors.index.json" as *u8 |
| 180 | const HC_SH: *u8 = "/bin/sh" as *u8 |
| 181 | const HC_DASHC: *u8 = "-c" as *u8 |
| 182 | const HC_READER_CMD: *u8 = "cd /volume1/homes/elderwesto/nishi-reader && exec ./nx_media_server_auth.elf /volume1/homes/elderwesto/nishihost/auth/keys /volume1/homes/elderwesto/nishihost/auth/store 'Nishi Wiki' 8791 >> auth.log 2>&1" as *u8 |
| 187 | const HC_GALX_GW: *u8 = "/volume1/ai/galx/nx_gallery_gateway.elf" as *u8 |
| 188 | const HC_GALX_GW_NEW: *u8 = "/volume1/ai/galx/nx_gallery_gateway.elf.new" as *u8 |
| 191 | const HC_GALX_GW_PREV: *u8 = "/volume1/ai/galx/nx_gallery_gateway.elf.prev" as *u8 |
| 192 | const HC_GALX_GW_SOVNEW: *u8 = "/volume1/homes/elderwesto/nishihost/nx_gallery_gateway.sov.elf.new" as *u8 |
| 193 | const HC_GALX_SERVE: *u8 = "/volume1/ai/galx/nx_gallery_serve.elf" as *u8 |
| 194 | const HC_GALX_SERVE_NEW: *u8 = "/volume1/ai/galx/nx_gallery_serve.elf.new" as *u8 |
| 195 | const HC_GALX_SERVE_CMD: *u8 = "cd /volume1/ai/galx && exec ./nx_gallery_serve.elf 18090 >>/tmp/galx_serve.log 2>&1" as *u8 |
| 201 | const HC_GALX_GW_CMD: *u8 = "cd /volume1/ai/galx && exec ./nx_gallery_gateway.elf 18190 knowledge/status/galx_gw_keys knowledge/status/galx_gw_store 1000000000 18090 0 65536 3 4 >>/tmp/galx_gw.log 2>&1" as *u8 |
| 204 | const HC_WIKI_GW: *u8 = "/volume1/ai/wiki/nx_wiki_gw.elf" as *u8 |
| 205 | const HC_WIKI_GW_NEW: *u8 = "/volume1/ai/wiki/nx_wiki_gw.elf.new" as *u8 |
| 206 | const HC_WIKI_GW_CMD: *u8 = "cd /volume1/ai/wiki && exec ./nx_wiki_gw.elf 18791 keys store 1000000000 65536 3 4 pages >>/tmp/wiki_gw.log 2>&1" as *u8 |
| 209 | const HC_HUB_GW: *u8 = "/volume1/ai/hub/nx_hub_gw.elf" as *u8 |
| 210 | const HC_HUB_GW_NEW: *u8 = "/volume1/ai/hub/nx_hub_gw.elf.new" as *u8 |
| 212 | const HC_RELATE: *u8 = "/volume1/homes/elderwesto/nishihost/nx_relate_daemon.elf" as *u8 |
| 213 | const HC_RELATE_NEW: *u8 = "/volume1/homes/elderwesto/nishihost/nx_relate_daemon.elf.new" as *u8 |
| 214 | const HC_RELATE_PREV: *u8 = "/volume1/homes/elderwesto/nishihost/nx_relate_daemon.elf.prev" as *u8 |
| 215 | const HC_RELATE_CMD: *u8 = "cd /volume1/homes/elderwesto/nishihost && exec ./nx_relate_daemon.elf >>/tmp/relate_daemon.log 2>&1" as *u8 |
| 217 | const HC_CLEANSERVE: *u8 = "/volume1/homes/elderwesto/nishihost/nx_clean_serve_daemon.elf" as *u8 |
| 218 | const HC_CLEANSERVE_NEW: *u8 = "/volume1/homes/elderwesto/nishihost/nx_clean_serve_daemon.elf.new" as *u8 |
| 219 | const HC_DOCPORTAL: *u8 = "/volume1/homes/elderwesto/nishihost/nx_docportal_admin_daemon.elf" as *u8 |
| 220 | const HC_DOCPORTAL_NEW: *u8 = "/volume1/homes/elderwesto/nishihost/nx_docportal_admin_daemon.sov.elf.new" as *u8 |
| 221 | const HC_DOCPORTAL_PREV: *u8 = "/volume1/homes/elderwesto/nishihost/nx_docportal_admin_daemon.elf.prev" as *u8 |
| 222 | const HC_CLEANSERVE_PREV: *u8 = "/volume1/homes/elderwesto/nishihost/nx_clean_serve_daemon.elf.prev" as *u8 |
| 223 | const HC_CLEANSERVE_CMD: *u8 = "cd /volume1/homes/elderwesto/nishihost && exec ./nx_clean_serve_daemon.elf 8102 >>/tmp/cleanserve.log 2>&1" as *u8 |
| 227 | const HC_MESH_SERVE_CMD: *u8 = "cd /volume1/homes/elderwesto/nishihost && exec ./nx_mesh_serve.elf 8029 >>/tmp/mesh_serve.log 2>&1" as *u8 |
| 228 | const HC_MESH_GW_CMD: *u8 = "cd /volume1/homes/elderwesto/nishihost && exec ./nx_mesh_gateway.elf 8055 meshgw_keys meshgw_store 100000 8029 0 65536 3 4 >>/tmp/mesh_gw.log 2>&1" as *u8 |
| 229 | const HC_PROJECT_CMD: *u8 = "cd /volume1/homes/elderwesto/nishihost && exec ./nx_project_serve.elf 8028 opaque_keys.bin opaque_store.log 1000000000 knowledge/project/serve.conf nishi_uid_handle.tsv 19456 2 1 >>/tmp/project_gw.log 2>&1" as *u8 |
| 230 | const HC_HUB_GW_CMD: *u8 = "cd /volume1/ai/hub && exec ./nx_hub_gw.elf 18792 /volume1/homes/elderwesto/nishihost/opaque_keys.bin /volume1/homes/elderwesto/nishihost/opaque_store.log 1000000000 65536 3 4 >>/tmp/hub_gw.log 2>&1" as *u8 |
| 237 | const HC_MGMT_CMD: *u8 = "cd /volume1/homes/elderwesto/nishihost && chmod +x ./nx_mgmt_api.elf 2>/dev/null; exec ./nx_mgmt_api.elf 18098 /volume1/homes/elderwesto/nishihost/opaque_keys.bin /volume1/homes/elderwesto/nishihost/opaque_store.log nishi_site_admin mgmt_snap.json 1000000000 >>/tmp/mgmt_api.log 2>&1" as *u8 |
| 246 | const HC_ADMIN_CMD: *u8 = "cd /volume1/homes/elderwesto/nishihost && chmod +x ./nx_docportal_admin_daemon.elf 2>/dev/null; exec ./nx_docportal_admin_daemon.elf 18456 /volume1/homes/elderwesto/nishihost/andelinwest_docportal_keys /volume1/homes/elderwesto/nishihost/andelinwest_docportal_store andelinwest_docportal 20000000 >>/tmp/docportal_admin.log 2>&1" as *u8 |
| 247 | const HC_MAILPORTAL_CMD: *u8 = "cd /volume1/homes/elderwesto/nishihost && chmod +x ./nx_email_portal_daemon.elf 2>/dev/null; exec ./nx_email_portal_daemon.elf 18465 /volume1/homes/elderwesto/nishihost/andelinwest_mail_keys /volume1/homes/elderwesto/nishihost/andelinwest_mail_store andelinwest_mail andelinwest.com /volume1/homes/elderwesto/nishihost/mail_aw/ 20000000 >>/tmp/mail_portal.log 2>&1" as *u8 |
| 248 | const HC_SITEEDIT_CMD: *u8 = "cd /volume1/homes/elderwesto/nishihost && chmod +x ./nx_siteedit_daemon.elf 2>/dev/null; exec ./nx_siteedit_daemon.elf 18466 /volume1/homes/elderwesto/nishihost/andelinwest_docportal_keys /volume1/homes/elderwesto/nishihost/andelinwest_docportal_store andelinwest_docportal andelinwest.com /volume1/homes/elderwesto/nishihost/andelinwest.site /volume1/homes/elderwesto/nishihost/sites/andelinwest 20000000 >>/tmp/siteedit.log 2>&1" as *u8 |
| 253 | const HC_HEALTH_CMD: *u8 = "cd /volume1/homes/elderwesto/nishihost && chmod +x ./nx_health_eval.elf 2>/dev/null; exec ./nx_health_eval.elf loop 300 >>/tmp/health_eval.log 2>&1" as *u8 |
| 257 | const HC_SIG2_CMD: *u8 = "cd /volume1/homes/elderwesto/nishihost && chmod +x ./nx_signaling_v2.elf 2>/dev/null; exec ./nx_signaling_v2.elf >>/tmp/signaling_v2.log 2>&1" as *u8 |
| 262 | const HC_TORRENT_CMD: *u8 = "cd /volume1/ai/torrent && exec ./nx_media_env.sov.elf hub >>/tmp/torrentd.log 2>&1" as *u8 |
| 265 | const HC_TORRENT_GW_CMD: *u8 = "cd /volume1/ai/torrent && exec ./nx_torrent_gw.elf 18793 /volume1/homes/elderwesto/nishihost/opaque_keys.bin /volume1/homes/elderwesto/nishihost/opaque_store.log 1000000000 65536 3 4 >>/tmp/torrentgw.log 2>&1" as *u8 |
| 273 | const HC_GEN_GW_CMD: *u8 = "cd /volume1/ai/gen && exec ./nx_gen_gateway_daemon.elf 18794 /volume1/homes/elderwesto/nishihost/opaque_keys.bin /volume1/homes/elderwesto/nishihost/opaque_store.log 1000000000 18795 0 19456 2 1 86400 >>/tmp/gen_gw.log 2>&1" as *u8 |
| 274 | const HC_GEN_ORCH_CMD: *u8 = "cd /volume1/ai/gen && exec ./nx_gen_orchestrator_daemon.elf 18795 192 168 8 192 7861 /volume1/ai/gen/store- /volume1/ai/gen/blob- /volume1/ai/gen/cids.tsv laptop-5080 5000 >>/tmp/gen_orch.log 2>&1" as *u8 |
| 277 | const HC_SYNTH_CMD: *u8 = "cd /volume1/ai/synth && exec ./nx_synth_serve_daemon.elf 18796 >>/tmp/synth.log 2>&1" as *u8 |
| 280 | const HC_DEVAPI_CMD: *u8 = "cd /volume1/ai/devapi && chmod +x ./nx_dev_api_serve.elf ./_offc/*.elf 2>/dev/null; exec ./nx_dev_api_serve.elf serve 18797 >>/tmp/devapi.log 2>&1" as *u8 |
| 283 | const HC_LOGIN: *u8 = "/volume1/homes/elderwesto/nishihost/nx_opaque_login.elf" as *u8 |
| 284 | const HC_LOGIN_NEW: *u8 = "/volume1/homes/elderwesto/nishihost/nx_opaque_login.elf.new" as *u8 |
| 285 | const HC_LOGIN_PREV: *u8 = "/volume1/homes/elderwesto/nishihost/nx_opaque_login.elf.prev" as *u8 |
| 298 | const HC_LOGIN_CMD: *u8 = "cd /volume1/homes/elderwesto/nishihost && exec ./nx_opaque_login.elf 9091 opaque_keys.bin opaque_store.log 1000000000 19456 2 1 /mnt/c/Users/elder/nishi-core/nxc2/knowledge/wiki_pages /volume1/homes/elderwesto/nishihost/nishi_hr.log >>/tmp/login.log 2>&1" as *u8 |
| 299 | const HC_LOGIN_TEST_CMD: *u8 = "cd /volume1/homes/elderwesto/nishihost && exec ./nx_opaque_login.elf.new 9099 opaque_keys.bin opaque_store.log 50 19456 2 1 >>/tmp/logintest.out 2>&1" as *u8 |
| 303 | const HC_RUNMTLSPROXY: *u8 = "runmtlsproxy" as *u8 |
| 304 | const HC_MTLS_PROXY_BIN: *u8 = "/volume1/homes/elderwesto/nishihost/nx_aw_mtls_proxy.elf" as *u8 |
| 305 | const HC_MP_PORT: *u8 = "9444" as *u8 |
| 306 | const HC_MP_BACKEND: *u8 = "18791" as *u8 |
| 309 | const HC_RUNANDELIN: *u8 = "runandelin" as *u8 |
| 310 | const HC_ANDELIN_BIN: *u8 = "/volume1/homes/elderwesto/nishihost/nx_andelinwest_daemon.elf" as *u8 |
| 311 | const HC_RUNSNIR: *u8 = "runsnir" as *u8 |
| 312 | const HC_SNIR_BIN: *u8 = "/volume1/homes/elderwesto/nishihost/nx_sni_router.elf" as *u8 |
| 313 | const HC_SNIR_PORT: *u8 = "8444" as *u8 |
| 314 | const HC_SNIR_BACKEND: *u8 = "8443" as *u8 |
| 315 | const HC_NFTREAD_BIN: *u8 = "/volume1/homes/elderwesto/nishihost/nx_nft_read.elf" as *u8 // sovereign netfilter R0: read-only nat-table probe (grounds legacy-vs-nft) |
| 316 | const HC_NETTAP_BIN: *u8 = "/volume1/homes/elderwesto/nishihost/nx_netscope_capture.elf" as *u8 // NX-NETSCOPE L-CAPTURE: the sovereign wire tap (AF_PACKET -> nx_packet_dissect) |
| 321 | const HC_SITES_CMD: *u8 = "cd /volume1/homes/elderwesto/nishihost && exec ./sites.elf >>/tmp/sites_run.log 2>&1" as *u8 |
| 327 | const HC_LIB_ELF: *u8 = "/volume1/homes/elderwesto/nishihost/lib/nx_lib_httpd.elf" as *u8 |
| 328 | const HC_LIB_ELF_NEW: *u8 = "/volume1/homes/elderwesto/nishihost/lib/nx_lib_httpd.elf.new" as *u8 |
| 329 | const HC_LIB_CMD: *u8 = "cd /volume1/homes/elderwesto/nishihost/lib && exec ./nx_lib_httpd.elf >>/tmp/lib_run.log 2>&1" as *u8 |
| 332 | const HC_GENPROBE_CMD: *u8 = "exec /volume1/ai/gen/nx_gen_live_probe.elf >/volume1/ai/gen/genprobe.out 2>&1" as *u8 |
| 336 | const HC_TAPI_CMD: *u8 = "cd /volume1/homes/elderwesto/nishihost && chmod +x ./nx_tools_api_serve.elf 2>/dev/null; mkdir -p knowledge 2>/dev/null; exec ./nx_tools_api_serve.elf serve 18096 >>/tmp/tools_api.log 2>&1" as *u8 |
| 339 | const HC_FIN_CMD: *u8 = "cd /volume1/homes/elderwesto/nishihost && chmod +x ./nx_fin_serve.elf 2>/dev/null; exec ./nx_fin_serve.elf serve 18097 >>/tmp/fin_serve.log 2>&1" as *u8 |
| 342 | const HC_DIST_CMD: *u8 = "cd /volume1/ai/dist && chmod +x ./nx_dist_serve.elf 2>/dev/null; exec ./nx_dist_serve.elf serve 18120 >>/tmp/dist_serve.log 2>&1" as *u8 |
| 346 | const HC_SEED_CMD: *u8 = "cd /volume1/ai/torrent && chmod +x ./nx_torrent_seed.elf 2>/dev/null; exec ./nx_torrent_seed.elf serve 6881 /volume1/ai/torrent/seed_index.conf >>/tmp/seed.log 2>&1" as *u8 |
| 349 | const HC_SEEDANN_CMD: *u8 = "cd /volume1/ai/torrent && chmod +x ./nx_seed_announce_all.elf 2>/dev/null; exec ./nx_seed_announce_all.elf /volume1/ai/torrent/seed_index.conf >>/tmp/seedann.log 2>&1" as *u8 |
| 352 | const HC_TORSTAT_CMD: *u8 = "cd /volume1/ai/torrent && set -f; chmod +x ./nx_torrent_seedeval.elf 2>/dev/null; : > /tmp/torstat.out; for area in media gallery; do while read b; do echo === $area/$b === >> /tmp/torstat.out; ./nx_torrent_seedeval.elf $area/$b >> /tmp/torstat.out 2>&1; done < $area/torrents.idx 2>/dev/null; done; echo === SEED REGISTRY - what we SHARE back === >> /tmp/torstat.out; cat seed_index.conf >> /tmp/torstat.out 2>/dev/null; echo === seeding $(wc -l < seed_index.conf 2>/dev/null) torrents === >> /tmp/torstat.out" as *u8 |
| 356 | const HC_MP_CMD: *u8 = "cd /volume1/homes/elderwesto/nishihost && chmod +x ./nx_mp_serve.elf 2>/dev/null; mkdir -p web_assets/_game_build 2>/dev/null; exec ./nx_mp_serve.elf >>/tmp/mp_serve.log 2>&1" as *u8 |
| 567 | const HC_GUARD_INTERVAL_MS: i64 = 300000 // cap_ms: 5 min (K8s CrashLoopBackOff ceiling) |
| 568 | const HC_GUARD_BURST: i64 = 1000 // base_ms: 1s first backoff step (doubles each repeated crash) |
| 1430 | const HC_RK_COUNT_PATH: *u8 = "reader_keep.count" as *u8 |
| 1854 | const HC_COPYBUF: i64 = 262144 // chunked-copy buffer for cross-subvolume promote (hc_copy_file) |
| 2132 | const HC_TC_CC: *u8 = "/volume1/homes/elderwesto/nishihost/buildroot/_offc/nx_cc_sovereign.elf" as *u8 |
| 2133 | const HC_TC_CC_NEW: *u8 = "/volume1/homes/elderwesto/nishihost/buildroot/runtime/nx_cc_sovereign.elf.new" as *u8 |
| 2134 | const HC_TC_CC_PREV: *u8 = "/volume1/homes/elderwesto/nishihost/buildroot/_offc/nx_cc_sovereign.elf.prev" as *u8 |
| 2135 | const HC_TC_CC_BAD: *u8 = "/volume1/homes/elderwesto/nishihost/buildroot/_offc/nx_cc_sovereign.elf.bad" as *u8 |
| 2136 | const HC_TC_ASM: *u8 = "/volume1/homes/elderwesto/nishihost/buildroot/_offc/nxasm_x86_main.elf" as *u8 |
| 2137 | const HC_TC_ASM_NEW: *u8 = "/volume1/homes/elderwesto/nishihost/buildroot/runtime/nxasm_x86_main.elf.new" as *u8 |
| 2138 | const HC_TC_ASM_PREV: *u8 = "/volume1/homes/elderwesto/nishihost/buildroot/_offc/nxasm_x86_main.elf.prev" as *u8 |
| 2139 | const HC_TC_ASM_BAD: *u8 = "/volume1/homes/elderwesto/nishihost/buildroot/_offc/nxasm_x86_main.elf.bad" as *u8 |
| 2140 | const HC_TC_SBR: *u8 = "/volume1/homes/elderwesto/nishihost/buildroot/_offc/nx_sov_build_run.elf" as *u8 |
| 2141 | const HC_TC_SBR_NEW: *u8 = "/volume1/homes/elderwesto/nishihost/buildroot/runtime/nx_sov_build_run.elf.new" as *u8 |
| 2142 | const HC_TC_SBR_PREV: *u8 = "/volume1/homes/elderwesto/nishihost/buildroot/_offc/nx_sov_build_run.elf.prev" as *u8 |
| 2143 | const HC_TC_SBR_BAD: *u8 = "/volume1/homes/elderwesto/nishihost/buildroot/_offc/nx_sov_build_run.elf.bad" as *u8 |
| 2930 | const HC_ROUTERCTL_CMD: *u8 = "cd /volume1/ai/torrent && chmod +x ./nx_router_ctl.elf 2>/dev/null; : > /tmp/routerctl.out; ./nx_router_ctl.elf dash >> /tmp/routerctl.out 2>&1" as *u8 |
| 2944 | const HC_PORTMAP_CMD: *u8 = "cd /volume1/ai/torrent && chmod +x ./nx_natpmp.elf ./nx_upnp_igd.elf 2>/dev/null; : > /tmp/portmap.out; echo === NAT-PMP === >> /tmp/portmap.out; ./nx_natpmp.elf 6881 >> /tmp/portmap.out 2>&1; echo === UPnP-IGD === >> /tmp/portmap.out; ./nx_upnp_igd.elf 6881 >> /tmp/portmap.out 2>&1" as *u8 |
| 2967 | const HC_TRACKERREFRESH_CMD: *u8 = "cd /volume1/ai/torrent && mkdir -p data && chmod +x ./nx_tracker_refresh.elf 2>/dev/null; : > /tmp/trackerrefresh.out; ./nx_tracker_refresh.elf /volume1/ai/torrent/trackers.txt >> /tmp/trackerrefresh.out 2>&1" as *u8 |
| 2983 | const HC_RESEED_CMD: *u8 = "cd /volume1/ai/torrent && chmod +x ./nx_torrent_reseed.elf 2>/dev/null; : > /tmp/reseed.out; ./nx_torrent_reseed.elf /volume1/ai/torrent/media /volume1/ai/torrent/seed_index.conf >> /tmp/reseed.out 2>&1; ./nx_torrent_reseed.elf /volume1/ai/torrent/gallery /volume1/ai/torrent/seed_index.conf >> /tmp/reseed.out 2>&1" as *u8 |
| 3202 | const HC_JOB_AS_CAP: i64 = 17179869184 |
functions
| 358 | func hc_puts(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } called by 115: hc_guard_onehc_spawn_readerhc_guard_readerhc_guard_galx_servehc_guard_galx_gwhc_guard_wiki_gw+109 calls 1: sys_write |
| 359 | func hc_putn(v: i64) -> i64 |
| 365 | func hc_streq(a: *u8, b: *u8) -> i64 { var i: i64=0; while a[i]!=(0 as u8) { if a[i]!=b[i] { return 0 } i=i+1 } if b[i]!=(0 as u8) { return 0 } return 1 } |
| 368 | func hc_write_pid(path: *u8, pid: i64) -> i64 |
| 378 | func hc_read_pid(path: *u8) -> i64 |
| 392 | func hc_sup_touch() -> i64 { return hc_write_pid(HC_SUP_LOCK, sys_now_realtime_sec()) } |
| 393 | func hc_sup_clear() -> i64 { return hc_write_pid(HC_SUP_LOCK, 0) } // mark stale -> the next supervisor claims |
| 394 | func hc_sup_fresh() -> i64 |
| 404 | func hc_spawn() -> i64 |
| 415 | func hc_slen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } |
| 416 | func hc_atoi(s: *u8) -> i64 { var v: i64=0; var i: i64=0; while s[i]!=(0 as u8) { let c: u8=s[i]; if c<(48 as u8){return v} if c>(57 as u8){return v} v=v*10+((c-(48 as u8)) as i64); i=i+1 } return v } |
| 417 | func hc_contains(hay: *u8, hn: i64, needle: *u8, nn: i64) -> i64 |
| 427 | func hc_read_cmdline(path: *u8, buf: *u8, cap: i64) -> i64 |
| 439 | func proc_kill_by_name(needle: *u8, sig: i64) -> i64 |
| 486 | func proc_kill_by_two(n1: *u8, n2: *u8, sig: i64) -> i64 |
| 534 | func proc_alive_by_name(needle: *u8) -> i64 |
| 544 | func hc_spawn_path(pth: *u8) -> i64 |
| 572 | func hc_needs_restart(alive: i64, port: i64) -> i64 |
| 581 | func hc_guard_one(name: *u8, path: *u8, port: i64, ws: *i64, cnt: *i64, pidpath: *u8, write_pid: i64) -> i64 |
| 599 | func hc_spawn_reader() -> i64 called by 3: hc_guard_readercmd_reader_keepcmd_spawntest calls 5: sys_forksys_mmapsys_execve_cleanhc_putssys_exit |
| 613 | func hc_spawn_galx_serve() -> i64 called by 1: hc_guard_galx_serve calls 7: sys_forknx_setsidsys_openat_wrsys_dup3sys_mmapsys_execve_clean+1 |
| 627 | func hc_spawn_galx_gw() -> i64 called by 1: hc_guard_galx_gw calls 7: sys_forknx_setsidsys_openat_wrsys_dup3sys_mmapsys_execve_clean+1 |
| 643 | func hc_spawn_wiki_gw() -> i64 called by 1: hc_guard_wiki_gw calls 7: sys_forknx_setsidsys_openat_wrsys_dup3sys_mmapsys_execve_clean+1 |
| 658 | func hc_spawn_hub_gw() -> i64 called by 1: hc_guard_hub_gw calls 7: sys_forknx_setsidsys_openat_wrsys_dup3sys_mmapsys_execve_clean+1 |
| 674 | func hc_spawn_gen_orch() -> i64 called by 1: hc_guard_gen_orch calls 7: sys_forknx_setsidsys_openat_wrsys_dup3sys_mmapsys_execve_clean+1 |
| 688 | func hc_spawn_gen_gw() -> i64 called by 1: hc_guard_gen_gw calls 7: sys_forknx_setsidsys_openat_wrsys_dup3sys_mmapsys_execve_clean+1 |
| 703 | func hc_spawn_synth() -> i64 called by 1: hc_guard_synth calls 7: sys_forknx_setsidsys_openat_wrsys_dup3sys_mmapsys_execve_clean+1 |
| 718 | func hc_spawn_devapi() -> i64 called by 1: hc_guard_devapi calls 7: sys_forknx_setsidsys_openat_wrsys_dup3sys_mmapsys_execve_clean+1 |
| 733 | func hc_spawn_torrent() -> i64 called by 1: hc_guard_torrent calls 7: sys_forknx_setsidsys_openat_wrsys_dup3sys_mmapsys_execve_clean+1 |
| 748 | func hc_spawn_torrent_gw() -> i64 called by 1: hc_guard_torrent_gw calls 7: sys_forknx_setsidsys_openat_wrsys_dup3sys_mmapsys_execve_clean+1 |
| 769 | func hc_guard_reader(ws: *i64, cnt: *i64) -> i64 |
| 784 | func hc_guard_galx_serve(ws: *i64, cnt: *i64) -> i64 |
| 794 | func hc_guard_galx_gw(ws: *i64, cnt: *i64) -> i64 called by 1: cmd_supervise calls 5: proc_alive_by_namesys_now_realtime_msrg_should_restarthc_putshc_spawn_galx_gw |
| 807 | func hc_guard_wiki_gw(ws: *i64, cnt: *i64) -> i64 called by 1: cmd_supervise calls 5: proc_alive_by_namesys_now_realtime_msrg_should_restarthc_putshc_spawn_wiki_gw |
| 819 | func hc_guard_hub_gw(ws: *i64, cnt: *i64) -> i64 called by 1: cmd_supervise calls 5: proc_alive_by_namesys_now_realtime_msrg_should_restarthc_putshc_spawn_hub_gw |
| 830 | func hc_spawn_relate() -> i64 called by 1: hc_guard_relate calls 7: sys_forknx_setsidsys_openat_wrsys_dup3sys_mmapsys_execve_clean+1 |
| 846 | func hc_guard_relate(ws: *i64, cnt: *i64) -> i64 called by 1: cmd_supervise calls 5: proc_alive_by_namesys_now_realtime_msrg_should_restarthc_putshc_spawn_relate |
| 857 | func hc_spawn_cleanserve() -> i64 called by 1: hc_guard_cleanserve calls 7: sys_forknx_setsidsys_openat_wrsys_dup3sys_mmapsys_execve_clean+1 |
| 873 | func hc_guard_cleanserve(ws: *i64, cnt: *i64) -> i64 |
| 884 | func hc_spawn_mesh_serve() -> i64 called by 1: hc_guard_mesh_serve calls 7: sys_forknx_setsidsys_openat_wrsys_dup3sys_mmapsys_execve_clean+1 |
| 900 | func hc_guard_mesh_serve(ws: *i64, cnt: *i64) -> i64 |
| 911 | func hc_spawn_mesh_gw() -> i64 called by 1: hc_guard_mesh_gw calls 7: sys_forknx_setsidsys_openat_wrsys_dup3sys_mmapsys_execve_clean+1 |
| 927 | func hc_guard_mesh_gw(ws: *i64, cnt: *i64) -> i64 called by 1: cmd_supervise calls 5: proc_alive_by_namesys_now_realtime_msrg_should_restarthc_putshc_spawn_mesh_gw |
| 938 | func hc_spawn_project() -> i64 called by 1: hc_guard_project calls 7: sys_forknx_setsidsys_openat_wrsys_dup3sys_mmapsys_execve_clean+1 |
| 955 | func hc_guard_project(ws: *i64, cnt: *i64) -> i64 called by 1: cmd_supervise calls 5: proc_alive_by_namesys_now_realtime_msrg_should_restarthc_putshc_spawn_project |
| 966 | func hc_spawn_mgmt() -> i64 called by 1: hc_guard_mgmt calls 7: sys_forknx_setsidsys_openat_wrsys_dup3sys_mmapsys_execve_clean+1 |
| 982 | func hc_guard_mgmt(ws: *i64, cnt: *i64) -> i64 called by 1: cmd_supervise calls 5: proc_alive_by_namesys_now_realtime_msrg_should_restarthc_putshc_spawn_mgmt |
| 993 | func hc_spawn_admin() -> i64 called by 1: hc_guard_admin calls 7: sys_forknx_setsidsys_openat_wrsys_dup3sys_mmapsys_execve_clean+1 |
| 1009 | func hc_guard_admin(ws: *i64, cnt: *i64) -> i64 called by 1: cmd_supervise calls 5: proc_alive_by_namesys_now_realtime_msrg_should_restarthc_putshc_spawn_admin |
| 1027 | func hc_spawn_mailportal() -> i64 called by 1: hc_guard_mailportal calls 7: sys_forknx_setsidsys_openat_wrsys_dup3sys_mmapsys_execve_clean+1 |
| 1043 | func hc_guard_mailportal(ws: *i64, cnt: *i64) -> i64 |
| 1054 | func hc_spawn_siteedit() -> i64 called by 1: hc_guard_siteedit calls 7: sys_forknx_setsidsys_openat_wrsys_dup3sys_mmapsys_execve_clean+1 |
| 1070 | func hc_guard_siteedit(ws: *i64, cnt: *i64) -> i64 called by 1: cmd_supervise calls 5: proc_alive_by_namesys_now_realtime_msrg_should_restarthc_putshc_spawn_siteedit |
| 1081 | func hc_spawn_tapi() -> i64 called by 1: hc_guard_tapi calls 7: sys_forknx_setsidsys_openat_wrsys_dup3sys_mmapsys_execve_clean+1 |
| 1097 | func hc_guard_tapi(ws: *i64, cnt: *i64) -> i64 called by 1: cmd_supervise calls 5: proc_alive_by_namesys_now_realtime_msrg_should_restarthc_putshc_spawn_tapi |
| 1108 | func hc_spawn_fin() -> i64 |
| 1124 | func hc_guard_fin(ws: *i64, cnt: *i64) -> i64 called by 1: cmd_supervise calls 5: proc_alive_by_namesys_now_realtime_msrg_should_restarthc_putshc_spawn_fin |
| 1136 | func hc_spawn_health() -> i64 called by 1: hc_guard_health calls 7: sys_forknx_setsidsys_openat_wrsys_dup3sys_mmapsys_execve_clean+1 |
| 1153 | func hc_guard_health(ws: *i64, cnt: *i64) -> i64 called by 1: cmd_supervise calls 5: proc_alive_by_namesys_now_realtime_msrg_should_restarthc_putshc_spawn_health |
| 1164 | func hc_spawn_sig2() -> i64 called by 1: hc_guard_sig2 calls 7: sys_forknx_setsidsys_openat_wrsys_dup3sys_mmapsys_execve_clean+1 |
| 1180 | func hc_guard_sig2(ws: *i64, cnt: *i64) -> i64 called by 1: cmd_supervise calls 5: proc_alive_by_namesys_now_realtime_msrg_should_restarthc_putshc_spawn_sig2 |
| 1191 | func hc_spawn_dist() -> i64 called by 1: hc_guard_dist calls 7: sys_forknx_setsidsys_openat_wrsys_dup3sys_mmapsys_execve_clean+1 |
| 1207 | func hc_guard_dist(ws: *i64, cnt: *i64) -> i64 called by 1: cmd_supervise calls 5: proc_alive_by_namesys_now_realtime_msrg_should_restarthc_putshc_spawn_dist |
| 1218 | func hc_spawn_seed() -> i64 called by 1: hc_guard_seed calls 7: sys_forknx_setsidsys_openat_wrsys_dup3sys_mmapsys_execve_clean+1 |
| 1234 | func hc_guard_seed(ws: *i64, cnt: *i64) -> i64 called by 1: cmd_supervise calls 5: proc_alive_by_namesys_now_realtime_msrg_should_restarthc_putshc_spawn_seed |
| 1245 | func hc_spawn_seedann() -> i64 called by 1: hc_guard_seedann calls 7: sys_forknx_setsidsys_openat_wrsys_dup3sys_mmapsys_execve_clean+1 |
| 1260 | func hc_guard_seedann(ws: *i64, cnt: *i64) -> i64 called by 1: cmd_supervise calls 5: proc_alive_by_namesys_now_realtime_msrg_should_restarthc_putshc_spawn_seedann |
| 1271 | func hc_spawn_mp() -> i64 |
| 1287 | func hc_guard_mp(ws: *i64, cnt: *i64) -> i64 called by 1: cmd_supervise calls 5: proc_alive_by_namesys_now_realtime_msrg_should_restarthc_putshc_spawn_mp |
| 1299 | func hc_guard_gen_orch(ws: *i64, cnt: *i64) -> i64 called by 1: cmd_supervise calls 5: proc_alive_by_namesys_now_realtime_msrg_should_restarthc_putshc_spawn_gen_orch |
| 1309 | func hc_guard_gen_gw(ws: *i64, cnt: *i64) -> i64 called by 1: cmd_supervise calls 5: proc_alive_by_namesys_now_realtime_msrg_should_restarthc_putshc_spawn_gen_gw |
| 1322 | func hc_guard_synth(ws: *i64, cnt: *i64) -> i64 called by 1: cmd_supervise calls 5: proc_alive_by_namesys_now_realtime_msrg_should_restarthc_putshc_spawn_synth |
| 1334 | func hc_guard_devapi(ws: *i64, cnt: *i64) -> i64 called by 1: cmd_supervise calls 5: proc_alive_by_namesys_now_realtime_msrg_should_restarthc_putshc_spawn_devapi |
| 1345 | func cmd_kickdevapi() -> i64 |
| 1353 | func cmd_devapitoolchain() -> i64 |
| 1371 | func hc_guard_torrent(ws: *i64, cnt: *i64) -> i64 called by 1: cmd_supervise calls 5: proc_alive_by_namesys_now_realtime_msrg_should_restarthc_putshc_spawn_torrent |
| 1383 | func hc_guard_torrent_gw(ws: *i64, cnt: *i64) -> i64 |
| 1395 | func hc_guard_login(ws: *i64, cnt: *i64) -> i64 called by 1: cmd_supervise calls 5: proc_alive_by_namesys_now_realtime_msrg_should_restarthc_putshc_spawn_login |
| 1420 | func hc_keep_delay(fastfails: i64, shortfails: i64) -> i64 called by 1: cmd_reader_keep |
| 1431 | func cmd_reader_keep() -> i64 called by 1: cmd_supervise calls 10: hc_putssys_mmapproc_alive_by_namesys_sleep_mssys_now_ushc_write_pid+4 |
| 1492 | func hc_cat(dst: *u8, off: i64, s: *u8) -> i64 { var i: i64=0; while s[i]!=(0 as u8){dst[off+i]=s[i];i=i+1} return off+i } |
| 1493 | func hc_catn(dst: *u8, off: i64, v: i64) -> i64 |
| 1500 | func hc_status_row(dst: *u8, off: i64, name: *u8, label: *u8) -> i64 |
| 1517 | func hc_rwin(cnt: *i64, ws: *i64, now: i64) -> i64 called by 1: cmd_supervise |
| 1521 | func hc_snap_svc(buf: *u8, o: i64, name: *u8, port: i64, rwin: i64) -> i64 |
| 1539 | func hc_emit_snapshot(rw_sites: i64, rw_wiki: i64, rw_ggw: i64, rw_gserve: i64, rw_reader: i64, rw_redirect: i64, rw_tgw: i64, rw_mgmt: i64, rw_adm: i64, rw_vroom: i64, rw_tapi: i64, rw_mail: i64) -> i64 |
| 1572 | func hc_emit_status_html(now: i64) -> i64 |
| 1603 | func hc_assert_overcommit() -> i64 |
| 1612 | func cmd_supervise() -> i64 called by 1: cmd_takeover calls 48: nx_fd_scrub_inheritedhc_putshc_assert_overcommithc_sup_freshhc_sup_touchsys_fork+42 |
| 1726 | func cmd_deploy() -> i64 |
| 1770 | func cmd_mgmtdeploy() -> i64 |
| 1844 | func cmd_mgmtrollback() -> i64 |
| 1859 | func hc_exists(p: *u8) -> i64 { let fd: i64 = sys_openat_rd(p); if fd < 0 { return 0 } sys_close(fd); return 1 } called by 4: cmd_mgmtdeployhc_promote_to_expecthc_deploy_onecmd_selfswap calls 2: sys_openat_rdsys_close |
| 1869 | func hc_put_rc(label: *u8, rc: i64) -> i64 |
| 1880 | func hc_copy_file(src: *u8, dst: *u8) -> i64 called by 1: hc_promote_to_expect calls 6: sys_openat_rdsys_openat_wrsys_closesys_mmapsys_readsys_write |
| 1892 | func hc_file_size(p: *u8) -> i64 |
| 1920 | func hc_promote_to_expect(nhnew: *u8, live: *u8, prev: *u8, expect_size: i64) -> i64 |
| 1944 | func hc_promote_to(nhnew: *u8, live: *u8, prev: *u8) -> i64 |
| 1962 | func hc_pathsuf(dst: *u8, live: *u8, suf: *u8) -> *u8 |
| 1973 | func hc_sovname(dst: *u8, live: *u8) -> *u8 |
| 1989 | func hc_deploy_one(live: *u8, killname: *u8) -> i64 |
| 2040 | func hc_prefix(s: *u8, p: *u8) -> i64 |
| 2054 | func hc_row_field(rowname: *u8, want: i64, out: *u8) -> i64 |
| 2110 | func cmd_gdeploy(live: *u8, killname: *u8) -> i64 |
| 2144 | func cmd_toolchaindeploy() -> i64 |
| 2155 | func cmd_toolchainrollback() -> i64 |
| 2166 | func cmd_torrentdeploy() -> i64 |
| 2202 | func cmd_torrentrollback() -> i64 |
| 2218 | func cmd_relatedeploy() -> i64 |
| 2225 | func cmd_relaterollback() -> i64 |
| 2234 | func cmd_xlatedeploy() -> i64 |
| 2241 | func cmd_xlaterollback() -> i64 |
| 2250 | func cmd_cleanservedeploy() -> i64 |
| 2260 | func cmd_docportaldeploy() -> i64 |
| 2267 | func cmd_docportalrollback() -> i64 |
| 2274 | func cmd_cleanserverollback() -> i64 |
| 2283 | func cmd_rollback() -> i64 |
| 2296 | func cmd_certswap() -> i64 |
| 2310 | func cmd_certrollback() -> i64 |
| 2320 | func hc_spawn_login() -> i64 |
| 2336 | func cmd_logintest() -> i64 |
| 2361 | func cmd_runmtlsproxy() -> i64 |
| 2373 | func cmd_mtlsproxytest() -> i64 |
| 2389 | func cmd_runmirror() -> i64 |
| 2400 | func cmd_mirror() -> i64 |
| 2411 | func cmd_runmirrorpar() -> i64 |
| 2421 | func cmd_mirrorpar() -> i64 |
| 2432 | func cmd_mirrorstop() -> i64 |
| 2441 | func cmd_rundistpub() -> i64 |
| 2452 | func cmd_distpub() -> i64 |
| 2462 | func cmd_rundistserve() -> i64 |
| 2472 | func cmd_rundistprobe() -> i64 |
| 2482 | func cmd_distserve() -> i64 |
| 2491 | func cmd_distprobe() -> i64 |
| 2499 | func cmd_runandelin() -> i64 |
| 2509 | func cmd_runsnir() -> i64 |
| 2522 | func cmd_nftread() -> i64 |
| 2533 | func cmd_nettap(port: *u8) -> i64 |
| 2547 | func cmd_platformtest() -> i64 |
| 2564 | func cmd_logindeploy() -> i64 |
| 2577 | func cmd_loginrollback() -> i64 |
| 2592 | func cmd_hubdeploy() -> i64 |
| 2605 | func cmd_gendeploy() -> i64 |
| 2618 | func cmd_genprobe() -> i64 |
| 2643 | func cmd_takeover() -> i64 |
| 2680 | func cmd_selftest() -> i64 |
| 2731 | func cmd_selfswap() -> i64 |
| 2779 | func cmd_superrollback() -> i64 |
| 2796 | func cmd_supervisetest() -> i64 |
| 2812 | func cmd_spawntest() -> i64 |
| 2832 | func hc_dfork_exec(arg: *u8) -> i64 |
| 2850 | func hc_daemonize_supervise() -> i64 { return hc_dfork_exec(HC_SUPERVISE) } |
| 2854 | func cmd_sleeper() -> i64 calls 1: sys_sleep_ms |
| 2862 | func cmd_daemontest() -> i64 |
| 2877 | func cmd_reconcile() -> i64 |
| 2897 | func cmd_kickreader() -> i64 |
| 2910 | func cmd_kicktorrent() -> i64 |
| 2921 | func cmd_kickseed() -> i64 |
| 2931 | func cmd_routerctl() -> i64 |
| 2945 | func cmd_portmap() -> i64 |
| 2968 | func cmd_trackerrefresh() -> i64 |
| 2984 | func cmd_reseed() -> i64 |
| 3001 | func cmd_kickworkers() -> i64 |
| 3009 | func cmd_torstat() -> i64 |
| 3023 | func cmd_kickseedann() -> i64 |
| 3034 | func cmd_kicktorrentgw() -> i64 |
| 3048 | func cmd_killdurindex() -> i64 |
| 3059 | func hc_spawn_durindex_job() -> i64 called by 1: cmd_durindexrun calls 11: sys_forknx_setsidsys_chdirsys_closesys_openat_wrsys_openat_append+5 |
| 3086 | func hc_spawn_pipeline_job() -> i64 called by 2: cmd_galxpipelinekickcmd_galxpipeline calls 11: sys_forknx_setsidsys_chdirsys_closesys_openat_wrsys_openat_append+5 |
| 3112 | func hc_spawn_idxbackfill_job() -> i64 called by 2: cmd_galxidxkickcmd_galxidxrun calls 11: sys_forknx_setsidsys_chdirsys_closesys_openat_wrsys_openat_append+5 |
| 3140 | func cmd_galxidxkick() -> i64 |
| 3160 | func cmd_galxpipelinekick() -> i64 |
| 3177 | func cmd_galxidxrun() -> i64 |
| 3184 | func cmd_galxpipeline() -> i64 |
| 3203 | func hc_spawn_searchpipe_job(organ: *u8, a1: *u8, a2: *u8) -> i64 |
| 3241 | func cmd_searchpagerank() -> i64 |
| 3249 | func cmd_searchcompact() -> i64 |
| 3269 | func hc_file_age_s(path: *u8) -> i64 |
| 3278 | func cmd_searchcrawl() -> i64 |
| 3308 | func cmd_durindexrun() -> i64 |
| 3315 | func hc_count_lines(path: *u8) -> i64 |
| 3324 | func hc_tail(path: *u8, nb: i64) -> i64 |
| 3334 | func cmd_durindexstat() -> i64 |
| 3345 | func hc_nth_line(buf: *u8, sz: i64, n: i64, out: *u8) -> i64 called by 1: cmd_tsdurtest |
| 3359 | func cmd_tsdurtest() -> i64 |
| 3384 | func cmd_durbinbuild() -> i64 |
| 3409 | func hc_copyfile(src: *u8, dst: *u8) -> i64 |
| 3424 | func cmd_buildrun(name: *u8) -> i64 |
| 3504 | func cmd_buildsetup() -> i64 |
| 3517 | func cmd_galxdurprobe() -> i64 |
| 3547 | func hc_loopback_req(req: *u8, buf: *u8, cap: i64, totp: *i64) -> i64 |
| 3563 | func hc_body_eq(buf: *u8, bs: i64, tot: i64, exp: *u8) -> i64 called by 1: cmd_galxtagprobe |
| 3573 | func cmd_galxtagprobe() -> i64 |
| 3593 | func hc_body_has(buf: *u8, bs: i64, tot: i64, needle: *u8) -> i64 called by 1: cmd_galxstreamprobe |
| 3609 | func cmd_galxstreamprobe() -> i64 |
| 3652 | func cmd_galxgwprobe() -> i64 |
| 3677 | func cmd_galxauthprobe() -> i64 |
| 3705 | func cmd_galxregprobe() -> i64 |
| 3730 | func cmd_kicksites() -> i64 |
| 3738 | func cmd_kicksynth() -> i64 |
| 3747 | func cmd_kickdocportal() -> i64 |
| 3758 | func hc_cmdl_has(buf: *u8, n: i64, name: *u8) -> i64 |
| 3775 | func hc_kill_by_cmdline(name: *u8) -> i64 |