docker.stats
Retrieves the Docker statistics for the running containers on a host.
JSON-RPC Request
{"jsonrpc":"2.0","id":1,"method":"docker.stats"}
JSON-RPC Response
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"Name": "docker-container-httpd-resource",
"Container": "a3d2a6633149",
"ID": "a3d2a66331493d6067ca84c9c49d711bd1fc433e7a5ba1707171b14d4b6154ee",
"CPUPerc": "0.00%",
"MemPerc": "0.00%",
"MemUsage": "0B / 0B",
"BlockIO": "15.9MB / 0B",
"NetIO": "0B / 0B",
"PIDs": "0",
"cluster_managed": false
}
]
}
Response Parameters
| Parameter | Type | Description |
|---|---|---|
Name | String | The name of the container. |
Container | String | The 12-character short ID of the container. |
Id | String | The globally unique ID of the container. This is the 64-character hexadecimal string form of the ID. |
Cpuperc | String | The percentage of the node's CPU the container is using. |
Memperc | String | The percentage of the node's memory the container is using. |
Memusage | String | The total amount of memory the container is using. |
Blockio | String | The amount of data the container has written to and read from block devices on the node. |
Netio | String | The amount of data the container has received and sent over its network interface. |
Pids | String | The number of processes or threads the container has created. |
cluster_managed | Boolean | Whether or not the container is running inside or outside the cluster. |
CLI Example
rvc docker stats
Response
Id Name CPU% Memory% NetIO PIDs In Cluster
-------------------------------------------------------------------------------------------------------------------
64ee8b437bc5 nginx 0.00% 0.00% 0B / 0B 0 no