diff options
author | Javier Sánchez Parra <jsanchez@soleta.eu> | 2022-03-11 14:33:37 +0100 |
---|---|---|
committer | Javier Sánchez Parra <jsanchez@soleta.eu> | 2022-03-14 14:46:13 +0100 |
commit | 3b4aa721a46135ca1f441e79066248ad3cb79466 (patch) | |
tree | d2843288b727eac4ef6a8a72e63f51d86f967b0e /tests/units | |
parent | 281d661fc9c7f1ee9777ff17c2de88cd8ec959a4 (diff) |
#915 Add GET /stats REST request
This request returns certain statistics on memory and swap usage, as
well as the uptime.
The below structure gives the sizes of the memory and swap fields in
bytes.
Request: GET /stats
NO BODY
Response: 200 OK
{
"time": {
"now": 1647262765, /* Seconds since 1970 */
"boot": 2151909 /* Seconds since boot */
},
"memory": {
"size": 4104679424, /* Total usable main memory size */
"free": 322174976 /* Available memory size */
},
"swap": {
"size": 2147479552, /* Total swap space size */
"free": 2122563584 /* Swap space still available */
}
}
Diffstat (limited to 'tests/units')
0 files changed, 0 insertions, 0 deletions