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 9 imports · 4 importers
imports: nx_syscalls.nxnx_file_install.nxnx_connect.nxnx_health_probe.nxnx_restart_guard.nxnx_os_introspect.nxnx_fd_hygiene.nxnx_proc_snapshot.nxnx_buildrun_verdict_lib.nx
imported by: nx_deploy_capture_selection_gate.nxnx_fio_region_gate.nxnx_hostctl_supervise_gate.nxnx_rollback_executor_t185.nx
structs
| none |
consts
| 31 | const HC_CRAWL_STALE_S: i64 = 600 |
| 32 | const HC_MAGIC_65536: i64 = 65536 |
| 33 | const HC_MAGIC_8192: i64 = 8192 |
| 34 | const HC_MAGIC_60000: i64 = 60000 |
| 35 | const HC_MAGIC_300000: i64 = 300000 |
| 36 | const HC_MAGIC_8791: i64 = 8791 |
| 37 | const HC_MAGIC_5000: i64 = 5000 |
| 38 | const HC_MAGIC_5000000: i64 = 5000000 |
| 39 | const HC_MAGIC_300000000: i64 = 300000000 |
| 40 | const HC_MAGIC_4096: i64 = 4096 |
| 41 | const HC_MAGIC_8443: i64 = 8443 |
| 42 | const HC_MAGIC_18791: i64 = 18791 |
| 43 | const HC_MAGIC_18190: i64 = 18190 |
| 44 | const HC_MAGIC_18090: i64 = 18090 |
| 45 | const HC_MAGIC_18095: i64 = 18095 // nx_daemon_supervisor /status (the fleet supervisor's liveness surface) |
| 46 | const HC_MAGIC_8080: i64 = 8080 |
| 47 | const HC_MAGIC_18793: i64 = 18793 |
| 48 | const HC_MAGIC_18098: i64 = 18098 |
| 49 | const HC_MAGIC_18456: i64 = 18456 |
| 50 | const HC_MAGIC_8456: i64 = 8456 |
| 51 | const HC_MAGIC_15274: i64 = 15274 |
| 52 | const HC_MAGIC_18465: i64 = 18465 |
| 53 | const HC_MAGIC_18466: i64 = 18466 |
| 54 | const HC_MAGIC_8446: i64 = 8446 |
| 55 | const HC_MAGIC_18096: i64 = 18096 |
| 56 | const HC_MAGIC_16384: i64 = 16384 |
| 57 | const HC_MAGIC_7443: i64 = 7443 |
| 58 | const HC_MAGIC_18792: i64 = 18792 |
| 59 | const HC_MAGIC_9091: i64 = 9091 |
| 60 | const HC_MAGIC_8097: i64 = 8097 |
| 61 | const HC_MAGIC_18795: i64 = 18795 |
| 62 | const HC_MAGIC_18794: i64 = 18794 |
| 63 | const HC_MAGIC_18796: i64 = 18796 |
| 64 | const HC_MAGIC_18797: i64 = 18797 |
| 65 | const HC_MAGIC_18099: i64 = 18099 |
| 66 | const HC_MAGIC_18097: i64 = 18097 |
| 67 | const HC_MAGIC_18120: i64 = 18120 |
| 68 | const HC_MAGIC_7702: i64 = 7702 |
| 69 | const HC_MAGIC_6881: i64 = 6881 |
| 70 | const HC_MAGIC_8445: i64 = 8445 |
| 71 | const HC_MAGIC_8027: i64 = 8027 |
| 72 | const HC_MAGIC_8028: i64 = 8028 |
| 73 | const HC_MAGIC_8102: i64 = 8102 |
| 74 | const HC_MAGIC_8029: i64 = 8029 |
| 75 | const HC_MAGIC_8055: i64 = 8055 |
| 76 | const HC_MAGIC_8447: i64 = 8447 |
| 77 | const HC_MAGIC_1195: i64 = 1195 |
| 78 | const HC_MAGIC_5080: i64 = 5080 |
| 79 | const HC_MAGIC_15000: i64 = 15000 |
| 80 | const HC_MAGIC_1500: i64 = 1500 |
| 81 | const HC_MAGIC_2500: i64 = 2500 |
| 82 | const HC_MAGIC_4000: i64 = 4000 |
| 83 | const HC_MAGIC_1200: i64 = 1200 |
| 84 | const HC_MAGIC_2000: i64 = 2000 |
| 85 | const HC_MAGIC_131072: i64 = 131072 |
| 86 | const HC_MAGIC_3600000: i64 = 3600000 |
| 87 | const HC_MAGIC_262144: i64 = 262144 |
| 88 | const HC_MAGIC_2048: i64 = 2048 |
| 89 | const HC_MAGIC_40302: i64 = 40302 |
| 90 | const HC_MAGIC_1048576: i64 = 1048576 |
| 91 | const HC_MAGIC_16000: i64 = 16000 |
| 92 | const HC_MAGIC_16777232: i64 = 16777232 |
| 93 | const HC_MAGIC_16777216: i64 = 16777216 |
| 94 | const HC_MAGIC_90000: i64 = 90000 |
| 95 | const HC_MAGIC_1024: i64 = 1024 |
| 96 | const HC_MAGIC_65535: i64 = 65535 |
| 97 | const HC_MAGIC_8191: i64 = 8191 |
| 98 | const HC_MAGIC_2026: i64 = 2026 |
| 99 | const HC_MAGIC_25000: i64 = 25000 |
| 100 | const HC_MAGIC_86400000: i64 = 86400000 |
| 101 | const HC_MAGIC_3000: i64 = 3000 |
| 102 | const HC_MAGIC_6000: i64 = 6000 |
| 104 | const HC_ELF: *u8 = "/volume1/homes/elderwesto/nishihost/sites.elf" as *u8 |
| 105 | const HC_ELF_NEW: *u8 = "/volume1/homes/elderwesto/nishihost/sites.elf.new" as *u8 |
| 106 | const HC_ELF_PREV: *u8 = "/volume1/homes/elderwesto/nishihost/sites.elf.prev" as *u8 // rollback copy (never-brick) |
| 107 | const HC_REDIRECT: *u8 = "/volume1/homes/elderwesto/nishihost/redirect.elf" as *u8 |
| 114 | const HC_ARCSRV: *u8 = "/volume1/homes/elderwesto/nishihost/nx_archive_server.elf" as *u8 |
| 115 | const HC_VROOM: *u8 = "/volume1/homes/elderwesto/nishihost/nx_vroom_daemon.elf" as *u8 |
| 116 | const HC_SNIROUTER:*u8 = "/volume1/homes/elderwesto/nishihost/sni_router.elf" as *u8 // sovereign public-edge SNI router (:7443, TLS passthrough) |
| 117 | const HC_XLATE: *u8 = "/volume1/homes/elderwesto/nishihost/nx_translate_daemon.elf" as *u8 |
| 118 | const HC_XLATE_NEW: *u8 = "/volume1/homes/elderwesto/nishihost/nx_translate_daemon.sov.elf.new" as *u8 |
| 119 | const HC_XLATE_PREV: *u8 = "/volume1/homes/elderwesto/nishihost/nx_translate_daemon.elf.prev" as *u8 |
| 120 | const HC_SIGKILL: i64 = 9 |
| 121 | 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) |
| 122 | const HC_CONF: *u8 = "/volume1/homes/elderwesto/nishihost/sites.conf" as *u8 |
| 123 | const HC_CONF_NEW: *u8 = "/volume1/homes/elderwesto/nishihost/sites.conf.new" as *u8 |
| 124 | const HC_DOCROOT: *u8 = "/volume1/homes/elderwesto/nishihost/sites/andelinwest" as *u8 |
| 125 | const HC_INDEX: *u8 = "/volume1/homes/elderwesto/nishihost/sites/andelinwest/index.html" as *u8 |
| 126 | const HC_INDEX_NEW:*u8 = "/volume1/homes/elderwesto/nishihost/andelinwest_index.html.new" as *u8 |
| 127 | const HC_PID: *u8 = "/volume1/homes/elderwesto/nishihost/sites.pid" as *u8 |
| 129 | const HC_CERT_LIVE: *u8 = "/volume1/homes/elderwesto/nishihost/certs/le_fullchain.der" as *u8 |
| 130 | const HC_CERT_NEW: *u8 = "/volume1/homes/elderwesto/nishihost/certs/le_fullchain.der.new" as *u8 |
| 131 | const HC_CERT_BAK: *u8 = "/volume1/homes/elderwesto/nishihost/certs/le_fullchain.der.bak" as *u8 |
| 132 | const HC_KEY_LIVE: *u8 = "/volume1/homes/elderwesto/nishihost/certs/le_ecdsa_key.bin" as *u8 |
| 133 | const HC_KEY_NEW: *u8 = "/volume1/homes/elderwesto/nishihost/certs/le_ecdsa_key.bin.new" as *u8 |
| 134 | const HC_KEY_BAK: *u8 = "/volume1/homes/elderwesto/nishihost/certs/le_ecdsa_key.bin.bak" as *u8 |
| 136 | const HC_READER: *u8 = "/volume1/homes/elderwesto/nishi-reader/nx_media_server_auth.elf" as *u8 |
| 137 | const HC_READER_DIR: *u8 = "/volume1/homes/elderwesto/nishi-reader" as *u8 |
| 138 | const HC_READER_KEYS: *u8 = "/volume1/homes/elderwesto/nishihost/auth/keys" as *u8 |
| 139 | const HC_READER_STORE:*u8 = "/volume1/homes/elderwesto/nishihost/auth/store" as *u8 |
| 142 | const HC_SELF: *u8 = "/volume1/homes/elderwesto/nishihost/nx_hostctl" as *u8 |
| 143 | const HC_SELF_NEW: *u8 = "/volume1/homes/elderwesto/nishihost/nx_hostctl.new" as *u8 |
| 147 | const HC_SELF_NEW_SOV: *u8 = "/volume1/homes/elderwesto/nishihost/nx_hostctl.sov.elf.new" as *u8 |
| 148 | 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) |
| 149 | const HC_BUILD_DEBUG_FLAG: *u8 = "/volume1/homes/elderwesto/nishihost/knowledge/status/build_debug.flag" as *u8 // 1 = every buildrun passes --debug (2026-09-02): DWARF .debug_line appended past the image so a crash address resolves on the deployed binary; any other content or an absent file = no flag |
| 150 | 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) |
| 154 | const HC_REALM: *u8 = "Nishi Wiki" as *u8 |
| 155 | const HC_PORT: *u8 = "8791" as *u8 |
| 156 | const HC_SUPERVISE: *u8 = "supervise" as *u8 // selfswap's re-exec argv[1] -- same const-not-inline-literal rule |
| 157 | const HC_RUNSITE: *u8 = "runsite" as *u8 // startsite's hc_dfork_exec arg -> cmd_runsite execs sites.elf (sovereign, no sh -c) |
| 162 | const HC_SLEEPER: *u8 = "sleeper" as *u8 // daemontest payload: a sovereign sleep loop (no OS /bin/sleep) |
| 166 | const HC_RUNMIRROR: *u8 = "runmirror" as *u8 |
| 167 | const HC_MIRROR_BIN: *u8 = "/volume1/ai/apertus/nx_apertus_mirror_nas.elf" as *u8 |
| 170 | const HC_RUNMIRRORPAR: *u8 = "runmirrorpar" as *u8 |
| 171 | const HC_MIRRORPAR_BIN: *u8 = "/volume1/ai/apertus/nx_par_pull_nas.elf" as *u8 |
| 173 | const HC_DISTPUB_BIN: *u8 = "/volume1/ai/dist/nx_dist_publish_run.elf" as *u8 |
| 174 | const HC_RUNDISTPUB: *u8 = "rundistpub" as *u8 |
| 177 | const HC_DISTSERVE_BIN: *u8 = "/volume1/ai/dist/nx_dist_serve.elf" as *u8 |
| 178 | const HC_RUNDISTSERVE: *u8 = "rundistserve" as *u8 |
| 179 | const HC_RUNDISTPROBE: *u8 = "rundistprobe" as *u8 |
| 180 | const HC_A_SERVE: *u8 = "serve" as *u8 |
| 181 | const HC_A_PROBE: *u8 = "probe" as *u8 |
| 182 | const HC_A_PORT: *u8 = "18120" as *u8 |
| 183 | const HC_DIST_PROBE_PATH: *u8 = "/dist/509b6d9d22987cf7b1067a7cc6b74b88cf0c8c2739748fe5e85a4da0f69ebf1a/model.safetensors.index.json" as *u8 |
| 191 | const HC_SH: *u8 = "/bin/sh" as *u8 |
| 192 | const HC_DASHC: *u8 = "-c" as *u8 |
| 193 | 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 |
| 198 | const HC_GALX_GW: *u8 = "/volume1/ai/galx/nx_gallery_gateway.elf" as *u8 |
| 199 | const HC_GALX_GW_NEW: *u8 = "/volume1/ai/galx/nx_gallery_gateway.elf.new" as *u8 |
| 202 | const HC_GALX_GW_PREV: *u8 = "/volume1/ai/galx/nx_gallery_gateway.elf.prev" as *u8 |
| 203 | const HC_GALX_GW_SOVNEW: *u8 = "/volume1/homes/elderwesto/nishihost/nx_gallery_gateway.sov.elf.new" as *u8 |
| 204 | const HC_GALX_SERVE: *u8 = "/volume1/ai/galx/nx_gallery_serve.elf" as *u8 |
| 205 | const HC_GALX_SERVE_NEW: *u8 = "/volume1/ai/galx/nx_gallery_serve.elf.new" as *u8 |
| 206 | const HC_GALX_SERVE_CMD: *u8 = "cd /volume1/ai/galx && exec ./nx_gallery_serve.elf 18090 >>/tmp/galx_serve.log 2>&1" as *u8 |
| 214 | const HC_ARCSRV_CMD: *u8 = "cd /volume1/homes/elderwesto/nishihost && exec ./nx_archive_server.elf >>/tmp/arcsrv.log 2>&1" as *u8 |
| 220 | 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 |
| 223 | const HC_WIKI_GW: *u8 = "/volume1/ai/wiki/nx_wiki_gw.elf" as *u8 |
| 224 | const HC_WIKI_GW_NEW: *u8 = "/volume1/ai/wiki/nx_wiki_gw.elf.new" as *u8 |
| 225 | 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 |
| 228 | const HC_HUB_GW: *u8 = "/volume1/ai/hub/nx_hub_gw.elf" as *u8 |
| 229 | const HC_HUB_GW_NEW: *u8 = "/volume1/ai/hub/nx_hub_gw.elf.new" as *u8 |
| 231 | const HC_RELATE: *u8 = "/volume1/homes/elderwesto/nishihost/nx_relate_daemon.elf" as *u8 |
| 232 | const HC_RELATE_NEW: *u8 = "/volume1/homes/elderwesto/nishihost/nx_relate_daemon.elf.new" as *u8 |
| 233 | const HC_RELATE_PREV: *u8 = "/volume1/homes/elderwesto/nishihost/nx_relate_daemon.elf.prev" as *u8 |
| 234 | const HC_RELATE_CMD: *u8 = "cd /volume1/homes/elderwesto/nishihost && exec ./nx_relate_daemon.elf >>/tmp/relate_daemon.log 2>&1" as *u8 |
| 236 | const HC_CLEANSERVE: *u8 = "/volume1/homes/elderwesto/nishihost/nx_clean_serve_daemon.elf" as *u8 |
| 237 | const HC_CLEANSERVE_NEW: *u8 = "/volume1/homes/elderwesto/nishihost/nx_clean_serve_daemon.elf.new" as *u8 |
| 238 | const HC_DOCPORTAL: *u8 = "/volume1/homes/elderwesto/nishihost/nx_docportal_admin_daemon.elf" as *u8 |
| 239 | const HC_DOCPORTAL_NEW: *u8 = "/volume1/homes/elderwesto/nishihost/nx_docportal_admin_daemon.sov.elf.new" as *u8 |
| 240 | const HC_DOCPORTAL_PREV: *u8 = "/volume1/homes/elderwesto/nishihost/nx_docportal_admin_daemon.elf.prev" as *u8 |
| 241 | const HC_CLEANSERVE_PREV: *u8 = "/volume1/homes/elderwesto/nishihost/nx_clean_serve_daemon.elf.prev" as *u8 |
| 242 | const HC_CLEANSERVE_CMD: *u8 = "cd /volume1/homes/elderwesto/nishihost && exec ./nx_clean_serve_daemon.elf 8102 >>/tmp/cleanserve.log 2>&1" as *u8 |
| 246 | 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 |
| 247 | 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 |
| 248 | 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 |
| 249 | 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 |
| 256 | 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 |
| 265 | 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 |
| 266 | 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 |
| 267 | const HC_MAGIC_18122: i64 = 18122 |
| 271 | const HC_INVENTORY_CMD: *u8 = "cd /volume1/homes/elderwesto/nishihost && chmod +x ./nx_inventory_serve.elf 2>/dev/null; exec ./nx_inventory_serve.elf 18122 opaque_keys.bin opaque_store.log nishi_site_admin 1000000 >>/tmp/inventory.log 2>&1" as *u8 |
| 272 | 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 |
| 277 | 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 |
| 281 | 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 |
| 286 | const HC_TORRENT_CMD: *u8 = "cd /volume1/ai/torrent && exec ./nx_media_env.sov.elf hub >>/tmp/torrentd.log 2>&1" as *u8 |
| 289 | 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 |
| 297 | 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 |
| 298 | 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 |
| 301 | const HC_SYNTH_CMD: *u8 = "cd /volume1/ai/synth && exec ./nx_synth_serve_daemon.elf 18796 >>/tmp/synth.log 2>&1" as *u8 |
| 304 | 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 |
| 307 | const HC_LOGIN: *u8 = "/volume1/homes/elderwesto/nishihost/nx_opaque_login.elf" as *u8 |
| 308 | const HC_LOGIN_NEW: *u8 = "/volume1/homes/elderwesto/nishihost/nx_opaque_login.elf.new" as *u8 |
| 309 | const HC_LOGIN_PREV: *u8 = "/volume1/homes/elderwesto/nishihost/nx_opaque_login.elf.prev" as *u8 |
| 322 | 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 |
| 323 | 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 |
| 327 | const HC_RUNMTLSPROXY: *u8 = "runmtlsproxy" as *u8 |
| 328 | const HC_MTLS_PROXY_BIN: *u8 = "/volume1/homes/elderwesto/nishihost/nx_aw_mtls_proxy.elf" as *u8 |
| 329 | const HC_MP_PORT: *u8 = "9444" as *u8 |
| 330 | const HC_MP_BACKEND: *u8 = "18791" as *u8 |
| 333 | const HC_RUNANDELIN: *u8 = "runandelin" as *u8 |
| 334 | const HC_ANDELIN_BIN: *u8 = "/volume1/homes/elderwesto/nishihost/nx_andelinwest_daemon.elf" as *u8 |
| 335 | const HC_RUNSNIR: *u8 = "runsnir" as *u8 |
| 336 | const HC_SNIR_BIN: *u8 = "/volume1/homes/elderwesto/nishihost/nx_sni_router.elf" as *u8 |
| 337 | const HC_SNIR_PORT: *u8 = "8444" as *u8 |
| 338 | const HC_SNIR_BACKEND: *u8 = "8443" as *u8 |
| 339 | 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) |
| 340 | 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) |
| 345 | const HC_SITES_CMD: *u8 = "cd /volume1/homes/elderwesto/nishihost && exec ./sites.elf >>/tmp/sites_run.log 2>&1" as *u8 |
| 351 | const HC_LIB_ELF: *u8 = "/volume1/homes/elderwesto/nishihost/lib/nx_lib_httpd.elf" as *u8 |
| 352 | const HC_LIB_ELF_NEW: *u8 = "/volume1/homes/elderwesto/nishihost/lib/nx_lib_httpd.elf.new" as *u8 |
| 353 | const HC_LIB_CMD: *u8 = "cd /volume1/homes/elderwesto/nishihost/lib && exec ./nx_lib_httpd.elf >>/tmp/lib_run.log 2>&1" as *u8 |
| 356 | const HC_GENPROBE_CMD: *u8 = "exec /volume1/ai/gen/nx_gen_live_probe.elf >/volume1/ai/gen/genprobe.out 2>&1" as *u8 |
| 360 | 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 |
| 363 | 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 |
| 366 | 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 |
| 370 | 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 |
| 373 | 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 |
| 376 | 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 |
| 380 | 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 |
| 591 | const HC_GUARD_INTERVAL_MS: i64 = 300000 // cap_ms: 5 min (K8s CrashLoopBackOff ceiling) |
| 592 | const HC_GUARD_BURST: i64 = 1000 // base_ms: 1s first backoff step (doubles each repeated crash) |
| 1074 | const HC_ADMIN_BIND_GRACE_POLLS: i64 = 40 |
| 1316 | const HC_DSUP_ELF: *u8 = "/volume1/homes/elderwesto/nishihost/nx_daemon_supervisor.elf" as *u8 |
| 1317 | const HC_DSUP_ARGV0: *u8 = "./nx_daemon_supervisor.elf" as *u8 |
| 1318 | const HC_DSUP_STDOUT: *u8 = "/tmp/daemon_supervisor_stdout.log" as *u8 |
| 1351 | const HC_DSUP_STALE_POLLS: i64 = 20 // 20 polls x 15 s = 300 s with no advance |
| 1355 | const HC_DSUP_SILENT_POLLS: i64 = 40 |
| 1356 | const HC_DSUP_READ_TMO_MS: i64 = 3000 |
| 1357 | const HC_DSUP_STATUS_REQ: *u8 = "GET /status HTTP/1.1\r\nHost: 127.0.0.1:18095\r\nConnection: close\r\n\r\n" |
| 1358 | const HC_DSUP_CYCLE_KEY: *u8 = "cycle=" |
| 1364 | const HC_DSUP_TICK_KEY: *u8 = "tick=" |
| 1661 | const HC_RK_COUNT_PATH: *u8 = "reader_keep.count" as *u8 |
| 2106 | const HC_COPYBUF: i64 = 262144 // chunked-copy buffer for cross-subvolume promote (hc_copy_file) |
| 2450 | const HC_TC_CC: *u8 = "/volume1/homes/elderwesto/nishihost/buildroot/_offc/nx_cc_sovereign.elf" as *u8 |
| 2451 | const HC_TC_CC_NEW: *u8 = "/volume1/homes/elderwesto/nishihost/buildroot/runtime/nx_cc_sovereign.elf.new" as *u8 |
| 2452 | const HC_TC_CC_PREV: *u8 = "/volume1/homes/elderwesto/nishihost/buildroot/_offc/nx_cc_sovereign.elf.prev" as *u8 |
| 2453 | const HC_TC_CC_BAD: *u8 = "/volume1/homes/elderwesto/nishihost/buildroot/_offc/nx_cc_sovereign.elf.bad" as *u8 |
| 2454 | const HC_TC_ASM: *u8 = "/volume1/homes/elderwesto/nishihost/buildroot/_offc/nxasm_x86_main.elf" as *u8 |
| 2455 | const HC_TC_ASM_NEW: *u8 = "/volume1/homes/elderwesto/nishihost/buildroot/runtime/nxasm_x86_main.elf.new" as *u8 |
| 2456 | const HC_TC_ASM_PREV: *u8 = "/volume1/homes/elderwesto/nishihost/buildroot/_offc/nxasm_x86_main.elf.prev" as *u8 |
| 2457 | const HC_TC_ASM_BAD: *u8 = "/volume1/homes/elderwesto/nishihost/buildroot/_offc/nxasm_x86_main.elf.bad" as *u8 |
| 2458 | const HC_TC_SBR: *u8 = "/volume1/homes/elderwesto/nishihost/buildroot/_offc/nx_sov_build_run.elf" as *u8 |
| 2459 | const HC_TC_SBR_NEW: *u8 = "/volume1/homes/elderwesto/nishihost/buildroot/runtime/nx_sov_build_run.elf.new" as *u8 |
| 2460 | const HC_TC_SBR_PREV: *u8 = "/volume1/homes/elderwesto/nishihost/buildroot/_offc/nx_sov_build_run.elf.prev" as *u8 |
| 2461 | const HC_TC_SBR_BAD: *u8 = "/volume1/homes/elderwesto/nishihost/buildroot/_offc/nx_sov_build_run.elf.bad" as *u8 |
| 3243 | 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 |
| 3257 | 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 |
| 3280 | 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 |
| 3296 | 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 |
| 3526 | const HC_JOB_AS_CAP: i64 = 17179869184 |
functions
| 382 | 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 110: frg_install_receipt_checkshc_guard_onehc_spawn_readerhc_guard_readerhc_guard_galx_servehc_guard_arcsrv+104 calls 1: sys_write |
| 383 | func hc_putn(v: i64) -> i64 |
| 389 | 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 } |
| 392 | func hc_write_pid(path: *u8, pid: i64) -> i64 |
| 402 | func hc_read_pid(path: *u8) -> i64 |
| 416 | func hc_sup_touch() -> i64 { return hc_write_pid(HC_SUP_LOCK, sys_now_realtime_sec()) } |
| 417 | func hc_sup_clear() -> i64 { return hc_write_pid(HC_SUP_LOCK, 0) } // mark stale -> the next supervisor claims |
| 418 | func hc_sup_fresh() -> i64 |
| 428 | func hc_spawn() -> i64 |
| 439 | func hc_slen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } |
| 440 | 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 } |
| 441 | func hc_contains(hay: *u8, hn: i64, needle: *u8, nn: i64) -> i64 |
| 451 | func hc_read_cmdline(path: *u8, buf: *u8, cap: i64) -> i64 called by 17: mainproc_kill_by_nameproc_kill_by_twocmd_logintestcmd_mtlsproxytestcmd_mirror+11 calls 3: sys_openat_rdsys_readsys_close |
| 463 | func proc_kill_by_name(needle: *u8, sig: i64) -> i64 |
| 510 | func proc_kill_by_two(n1: *u8, n2: *u8, sig: i64) -> i64 |
| 558 | func proc_alive_by_name(needle: *u8) -> i64 |
| 568 | func hc_spawn_path(pth: *u8) -> i64 |
| 596 | func hc_needs_restart(alive: i64, port: i64) -> i64 |
| 605 | func hc_guard_one(name: *u8, path: *u8, port: i64, ws: *i64, cnt: *i64, pidpath: *u8, write_pid: i64) -> i64 |
| 623 | func hc_spawn_reader() -> i64 called by 3: hc_guard_readercmd_reader_keepcmd_spawntest calls 5: sys_forksys_mmapsys_execve_cleanhc_putssys_exit |
| 637 | 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 |
| 653 | func hc_spawn_arcsrv() -> i64 called by 1: hc_guard_arcsrv calls 7: sys_forknx_setsidsys_openat_wrsys_dup3sys_mmapsys_execve_clean+1 |
| 667 | 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 |
| 683 | 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 |
| 698 | 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 |
| 714 | 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 |
| 728 | 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 |
| 743 | func hc_spawn_synth() -> i64 called by 1: hc_guard_synth calls 7: sys_forknx_setsidsys_openat_wrsys_dup3sys_mmapsys_execve_clean+1 |
| 758 | func hc_spawn_devapi() -> i64 called by 1: hc_guard_devapi calls 7: sys_forknx_setsidsys_openat_wrsys_dup3sys_mmapsys_execve_clean+1 |
| 773 | func hc_spawn_torrent() -> i64 called by 1: hc_guard_torrent calls 7: sys_forknx_setsidsys_openat_wrsys_dup3sys_mmapsys_execve_clean+1 |
| 788 | 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 |
| 809 | func hc_guard_reader(ws: *i64, cnt: *i64) -> i64 |
| 824 | func hc_guard_galx_serve(ws: *i64, cnt: *i64) -> i64 |
| 837 | func hc_guard_arcsrv(ws: *i64, cnt: *i64) -> i64 called by 1: cmd_supervise calls 5: proc_alive_by_namesys_now_realtime_msrg_should_restarthc_putshc_spawn_arcsrv |
| 847 | 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 |
| 860 | 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 |
| 872 | 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 |
| 883 | func hc_spawn_relate() -> i64 called by 1: hc_guard_relate calls 7: sys_forknx_setsidsys_openat_wrsys_dup3sys_mmapsys_execve_clean+1 |
| 899 | 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 |
| 910 | func hc_spawn_cleanserve() -> i64 called by 1: hc_guard_cleanserve calls 7: sys_forknx_setsidsys_openat_wrsys_dup3sys_mmapsys_execve_clean+1 |
| 926 | func hc_guard_cleanserve(ws: *i64, cnt: *i64) -> i64 |
| 937 | 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 |
| 953 | func hc_guard_mesh_serve(ws: *i64, cnt: *i64) -> i64 |
| 964 | 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 |
| 980 | 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 |
| 991 | func hc_spawn_project() -> i64 called by 1: hc_guard_project calls 7: sys_forknx_setsidsys_openat_wrsys_dup3sys_mmapsys_execve_clean+1 |
| 1008 | 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 |
| 1019 | func hc_spawn_mgmt() -> i64 called by 1: hc_guard_mgmt calls 7: sys_forknx_setsidsys_openat_wrsys_dup3sys_mmapsys_execve_clean+1 |
| 1035 | 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 |
| 1046 | func hc_spawn_admin() -> i64 called by 1: hc_guard_admin calls 7: sys_forknx_setsidsys_openat_wrsys_dup3sys_mmapsys_execve_clean+1 |
| 1076 | func hc_guard_admin(ws: *i64, cnt: *i64) -> i64 called by 1: cmd_supervise calls 9: proc_alive_by_namehp_socket_deadhc_putshc_putnrg_bind_grace_expiredsys_now_realtime_ms+3 |
| 1110 | func hc_spawn_mailportal() -> i64 called by 1: hc_guard_mailportal calls 7: sys_forknx_setsidsys_openat_wrsys_dup3sys_mmapsys_execve_clean+1 |
| 1126 | func hc_guard_mailportal(ws: *i64, cnt: *i64) -> i64 |
| 1137 | func hc_spawn_siteedit() -> i64 called by 1: hc_guard_siteedit calls 7: sys_forknx_setsidsys_openat_wrsys_dup3sys_mmapsys_execve_clean+1 |
| 1153 | 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 |
| 1163 | func hc_spawn_inventory() -> i64 called by 1: hc_guard_inventory calls 7: sys_forknx_setsidsys_openat_wrsys_dup3sys_mmapsys_execve_clean+1 |
| 1181 | func hc_guard_inventory(ws: *i64, cnt: *i64) -> i64 called by 1: cmd_supervise calls 5: proc_alive_by_namesys_now_realtime_msrg_should_restarthc_putshc_spawn_inventory |
| 1192 | func hc_spawn_tapi() -> i64 called by 1: hc_guard_tapi calls 7: sys_forknx_setsidsys_openat_wrsys_dup3sys_mmapsys_execve_clean+1 |
| 1208 | 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 |
| 1219 | func hc_spawn_fin() -> i64 |
| 1235 | 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 |
| 1247 | func hc_spawn_health() -> i64 called by 1: hc_guard_health calls 7: sys_forknx_setsidsys_openat_wrsys_dup3sys_mmapsys_execve_clean+1 |
| 1264 | 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 |
| 1275 | func hc_spawn_sig2() -> i64 called by 1: hc_guard_sig2 calls 7: sys_forknx_setsidsys_openat_wrsys_dup3sys_mmapsys_execve_clean+1 |
| 1291 | 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 |
| 1319 | func hc_spawn_dsup() -> i64 |
| 1366 | func hc_dsup_scan(buf: *u8, bs: i64, n: i64, key: *u8) -> i64 |
| 1385 | func hc_dsup_cycle() -> i64 |
| 1396 | func hc_guard_dsup(ws: *i64, cnt: *i64, st: *i64) -> i64 called by 1: cmd_supervise calls 10: proc_alive_by_namehc_dsup_cyclerg_stale_cyclerg_silent_stalehc_putshc_putn+4 |
| 1422 | func hc_spawn_dist() -> i64 called by 1: hc_guard_dist calls 7: sys_forknx_setsidsys_openat_wrsys_dup3sys_mmapsys_execve_clean+1 |
| 1438 | 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 |
| 1449 | func hc_spawn_seed() -> i64 called by 1: hc_guard_seed calls 7: sys_forknx_setsidsys_openat_wrsys_dup3sys_mmapsys_execve_clean+1 |
| 1465 | 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 |
| 1476 | func hc_spawn_seedann() -> i64 called by 1: hc_guard_seedann calls 7: sys_forknx_setsidsys_openat_wrsys_dup3sys_mmapsys_execve_clean+1 |
| 1491 | 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 |
| 1502 | func hc_spawn_mp() -> i64 |
| 1518 | 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 |
| 1530 | 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 |
| 1540 | 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 |
| 1553 | 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 |
| 1565 | 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 |
| 1576 | func cmd_kickdevapi() -> i64 |
| 1584 | func cmd_devapitoolchain() -> i64 |
| 1602 | 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 |
| 1614 | func hc_guard_torrent_gw(ws: *i64, cnt: *i64) -> i64 |
| 1626 | 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 |
| 1651 | func hc_keep_delay(fastfails: i64, shortfails: i64) -> i64 called by 1: cmd_reader_keep |
| 1662 | func cmd_reader_keep() -> i64 called by 1: cmd_supervise calls 10: hc_putshc_putnsys_mmapproc_alive_by_namesys_sleep_mssys_now_us+4 |
| 1730 | 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 } |
| 1731 | func hc_catn(dst: *u8, off: i64, v: i64) -> i64 |
| 1738 | func hc_status_row(dst: *u8, off: i64, name: *u8, label: *u8) -> i64 |
| 1755 | func hc_rwin(cnt: *i64, ws: *i64, now: i64) -> i64 called by 1: cmd_supervise |
| 1759 | func hc_snap_svc(buf: *u8, o: i64, name: *u8, port: i64, rwin: i64) -> i64 |
| 1777 | 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 |
| 1811 | func hc_emit_status_html(now: i64) -> i64 |
| 1842 | func hc_assert_overcommit() -> i64 |
| 1851 | func cmd_supervise() -> i64 called by 1: cmd_takeover calls 51: nx_fd_scrub_inheritedhc_putshc_assert_overcommithc_sup_freshhc_sup_touchsys_fork+45 |
| 1978 | func cmd_deploy() -> i64 |
| 2022 | func cmd_mgmtdeploy() -> i64 |
| 2096 | func cmd_mgmtrollback() -> i64 |
| 2111 | func hc_exists(p: *u8) -> i64 { let fd: i64 = sys_openat_rd(p); if fd < 0 { return 0 } sys_close(fd); return 1 } |
| 2121 | func hc_put_rc(label: *u8, rc: i64) -> i64 |
| 2132 | 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 |
| 2144 | func hc_file_size(p: *u8) -> i64 |
| 2172 | func hc_promote_to_expect(nhnew: *u8, live: *u8, prev: *u8, expect_size: i64) -> i64 |
| 2217 | func hc_promote_to(nhnew: *u8, live: *u8, prev: *u8) -> i64 |
| 2235 | func hc_pathsuf(dst: *u8, live: *u8, suf: *u8) -> *u8 |
| 2246 | func hc_sovname(dst: *u8, live: *u8) -> *u8 |
| 2262 | func hc_deploy_one(live: *u8, killname: *u8) -> i64 |
| 2313 | func hc_prefix(s: *u8, p: *u8) -> i64 |
| 2327 | func hc_row_field(rowname: *u8, want: i64, out: *u8) -> i64 |
| 2383 | func cmd_gdeploy(live: *u8, killname: *u8) -> i64 |
| 2410 | func cmd_gdeploy_rollback(live: *u8, killname: *u8) -> i64 |
| 2462 | func cmd_toolchaindeploy() -> i64 |
| 2473 | func cmd_toolchainrollback() -> i64 |
| 2484 | func cmd_torrentdeploy() -> i64 |
| 2520 | func cmd_torrentrollback() -> i64 |
| 2536 | func cmd_relatedeploy() -> i64 |
| 2543 | func cmd_relaterollback() -> i64 |
| 2552 | func cmd_xlatedeploy() -> i64 |
| 2559 | func cmd_xlaterollback() -> i64 |
| 2568 | func cmd_cleanservedeploy() -> i64 |
| 2578 | func cmd_docportaldeploy() -> i64 |
| 2585 | func cmd_docportalrollback() -> i64 |
| 2592 | func cmd_cleanserverollback() -> i64 |
| 2601 | func cmd_rollback() -> i64 |
| 2614 | func cmd_certswap() -> i64 |
| 2628 | func cmd_certrollback() -> i64 |
| 2638 | func hc_spawn_login() -> i64 |
| 2654 | func cmd_logintest() -> i64 |
| 2679 | func cmd_runmtlsproxy() -> i64 |
| 2691 | func cmd_mtlsproxytest() -> i64 |
| 2707 | func cmd_runmirror() -> i64 |
| 2718 | func cmd_mirror() -> i64 |
| 2729 | func cmd_runmirrorpar() -> i64 |
| 2739 | func cmd_mirrorpar() -> i64 |
| 2750 | func cmd_mirrorstop() -> i64 |
| 2759 | func cmd_rundistpub() -> i64 |
| 2770 | func cmd_distpub() -> i64 |
| 2780 | func cmd_rundistserve() -> i64 |
| 2790 | func cmd_rundistprobe() -> i64 |
| 2800 | func cmd_distserve() -> i64 |
| 2809 | func cmd_distprobe() -> i64 |
| 2817 | func cmd_runandelin() -> i64 |
| 2827 | func cmd_runsnir() -> i64 |
| 2840 | func cmd_nftread() -> i64 |
| 2851 | func cmd_nettap(port: *u8) -> i64 |
| 2865 | func cmd_platformtest() -> i64 |
| 2882 | func cmd_logindeploy() -> i64 |
| 2895 | func cmd_loginrollback() -> i64 |
| 2910 | func cmd_hubdeploy() -> i64 |
| 2923 | func cmd_gendeploy() -> i64 |
| 2936 | func cmd_genprobe() -> i64 |
| 2961 | func cmd_takeover() -> i64 |
| 2998 | func cmd_selftest() -> i64 |
| 3049 | func cmd_selfswap() -> i64 |
| 3092 | func cmd_superrollback() -> i64 |
| 3109 | func cmd_supervisetest() -> i64 |
| 3125 | func cmd_spawntest() -> i64 |
| 3145 | func hc_dfork_exec(arg: *u8) -> i64 |
| 3163 | func hc_daemonize_supervise() -> i64 { return hc_dfork_exec(HC_SUPERVISE) } |
| 3167 | func cmd_sleeper() -> i64 calls 1: sys_sleep_ms |
| 3175 | func cmd_daemontest() -> i64 |
| 3190 | func cmd_reconcile() -> i64 |
| 3210 | func cmd_kickreader() -> i64 |
| 3223 | func cmd_kicktorrent() -> i64 |
| 3234 | func cmd_kickseed() -> i64 |
| 3244 | func cmd_routerctl() -> i64 |
| 3258 | func cmd_portmap() -> i64 |
| 3281 | func cmd_trackerrefresh() -> i64 |
| 3297 | func cmd_reseed() -> i64 |
| 3314 | func cmd_kickworkers() -> i64 |
| 3322 | func cmd_torstat() -> i64 |
| 3336 | func cmd_kickseedann() -> i64 |
| 3347 | func cmd_kicktorrentgw() -> i64 |
| 3361 | func cmd_killdurindex() -> i64 |
| 3372 | func hc_spawn_durindex_job() -> i64 called by 1: cmd_durindexrun calls 11: sys_forknx_setsidsys_chdirsys_closesys_openat_wrsys_openat_append+5 |
| 3399 | func hc_spawn_pipeline_job() -> i64 called by 2: cmd_galxpipelinekickcmd_galxpipeline calls 11: sys_forknx_setsidsys_chdirsys_closesys_openat_wrsys_openat_append+5 |
| 3425 | func hc_spawn_idxbackfill_job() -> i64 called by 2: cmd_galxidxkickcmd_galxidxrun calls 11: sys_forknx_setsidsys_chdirsys_closesys_openat_wrsys_openat_append+5 |
| 3453 | func cmd_galxidxkick() -> i64 |
| 3473 | func cmd_galxpipelinekick() -> i64 |
| 3490 | func cmd_galxidxrun() -> i64 |
| 3497 | func cmd_galxpipeline() -> i64 |
| 3527 | func hc_spawn_searchpipe_job(organ: *u8, a1: *u8, a2: *u8) -> i64 |
| 3574 | func cmd_searchpagerank() -> i64 |
| 3582 | func cmd_searchcompact() -> i64 |
| 3602 | func hc_file_age_s(path: *u8) -> i64 |
| 3611 | func cmd_searchcrawl() -> i64 |
| 3641 | func cmd_durindexrun() -> i64 |
| 3648 | func hc_count_lines(path: *u8) -> i64 |
| 3657 | func hc_tail(path: *u8, nb: i64) -> i64 called by 3: cmd_durindexstatcmd_tsdurtestcmd_durbinbuild calls 4: sys_mmapsys_read_filehc_putssys_write |
| 3667 | func cmd_durindexstat() -> i64 |
| 3678 | func hc_nth_line(buf: *u8, sz: i64, n: i64, out: *u8) -> i64 called by 1: cmd_tsdurtest |
| 3692 | func cmd_tsdurtest() -> i64 |
| 3717 | func cmd_durbinbuild() -> i64 |
| 3742 | func hc_copyfile(src: *u8, dst: *u8) -> i64 |