Copy-paste oriented. Prefer python -m sysspectogram from a venv with .env loaded for Telegram.
# quiet baseline ~30m
python -m sysspectogram collect --out data/normal.csv --duration 1800
# anomaly (CPU) — other terminal
python -m sysspectogram simulate cpu --duration 900 --workers 8
# while that runs:
python -m sysspectogram collect --out data/anomaly_cpu.csv --duration 900
python -m sysspectogram build-dataset \
--normal data/normal.csv \
--anomaly data/anomaly_cpu.csv \
--out dataset/real \
--window 60 --stride 5 --png \
--max-normal-cpu-mean 25 --min-anomaly-cpu-mean 45
python -m sysspectogram train --dataset dataset/real --out artifacts/real_v3 --epochs 25Why these flags: filter overlapping windows so normal stays low-CPU and anomalies stay hot; improves F1 vs raw CSVs.
python -m sysspectogram simulate net --duration 600 --rate 120 &
python -m sysspectogram collect --out data/anomaly_net.csv --duration 600
python -m sysspectogram simulate mem --duration 300 --mb 8192 &
python -m sysspectogram collect --out data/anomaly_mem.csv --duration 300
python -m sysspectogram build-dataset \
--normal data/normal.csv \
--anomaly data/anomaly_cpu.csv data/anomaly_net.csv \
--out dataset/real_mix --window 60 --stride 5# safe first
python -m sysspectogram guard --model artifacts/real_v3 \
--telegram --dry-run --jsonl-out reports/guard.jsonl
# then real response actions (still needs TG confirm for ban/kill)
python -m sysspectogram guard --model artifacts/real_v3 \
--telegram --jsonl-out /var/log/sysspectogram-guard.jsonlpython -m sysspectogram watch-perimeter --jsonl-out reports/perimeter.jsonl
python -m sysspectogram recon 198.51.100.20
python -m sysspectogram lab-nmap 127.0.0.1 --labpython -m sysspectogram analyze \
--csv data/anomaly_cpu.csv --model artifacts/real_v3 \
--out reports/analyze.json
python -m sysspectogram audit report --out reports/audit.json
python -m sysspectogram audit rootkit
python -m sysspectogram audit processes
python -m sysspectogram audit portspython -m sysspectogram simulate cpu --duration 120 --workers 8
python -m sysspectogram simulate mem --duration 90 --mb 8192
python -m sysspectogram simulate disk --duration 60 --block-mb 32
python -m sysspectogram simulate net --duration 60 --rate 120
python -m sysspectogram simulate gpu --duration 60 --gpu-size 4096 # needs CUDA torch
# or scripts: simulations/cpu_miner.py, simulations/intrusion/lab_runner.py --lab ...- Start
guard --telegram --dry-run --model ... /panel— readable dual heatmap/score— one-shot model check/simulate cpu 40→ YES — force host alert- On alert: Ban is dry-run until you drop
--dry-run /recon <ip>//audit//recipes
# edit paths + Environment=TELEGRAM_* in:
# scripts/systemd/sysspectogram-guard.service
sudo systemctl enable --now sysspectogram-guard.service