maqpna top
Show resource use, tokens and cost of sessions or agents (kubectl top)
Synopsis#
maqpna top sessions [NAME] [-n NS | -A] [-l SELECTOR] [--sort-by cpu|memory|cost|tokens] [--gateway URL] [--no-headers]
maqpna top agents [-n NS | -A] [--sort-by cpu|memory|cost|tokens] [--gateway URL] [--no-headers]Description#
Running sessions with the CPU and memory of their sandbox pods (needs the metrics API, e.g. metrics-server) and, with a gateway, their model calls, tokens and cost. top agents sums them per agent. A column without its source shows "-".
Subcommands#
maqpna top sessionsCPU, memory, model calls, tokens and cost of running sessions
maqpna top agentsCPU, memory, model calls, tokens and cost summed per agent
Examples#
maqpna top sessions -n team-a --sort-by cost
maqpna top agents -A --gateway https://gw.example.comWhat happens when you run it#
- Prints a table by default;
-o jsonor-o yamlprint the data, and--jq EXPRfilters the JSON.
Exit codes#
| Code | Meaning |
|---|---|
0 | success |
1 | error (the message says what failed, with a hint when there is one) |
2 | usage error: unknown flag, missing argument or bad value; the synopsis is printed |
3 | a check failed, a change is blocked, or a result did not match (tamper, policy mismatch) (not used by this command) |