mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #18171 from MHBauer/gh7205
update 'top' api endpoint documentation
This commit is contained in:
commit
919a068fb6
9 changed files with 363 additions and 192 deletions
|
@ -269,40 +269,59 @@ Status Codes:
|
||||||
|
|
||||||
`GET /containers/(id)/top`
|
`GET /containers/(id)/top`
|
||||||
|
|
||||||
List processes running inside the container `id`
|
List processes running inside the container `id`. On Unix systems this
|
||||||
|
is done by running the `ps` command. This endpoint is not
|
||||||
|
supported on Windows.
|
||||||
|
|
||||||
**Example request**:
|
**Example request**:
|
||||||
|
|
||||||
GET /containers/4fa6e0f0c678/top HTTP/1.1
|
GET /containers/4fa6e0f0c678/top HTTP/1.1
|
||||||
|
|
||||||
**Example response**:
|
**Example response**:
|
||||||
|
|
||||||
HTTP/1.1 200 OK
|
HTTP/1.1 200 OK
|
||||||
Content-Type: application/json
|
Content-Type: application/json
|
||||||
|
|
||||||
{
|
{
|
||||||
"Titles": [
|
"Titles" : [
|
||||||
"USER",
|
"UID", "PID", "PPID", "C", "STIME", "TTY", "TIME", "CMD"
|
||||||
"PID",
|
],
|
||||||
"%CPU",
|
"Processes" : [
|
||||||
"%MEM",
|
[
|
||||||
"VSZ",
|
"root", "13642", "882", "0", "17:03", "pts/0", "00:00:00", "/bin/bash"
|
||||||
"RSS",
|
],
|
||||||
"TTY",
|
[
|
||||||
"STAT",
|
"root", "13735", "13642", "0", "17:06", "pts/0", "00:00:00", "sleep 10"
|
||||||
"START",
|
]
|
||||||
"TIME",
|
]
|
||||||
"COMMAND"
|
}
|
||||||
],
|
|
||||||
"Processes": [
|
**Example request**:
|
||||||
["root","20147","0.0","0.1","18060","1864","pts/4","S","10:06","0:00","bash"],
|
|
||||||
["root","20271","0.0","0.0","4312","352","pts/4","S+","10:07","0:00","sleep","10"]
|
GET /containers/4fa6e0f0c678/top?ps_args=aux HTTP/1.1
|
||||||
]
|
|
||||||
}
|
**Example response**:
|
||||||
|
|
||||||
|
HTTP/1.1 200 OK
|
||||||
|
Content-Type: application/json
|
||||||
|
|
||||||
|
{
|
||||||
|
"Titles" : [
|
||||||
|
"USER","PID","%CPU","%MEM","VSZ","RSS","TTY","STAT","START","TIME","COMMAND"
|
||||||
|
]
|
||||||
|
"Processes" : [
|
||||||
|
[
|
||||||
|
"root","13642","0.0","0.1","18172","3184","pts/0","Ss","17:03","0:00","/bin/bash"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"root","13895","0.0","0.0","4348","692","pts/0","S+","17:15","0:00","sleep 10"
|
||||||
|
]
|
||||||
|
],
|
||||||
|
}
|
||||||
|
|
||||||
Query Parameters:
|
Query Parameters:
|
||||||
|
|
||||||
- **ps_args** – ps arguments to use (e.g., aux)
|
- **ps_args** – `ps` arguments to use (e.g., `aux`), defaults to `-ef`
|
||||||
|
|
||||||
Status Codes:
|
Status Codes:
|
||||||
|
|
||||||
|
|
|
@ -357,40 +357,59 @@ Status Codes:
|
||||||
|
|
||||||
`GET /containers/(id)/top`
|
`GET /containers/(id)/top`
|
||||||
|
|
||||||
List processes running inside the container `id`
|
List processes running inside the container `id`. On Unix systems this
|
||||||
|
is done by running the `ps` command. This endpoint is not
|
||||||
|
supported on Windows.
|
||||||
|
|
||||||
**Example request**:
|
**Example request**:
|
||||||
|
|
||||||
GET /containers/4fa6e0f0c678/top HTTP/1.1
|
GET /containers/4fa6e0f0c678/top HTTP/1.1
|
||||||
|
|
||||||
**Example response**:
|
**Example response**:
|
||||||
|
|
||||||
HTTP/1.1 200 OK
|
HTTP/1.1 200 OK
|
||||||
Content-Type: application/json
|
Content-Type: application/json
|
||||||
|
|
||||||
{
|
{
|
||||||
"Titles": [
|
"Titles" : [
|
||||||
"USER",
|
"UID", "PID", "PPID", "C", "STIME", "TTY", "TIME", "CMD"
|
||||||
"PID",
|
],
|
||||||
"%CPU",
|
"Processes" : [
|
||||||
"%MEM",
|
[
|
||||||
"VSZ",
|
"root", "13642", "882", "0", "17:03", "pts/0", "00:00:00", "/bin/bash"
|
||||||
"RSS",
|
],
|
||||||
"TTY",
|
[
|
||||||
"STAT",
|
"root", "13735", "13642", "0", "17:06", "pts/0", "00:00:00", "sleep 10"
|
||||||
"START",
|
]
|
||||||
"TIME",
|
]
|
||||||
"COMMAND"
|
}
|
||||||
],
|
|
||||||
"Processes": [
|
**Example request**:
|
||||||
["root","20147","0.0","0.1","18060","1864","pts/4","S","10:06","0:00","bash"],
|
|
||||||
["root","20271","0.0","0.0","4312","352","pts/4","S+","10:07","0:00","sleep","10"]
|
GET /containers/4fa6e0f0c678/top?ps_args=aux HTTP/1.1
|
||||||
]
|
|
||||||
}
|
**Example response**:
|
||||||
|
|
||||||
|
HTTP/1.1 200 OK
|
||||||
|
Content-Type: application/json
|
||||||
|
|
||||||
|
{
|
||||||
|
"Titles" : [
|
||||||
|
"USER","PID","%CPU","%MEM","VSZ","RSS","TTY","STAT","START","TIME","COMMAND"
|
||||||
|
]
|
||||||
|
"Processes" : [
|
||||||
|
[
|
||||||
|
"root","13642","0.0","0.1","18172","3184","pts/0","Ss","17:03","0:00","/bin/bash"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"root","13895","0.0","0.0","4348","692","pts/0","S+","17:15","0:00","sleep 10"
|
||||||
|
]
|
||||||
|
],
|
||||||
|
}
|
||||||
|
|
||||||
Query Parameters:
|
Query Parameters:
|
||||||
|
|
||||||
- **ps_args** – ps arguments to use (e.g., aux)
|
- **ps_args** – `ps` arguments to use (e.g., `aux`), defaults to `-ef`
|
||||||
|
|
||||||
Status Codes:
|
Status Codes:
|
||||||
|
|
||||||
|
|
|
@ -357,40 +357,59 @@ Status Codes:
|
||||||
|
|
||||||
`GET /containers/(id)/top`
|
`GET /containers/(id)/top`
|
||||||
|
|
||||||
List processes running inside the container `id`
|
List processes running inside the container `id`. On Unix systems this
|
||||||
|
is done by running the `ps` command. This endpoint is not
|
||||||
|
supported on Windows.
|
||||||
|
|
||||||
**Example request**:
|
**Example request**:
|
||||||
|
|
||||||
GET /containers/4fa6e0f0c678/top HTTP/1.1
|
GET /containers/4fa6e0f0c678/top HTTP/1.1
|
||||||
|
|
||||||
**Example response**:
|
**Example response**:
|
||||||
|
|
||||||
HTTP/1.1 200 OK
|
HTTP/1.1 200 OK
|
||||||
Content-Type: application/json
|
Content-Type: application/json
|
||||||
|
|
||||||
{
|
{
|
||||||
"Titles": [
|
"Titles" : [
|
||||||
"USER",
|
"UID", "PID", "PPID", "C", "STIME", "TTY", "TIME", "CMD"
|
||||||
"PID",
|
],
|
||||||
"%CPU",
|
"Processes" : [
|
||||||
"%MEM",
|
[
|
||||||
"VSZ",
|
"root", "13642", "882", "0", "17:03", "pts/0", "00:00:00", "/bin/bash"
|
||||||
"RSS",
|
],
|
||||||
"TTY",
|
[
|
||||||
"STAT",
|
"root", "13735", "13642", "0", "17:06", "pts/0", "00:00:00", "sleep 10"
|
||||||
"START",
|
]
|
||||||
"TIME",
|
]
|
||||||
"COMMAND"
|
}
|
||||||
],
|
|
||||||
"Processes": [
|
**Example request**:
|
||||||
["root","20147","0.0","0.1","18060","1864","pts/4","S","10:06","0:00","bash"],
|
|
||||||
["root","20271","0.0","0.0","4312","352","pts/4","S+","10:07","0:00","sleep","10"]
|
GET /containers/4fa6e0f0c678/top?ps_args=aux HTTP/1.1
|
||||||
]
|
|
||||||
}
|
**Example response**:
|
||||||
|
|
||||||
|
HTTP/1.1 200 OK
|
||||||
|
Content-Type: application/json
|
||||||
|
|
||||||
|
{
|
||||||
|
"Titles" : [
|
||||||
|
"USER","PID","%CPU","%MEM","VSZ","RSS","TTY","STAT","START","TIME","COMMAND"
|
||||||
|
]
|
||||||
|
"Processes" : [
|
||||||
|
[
|
||||||
|
"root","13642","0.0","0.1","18172","3184","pts/0","Ss","17:03","0:00","/bin/bash"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"root","13895","0.0","0.0","4348","692","pts/0","S+","17:15","0:00","sleep 10"
|
||||||
|
]
|
||||||
|
],
|
||||||
|
}
|
||||||
|
|
||||||
Query Parameters:
|
Query Parameters:
|
||||||
|
|
||||||
- **ps_args** – ps arguments to use (e.g., aux)
|
- **ps_args** – `ps` arguments to use (e.g., `aux`), defaults to `-ef`
|
||||||
|
|
||||||
Status Codes:
|
Status Codes:
|
||||||
|
|
||||||
|
|
|
@ -396,40 +396,59 @@ Status Codes:
|
||||||
|
|
||||||
`GET /containers/(id)/top`
|
`GET /containers/(id)/top`
|
||||||
|
|
||||||
List processes running inside the container `id`
|
List processes running inside the container `id`. On Unix systems this
|
||||||
|
is done by running the `ps` command. This endpoint is not
|
||||||
|
supported on Windows.
|
||||||
|
|
||||||
**Example request**:
|
**Example request**:
|
||||||
|
|
||||||
GET /containers/4fa6e0f0c678/top HTTP/1.1
|
GET /containers/4fa6e0f0c678/top HTTP/1.1
|
||||||
|
|
||||||
**Example response**:
|
**Example response**:
|
||||||
|
|
||||||
HTTP/1.1 200 OK
|
HTTP/1.1 200 OK
|
||||||
Content-Type: application/json
|
Content-Type: application/json
|
||||||
|
|
||||||
{
|
{
|
||||||
"Titles": [
|
"Titles" : [
|
||||||
"USER",
|
"UID", "PID", "PPID", "C", "STIME", "TTY", "TIME", "CMD"
|
||||||
"PID",
|
],
|
||||||
"%CPU",
|
"Processes" : [
|
||||||
"%MEM",
|
[
|
||||||
"VSZ",
|
"root", "13642", "882", "0", "17:03", "pts/0", "00:00:00", "/bin/bash"
|
||||||
"RSS",
|
],
|
||||||
"TTY",
|
[
|
||||||
"STAT",
|
"root", "13735", "13642", "0", "17:06", "pts/0", "00:00:00", "sleep 10"
|
||||||
"START",
|
]
|
||||||
"TIME",
|
]
|
||||||
"COMMAND"
|
}
|
||||||
],
|
|
||||||
"Processes": [
|
**Example request**:
|
||||||
["root","20147","0.0","0.1","18060","1864","pts/4","S","10:06","0:00","bash"],
|
|
||||||
["root","20271","0.0","0.0","4312","352","pts/4","S+","10:07","0:00","sleep","10"]
|
GET /containers/4fa6e0f0c678/top?ps_args=aux HTTP/1.1
|
||||||
]
|
|
||||||
}
|
**Example response**:
|
||||||
|
|
||||||
|
HTTP/1.1 200 OK
|
||||||
|
Content-Type: application/json
|
||||||
|
|
||||||
|
{
|
||||||
|
"Titles" : [
|
||||||
|
"USER","PID","%CPU","%MEM","VSZ","RSS","TTY","STAT","START","TIME","COMMAND"
|
||||||
|
]
|
||||||
|
"Processes" : [
|
||||||
|
[
|
||||||
|
"root","13642","0.0","0.1","18172","3184","pts/0","Ss","17:03","0:00","/bin/bash"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"root","13895","0.0","0.0","4348","692","pts/0","S+","17:15","0:00","sleep 10"
|
||||||
|
]
|
||||||
|
],
|
||||||
|
}
|
||||||
|
|
||||||
Query Parameters:
|
Query Parameters:
|
||||||
|
|
||||||
- **ps_args** – ps arguments to use (e.g., aux)
|
- **ps_args** – `ps` arguments to use (e.g., `aux`), defaults to `-ef`
|
||||||
|
|
||||||
Status Codes:
|
Status Codes:
|
||||||
|
|
||||||
|
|
|
@ -434,40 +434,59 @@ Status Codes:
|
||||||
|
|
||||||
`GET /containers/(id)/top`
|
`GET /containers/(id)/top`
|
||||||
|
|
||||||
List processes running inside the container `id`
|
List processes running inside the container `id`. On Unix systems this
|
||||||
|
is done by running the `ps` command. This endpoint is not
|
||||||
|
supported on Windows.
|
||||||
|
|
||||||
**Example request**:
|
**Example request**:
|
||||||
|
|
||||||
GET /containers/4fa6e0f0c678/top HTTP/1.1
|
GET /containers/4fa6e0f0c678/top HTTP/1.1
|
||||||
|
|
||||||
**Example response**:
|
**Example response**:
|
||||||
|
|
||||||
HTTP/1.1 200 OK
|
HTTP/1.1 200 OK
|
||||||
Content-Type: application/json
|
Content-Type: application/json
|
||||||
|
|
||||||
{
|
{
|
||||||
"Titles": [
|
"Titles" : [
|
||||||
"USER",
|
"UID", "PID", "PPID", "C", "STIME", "TTY", "TIME", "CMD"
|
||||||
"PID",
|
],
|
||||||
"%CPU",
|
"Processes" : [
|
||||||
"%MEM",
|
[
|
||||||
"VSZ",
|
"root", "13642", "882", "0", "17:03", "pts/0", "00:00:00", "/bin/bash"
|
||||||
"RSS",
|
],
|
||||||
"TTY",
|
[
|
||||||
"STAT",
|
"root", "13735", "13642", "0", "17:06", "pts/0", "00:00:00", "sleep 10"
|
||||||
"START",
|
]
|
||||||
"TIME",
|
]
|
||||||
"COMMAND"
|
}
|
||||||
],
|
|
||||||
"Processes": [
|
**Example request**:
|
||||||
["root","20147","0.0","0.1","18060","1864","pts/4","S","10:06","0:00","bash"],
|
|
||||||
["root","20271","0.0","0.0","4312","352","pts/4","S+","10:07","0:00","sleep","10"]
|
GET /containers/4fa6e0f0c678/top?ps_args=aux HTTP/1.1
|
||||||
]
|
|
||||||
}
|
**Example response**:
|
||||||
|
|
||||||
|
HTTP/1.1 200 OK
|
||||||
|
Content-Type: application/json
|
||||||
|
|
||||||
|
{
|
||||||
|
"Titles" : [
|
||||||
|
"USER","PID","%CPU","%MEM","VSZ","RSS","TTY","STAT","START","TIME","COMMAND"
|
||||||
|
]
|
||||||
|
"Processes" : [
|
||||||
|
[
|
||||||
|
"root","13642","0.0","0.1","18172","3184","pts/0","Ss","17:03","0:00","/bin/bash"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"root","13895","0.0","0.0","4348","692","pts/0","S+","17:15","0:00","sleep 10"
|
||||||
|
]
|
||||||
|
],
|
||||||
|
}
|
||||||
|
|
||||||
Query Parameters:
|
Query Parameters:
|
||||||
|
|
||||||
- **ps_args** – ps arguments to use (e.g., aux)
|
- **ps_args** – `ps` arguments to use (e.g., `aux`), defaults to `-ef`
|
||||||
|
|
||||||
Status Codes:
|
Status Codes:
|
||||||
|
|
||||||
|
|
|
@ -449,7 +449,9 @@ Status Codes:
|
||||||
|
|
||||||
`GET /containers/(id)/top`
|
`GET /containers/(id)/top`
|
||||||
|
|
||||||
List processes running inside the container `id`
|
List processes running inside the container `id`. On Unix systems this
|
||||||
|
is done by running the `ps` command. This endpoint is not
|
||||||
|
supported on Windows.
|
||||||
|
|
||||||
**Example request**:
|
**Example request**:
|
||||||
|
|
||||||
|
@ -461,28 +463,45 @@ List processes running inside the container `id`
|
||||||
Content-Type: application/json
|
Content-Type: application/json
|
||||||
|
|
||||||
{
|
{
|
||||||
"Titles": [
|
"Titles" : [
|
||||||
"USER",
|
"UID", "PID", "PPID", "C", "STIME", "TTY", "TIME", "CMD"
|
||||||
"PID",
|
],
|
||||||
"%CPU",
|
"Processes" : [
|
||||||
"%MEM",
|
[
|
||||||
"VSZ",
|
"root", "13642", "882", "0", "17:03", "pts/0", "00:00:00", "/bin/bash"
|
||||||
"RSS",
|
],
|
||||||
"TTY",
|
[
|
||||||
"STAT",
|
"root", "13735", "13642", "0", "17:06", "pts/0", "00:00:00", "sleep 10"
|
||||||
"START",
|
|
||||||
"TIME",
|
|
||||||
"COMMAND"
|
|
||||||
],
|
|
||||||
"Processes": [
|
|
||||||
["root","20147","0.0","0.1","18060","1864","pts/4","S","10:06","0:00","bash"],
|
|
||||||
["root","20271","0.0","0.0","4312","352","pts/4","S+","10:07","0:00","sleep","10"]
|
|
||||||
]
|
]
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
**Example request**:
|
||||||
|
|
||||||
|
GET /containers/4fa6e0f0c678/top?ps_args=aux HTTP/1.1
|
||||||
|
|
||||||
|
**Example response**:
|
||||||
|
|
||||||
|
HTTP/1.1 200 OK
|
||||||
|
Content-Type: application/json
|
||||||
|
|
||||||
|
{
|
||||||
|
"Titles" : [
|
||||||
|
"USER","PID","%CPU","%MEM","VSZ","RSS","TTY","STAT","START","TIME","COMMAND"
|
||||||
|
]
|
||||||
|
"Processes" : [
|
||||||
|
[
|
||||||
|
"root","13642","0.0","0.1","18172","3184","pts/0","Ss","17:03","0:00","/bin/bash"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"root","13895","0.0","0.0","4348","692","pts/0","S+","17:15","0:00","sleep 10"
|
||||||
|
]
|
||||||
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
Query Parameters:
|
Query Parameters:
|
||||||
|
|
||||||
- **ps_args** – ps arguments to use (e.g., aux)
|
- **ps_args** – `ps` arguments to use (e.g., `aux`), defaults to `-ef`
|
||||||
|
|
||||||
Status Codes:
|
Status Codes:
|
||||||
|
|
||||||
|
|
|
@ -460,7 +460,9 @@ Status Codes:
|
||||||
|
|
||||||
`GET /containers/(id)/top`
|
`GET /containers/(id)/top`
|
||||||
|
|
||||||
List processes running inside the container `id`
|
List processes running inside the container `id`. On Unix systems this
|
||||||
|
is done by running the `ps` command. This endpoint is not
|
||||||
|
supported on Windows.
|
||||||
|
|
||||||
**Example request**:
|
**Example request**:
|
||||||
|
|
||||||
|
@ -472,28 +474,45 @@ List processes running inside the container `id`
|
||||||
Content-Type: application/json
|
Content-Type: application/json
|
||||||
|
|
||||||
{
|
{
|
||||||
"Titles": [
|
"Titles" : [
|
||||||
"USER",
|
"UID", "PID", "PPID", "C", "STIME", "TTY", "TIME", "CMD"
|
||||||
"PID",
|
],
|
||||||
"%CPU",
|
"Processes" : [
|
||||||
"%MEM",
|
[
|
||||||
"VSZ",
|
"root", "13642", "882", "0", "17:03", "pts/0", "00:00:00", "/bin/bash"
|
||||||
"RSS",
|
],
|
||||||
"TTY",
|
[
|
||||||
"STAT",
|
"root", "13735", "13642", "0", "17:06", "pts/0", "00:00:00", "sleep 10"
|
||||||
"START",
|
|
||||||
"TIME",
|
|
||||||
"COMMAND"
|
|
||||||
],
|
|
||||||
"Processes": [
|
|
||||||
["root","20147","0.0","0.1","18060","1864","pts/4","S","10:06","0:00","bash"],
|
|
||||||
["root","20271","0.0","0.0","4312","352","pts/4","S+","10:07","0:00","sleep","10"]
|
|
||||||
]
|
]
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
**Example request**:
|
||||||
|
|
||||||
|
GET /containers/4fa6e0f0c678/top?ps_args=aux HTTP/1.1
|
||||||
|
|
||||||
|
**Example response**:
|
||||||
|
|
||||||
|
HTTP/1.1 200 OK
|
||||||
|
Content-Type: application/json
|
||||||
|
|
||||||
|
{
|
||||||
|
"Titles" : [
|
||||||
|
"USER","PID","%CPU","%MEM","VSZ","RSS","TTY","STAT","START","TIME","COMMAND"
|
||||||
|
]
|
||||||
|
"Processes" : [
|
||||||
|
[
|
||||||
|
"root","13642","0.0","0.1","18172","3184","pts/0","Ss","17:03","0:00","/bin/bash"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"root","13895","0.0","0.0","4348","692","pts/0","S+","17:15","0:00","sleep 10"
|
||||||
|
]
|
||||||
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
Query Parameters:
|
Query Parameters:
|
||||||
|
|
||||||
- **ps_args** – ps arguments to use (e.g., aux)
|
- **ps_args** – `ps` arguments to use (e.g., `aux`), defaults to `-ef`
|
||||||
|
|
||||||
Status Codes:
|
Status Codes:
|
||||||
|
|
||||||
|
|
|
@ -525,7 +525,9 @@ Status Codes:
|
||||||
|
|
||||||
`GET /containers/(id)/top`
|
`GET /containers/(id)/top`
|
||||||
|
|
||||||
List processes running inside the container `id`
|
List processes running inside the container `id`. On Unix systems this
|
||||||
|
is done by running the `ps` command. This endpoint is not
|
||||||
|
supported on Windows.
|
||||||
|
|
||||||
**Example request**:
|
**Example request**:
|
||||||
|
|
||||||
|
@ -537,28 +539,45 @@ List processes running inside the container `id`
|
||||||
Content-Type: application/json
|
Content-Type: application/json
|
||||||
|
|
||||||
{
|
{
|
||||||
"Titles": [
|
"Titles" : [
|
||||||
"USER",
|
"UID", "PID", "PPID", "C", "STIME", "TTY", "TIME", "CMD"
|
||||||
"PID",
|
],
|
||||||
"%CPU",
|
"Processes" : [
|
||||||
"%MEM",
|
[
|
||||||
"VSZ",
|
"root", "13642", "882", "0", "17:03", "pts/0", "00:00:00", "/bin/bash"
|
||||||
"RSS",
|
],
|
||||||
"TTY",
|
[
|
||||||
"STAT",
|
"root", "13735", "13642", "0", "17:06", "pts/0", "00:00:00", "sleep 10"
|
||||||
"START",
|
|
||||||
"TIME",
|
|
||||||
"COMMAND"
|
|
||||||
],
|
|
||||||
"Processes": [
|
|
||||||
["root","20147","0.0","0.1","18060","1864","pts/4","S","10:06","0:00","bash"],
|
|
||||||
["root","20271","0.0","0.0","4312","352","pts/4","S+","10:07","0:00","sleep","10"]
|
|
||||||
]
|
]
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
**Example request**:
|
||||||
|
|
||||||
|
GET /containers/4fa6e0f0c678/top?ps_args=aux HTTP/1.1
|
||||||
|
|
||||||
|
**Example response**:
|
||||||
|
|
||||||
|
HTTP/1.1 200 OK
|
||||||
|
Content-Type: application/json
|
||||||
|
|
||||||
|
{
|
||||||
|
"Titles" : [
|
||||||
|
"USER","PID","%CPU","%MEM","VSZ","RSS","TTY","STAT","START","TIME","COMMAND"
|
||||||
|
]
|
||||||
|
"Processes" : [
|
||||||
|
[
|
||||||
|
"root","13642","0.0","0.1","18172","3184","pts/0","Ss","17:03","0:00","/bin/bash"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"root","13895","0.0","0.0","4348","692","pts/0","S+","17:15","0:00","sleep 10"
|
||||||
|
]
|
||||||
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
Query Parameters:
|
Query Parameters:
|
||||||
|
|
||||||
- **ps_args** – ps arguments to use (e.g., aux)
|
- **ps_args** – `ps` arguments to use (e.g., `aux`), defaults to `-ef`
|
||||||
|
|
||||||
Status Codes:
|
Status Codes:
|
||||||
|
|
||||||
|
|
|
@ -530,7 +530,9 @@ Status Codes:
|
||||||
|
|
||||||
`GET /containers/(id)/top`
|
`GET /containers/(id)/top`
|
||||||
|
|
||||||
List processes running inside the container `id`
|
List processes running inside the container `id`. On Unix systems this
|
||||||
|
is done by running the `ps` command. This endpoint is not
|
||||||
|
supported on Windows.
|
||||||
|
|
||||||
**Example request**:
|
**Example request**:
|
||||||
|
|
||||||
|
@ -542,28 +544,45 @@ List processes running inside the container `id`
|
||||||
Content-Type: application/json
|
Content-Type: application/json
|
||||||
|
|
||||||
{
|
{
|
||||||
"Titles": [
|
"Titles" : [
|
||||||
"USER",
|
"UID", "PID", "PPID", "C", "STIME", "TTY", "TIME", "CMD"
|
||||||
"PID",
|
],
|
||||||
"%CPU",
|
"Processes" : [
|
||||||
"%MEM",
|
[
|
||||||
"VSZ",
|
"root", "13642", "882", "0", "17:03", "pts/0", "00:00:00", "/bin/bash"
|
||||||
"RSS",
|
],
|
||||||
"TTY",
|
[
|
||||||
"STAT",
|
"root", "13735", "13642", "0", "17:06", "pts/0", "00:00:00", "sleep 10"
|
||||||
"START",
|
|
||||||
"TIME",
|
|
||||||
"COMMAND"
|
|
||||||
],
|
|
||||||
"Processes": [
|
|
||||||
["root","20147","0.0","0.1","18060","1864","pts/4","S","10:06","0:00","bash"],
|
|
||||||
["root","20271","0.0","0.0","4312","352","pts/4","S+","10:07","0:00","sleep","10"]
|
|
||||||
]
|
]
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
**Example request**:
|
||||||
|
|
||||||
|
GET /containers/4fa6e0f0c678/top?ps_args=aux HTTP/1.1
|
||||||
|
|
||||||
|
**Example response**:
|
||||||
|
|
||||||
|
HTTP/1.1 200 OK
|
||||||
|
Content-Type: application/json
|
||||||
|
|
||||||
|
{
|
||||||
|
"Titles" : [
|
||||||
|
"USER","PID","%CPU","%MEM","VSZ","RSS","TTY","STAT","START","TIME","COMMAND"
|
||||||
|
]
|
||||||
|
"Processes" : [
|
||||||
|
[
|
||||||
|
"root","13642","0.0","0.1","18172","3184","pts/0","Ss","17:03","0:00","/bin/bash"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"root","13895","0.0","0.0","4348","692","pts/0","S+","17:15","0:00","sleep 10"
|
||||||
|
]
|
||||||
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
Query Parameters:
|
Query Parameters:
|
||||||
|
|
||||||
- **ps_args** – ps arguments to use (e.g., aux)
|
- **ps_args** – `ps` arguments to use (e.g., `aux`), defaults to `-ef`
|
||||||
|
|
||||||
Status Codes:
|
Status Codes:
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue