API: `docker top` ignores the ps arguments (`ps_args`)
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 55/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- docker, rust
- Ambito
- backend-api-design
Direzione di ricerca
Start at the daemon handler for GET /containers/{id}/top and trace how it handles ps_args; compare that path with the Docker Engine API behavior described in the issue. The report includes no source file or test names, so first locate the endpoint and its tests. Done means supported arguments such as aux and -eo pid,rss,args affect the returned process columns, or unsupported arguments return an error.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Kiri version and system
- Kiri 0.2.1 (engine 27.5.1), docker CLI 29.9.3
- macOS 27.2, Apple M4 Pro
~/.kiri/vm.json:{"cpus":6,"memory_mib":16384}
What you did
docker run -d -i --name top-a busybox:1.37 cat
docker top top-a
docker top top-a aux
docker top top-a -eo pid,rss,args
curl --unix-socket ~/.kiri/run/docker.sock 'http://localhost/v1.47/containers/top-a/top?ps_args=aux'
What happened
All three docker top commands print the same default columns, and the API answers the same for ps_args=aux, so the arguments are dropped in the daemon, not in the CLI:
UID PID PPID C STIME TTY TIME CMD
root 22838 1 0 05:43 ? 00:00:00 cat
{"Processes":[["root","22838","1","0","05:43","?","00:00:00","cat"]],"Titles":["UID","PID","PPID","C","STIME","TTY","TIME","CMD"]}
What you expected instead
The Engine API defines ps_args on GET /containers/{id}/top as the arguments passed to ps, with -ef as the default. With Docker, docker top top-a aux lists the columns of ps aux (USER, PID, %CPU, %MEM, VSZ, RSS, …), and -eo pid,rss,args lists PID, RSS and COMMAND.
If only the default can be supported, an error for other ps_args would at least make the difference visible.
Anything else
I hit this while reading a server's memory in an image without a shell or ps, where docker top CONTAINER -eo pid,rss,args is the way to get it without changing the container. Under Kiri the command succeeds but has no memory column.
- Lingua principale
- Rust
- Stelle
- 7.5k
- Fork
- 329
- Merge medio
- 7h 48m
- PR unite (30g)
- 105
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di libracoder/kiri
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
libracoder/kiri#364 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
libracoder/kiri#289 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 47/100
libracoder/kiri#365 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 35/100
libracoder/kiri#362 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 47/100
libracoder/kiri#359 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di libracoder/kiri
Issue simili
-
benchmark-review
Difficoltà 2/5 1-3 ore Idoneità per principianti 63/100
I maintainer di solito rispondono entro 1 giorno
-
area:filesystem bug need-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Captions panel does not offer to show an existing transcriptForse già presa @thedavidweng l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
CapSoftware/Cap#4276 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
matrix-org/matrix-rust-sdk#7495 ·
I maintainer di solito rispondono entro 1 giorno