Usage Statistics§
Unit collects instance- and app-wide metrics,
available via the GET
-only /status
section of the
control API:
Option |
Description |
---|---|
|
Object; lists per-instance connection statistics. |
|
Object; lists per-instance request statistics. |
|
Object; each option item lists per-app process and request statistics. |
Example:
{
"connections": {
"accepted": 1067,
"active": 13,
"idle": 4,
"closed": 1050
},
"requests": {
"total": 1307
},
"applications": {
"wp": {
"processes": {
"running": 14,
"starting": 0,
"idle": 4
},
"requests": {
"active": 10
}
}
}
}
The connections
object offers the following Unit instance metrics:
Option |
Description |
---|---|
|
Integer; total accepted connections during the instance’s lifetime. |
|
Integer; current active connections for the instance. |
|
Integer; current idle connections for the instance. |
|
Integer; total closed connections during the instance’s lifetime. |
Example:
"connections": {
"accepted": 1067,
"active": 13,
"idle": 4,
"closed": 1050
}
Note
For details of instance connection management, refer to Settings.
The requests
object currently exposes a single instance-wide metric:
Option |
Description |
---|---|
|
Integer; total non-API requests during the instance’s lifetime. |
Example:
"requests": {
"total": 1307
}
Each item in applications
describes an app
currently listed in the /config/applications
section:
Option |
Description |
---|---|
|
Object; lists per-app process statistics. |
|
Object;
similar to |
Example:
"applications": {
"wp": {
"processes": {
"running": 14,
"starting": 0,
"idle": 4
},
"requests": {
"active": 10
}
}
}
The processes
object exposes the following per-app metrics:
Option |
Description |
---|---|
|
Integer; current running app processes. |
|
Integer; current starting app processes. |
|
Integer; current idle app processes. |
Example:
"processes": {
"running": 14,
"starting": 0,
"idle": 4
}
Note
For details of per-app process management, refer to Process Management.