MAQPNADocs

maqpna top

Show resource use, tokens and cost of sessions or agents (kubectl top)

Observe-o json | yaml

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#

Examples#

maqpna top sessions -n team-a --sort-by cost
maqpna top agents -A --gateway https://gw.example.com

What happens when you run it#

  • Prints a table by default; -o json or -o yaml print the data, and --jq EXPR filters the JSON.

Exit codes#

CodeMeaning
0success
1error (the message says what failed, with a hint when there is one)
2usage error: unknown flag, missing argument or bad value; the synopsis is printed
3a check failed, a change is blocked, or a result did not match (tamper, policy mismatch) (not used by this command)