mirror of
https://github.com/outbackdingo/sysadm.git
synced 2026-03-21 07:47:10 +00:00
Replace the 'memorypercentage' API call with 'memorystats', which returns
much more meaningfull information to let us do graphs and whatnot
REST Request:
-------------------------------
PUT /sysadm/systeminfo
{
"action" : "memorystats"
}
REST Response:
-------------------------------
{
"args": {
"memorystats": {
"active": "818",
"cache": "69",
"free": "4855",
"inactive": "2504",
"wired": "1598"
}
}
}
WebSocket Request:
-------------------------------
{
"args" : {
"action" : "memorystats"
},
"namespace" : "sysadm",
"id" : "fooid",
"name" : "systeminfo"
}
WebSocket Response:
-------------------------------
{
"args": {
"memorystats": {
"active": "826",
"cache": "69",
"free": "4847",
"inactive": "2505",
"wired": "1598"
}
},
"id": "fooid",
"name": "response",
"namespace": "sysadm"
}
This commit is contained in:
@@ -271,9 +271,9 @@ RestOutputStruct::ExitCode WebSocket::EvaluateSysadmSystemInfoRequest(const QJso
|
||||
ok = true;
|
||||
out->insert("externalmounts", sysadm::SysInfo::externalDevicePaths());
|
||||
}
|
||||
if(act=="memorypercentage"){
|
||||
if(act=="memorystats"){
|
||||
ok = true;
|
||||
out->insert("memorypercentage", sysadm::SysInfo::memoryPercentage());
|
||||
out->insert("memorystats", sysadm::SysInfo::memoryStats());
|
||||
}
|
||||
if(act=="systeminfo"){
|
||||
ok = true;
|
||||
|
||||
Reference in New Issue
Block a user