diff --git a/docs/reference.md b/docs/reference.md index 98a7ebcdd..5ecc4f8dd 100644 --- a/docs/reference.md +++ b/docs/reference.md @@ -1812,6 +1812,23 @@ any other `Host` are refused 403, with a gateway key too. With `MAGPIE_ADDR` on an address that isn't loopback, the call isn't from loopback, so it is refused as well. +`magpie cpu [] [--seconds N]` is for a report of magpie using too +much CPU (@LeiCheng42 on X, while Codex ran). It asks the same running +magpie for `GET /v1/magpie/cpu?seconds=N`, a Go CPU profile recorded for +30 seconds, or N from 5 to 120 (`runtime/pprof`'s CPU profile, gzipped +protobuf, which `go tool pprof` reads). While it records, use magpie as +you do when it is busy, such as running Codex: the gateway goes on serving +every other call, and the profile is of that. It writes the profile to +``, else `magpie-cpu--