# Operations ## Environment Remote server: - SSH: `ubuntu@66.253.42.170` - App dir: `/opt/okx-codex-trader` - Runtime user: `okxbot` - Env file: `/etc/okx-codex-trader/okx.env` - Local repo: `/home/lxy/okx-codex-trader` Do not print secrets from the env file. Only check whether required keys exist when needed. ## Services Live executor: - `bb-squeeze-executor.service` Read-only observers: - `bb-squeeze-t-gated-observer.service` - `calendar-fusion-observer.service` - `crash-follow-short-observer.service` - `eth-focused-portfolio-observer.service` - `eth-nextgen-micro-observer.service` - `high-frequency-portfolio-observer.service` - `short-bias-readonly-observer.service` Historical or dry-run service files may exist in `deploy/`, but the list above is the current operational set. ## Monitoring Service status: ```bash rtk ssh ubuntu@66.253.42.170 'systemctl status bb-squeeze-executor.service --no-pager -l' rtk ssh ubuntu@66.253.42.170 'systemctl status high-frequency-portfolio-observer.service --no-pager -l' ``` All relevant services: ```bash rtk ssh ubuntu@66.253.42.170 'systemctl list-units --type=service --all --no-pager | grep -Ei "bb-squeeze|observer|eth|short-bias|calendar|crash|high-frequency"' ``` Recent live executor events: ```bash rtk ssh ubuntu@66.253.42.170 'cd /opt/okx-codex-trader && tail -n 80 var/bb-squeeze-executor/events.jsonl' ``` Unified observer snapshot: ```bash rtk ssh ubuntu@66.253.42.170 'cd /opt/okx-codex-trader && sudo -u okxbot .venv/bin/python scripts/summarize_readonly_observers.py && sed -n "1,120p" reports/live-recent/readonly-observers-snapshot.md' ``` Individual heartbeats: ```bash rtk ssh ubuntu@66.253.42.170 'cd /opt/okx-codex-trader && python3 -m json.tool var/high-frequency-portfolio/heartbeat.json | sed -n "1,160p"' rtk ssh ubuntu@66.253.42.170 'cd /opt/okx-codex-trader && python3 -m json.tool var/calendar-fusion/heartbeat.json | sed -n "1,160p"' rtk ssh ubuntu@66.253.42.170 'cd /opt/okx-codex-trader && python3 -m json.tool var/short-bias-readonly/heartbeat.json | sed -n "1,160p"' ``` ## Deploying Script Changes For a targeted script-only deploy: ```bash rtk scp scripts/