Cost Tracking
swm tracks GPU spending locally in a SQLite database, with per-session granularity and provider billing reconciliation.
How it works
Section titled “How it works”Every pod create, pod start, pod stop, and pod terminate automatically records a billing session with the GPU’s hourly rate and timestamps.
Commands
Section titled “Commands”swm costs live # running cost of active podsswm costs summary --period week # spending breakdownswm costs log -n 20 # session-by-session logswm costs reconcile -p runpod # compare against provider chargesBudgets
Section titled “Budgets”Set spending limits with alerts:
swm costs budget set 100 --scope global --period monthlyswm costs budget set 50 --scope provider:runpod --period weeklyswm costs budget showBudgets are advisory — they warn at 80% and 100% thresholds but don’t block operations.
Reconciliation
Section titled “Reconciliation”swm costs reconcile queries actual provider billing APIs and compares against local estimates:
- RunPod: Account balance, lifetime spend, per-GPU-type usage
- Vast.ai: Invoice history with service filters
Data location
Section titled “Data location”Cost data is stored at ~/.config/swm/costs.db (SQLite with WAL mode).