mirror of
https://github.com/outbackdingo/sysadm.git
synced 2026-01-27 18:20:23 +00:00
Add new API call "sysctllist"
Returns the list of all setable sysctl values
REST Request:
-------------------------------
PUT /sysadm/systemmanager
{
"action" : "sysctllist"
}
REST Response:
-------------------------------
{
"args": {
"sysctllist": {
"compat.ia32.maxdsiz": "536870912",
"compat.ia32.maxssiz": "67108864",
"compat.ia32.maxvmem": "0",
"compat.linux.osname": "Linux",
"compat.linux.osrelease": "2.6.18",
"compat.linux.oss_version": "198144",
"compat.linux32.maxdsiz": "536870912",
"compat.linux32.maxssiz": "67108864",
"compat.linux32.maxvmem": "0",
....
}
}
}
WebSocket Request:
-------------------------------
{
"name" : "systemmanager",
"namespace" : "sysadm",
"id" : "fooid",
"args" : {
"action" : "sysctllist"
}
}
WebSocket Response:
-------------------------------
{
"args": {
"sysctllist": {
"compat.ia32.maxdsiz": "536870912",
"compat.ia32.maxssiz": "67108864",
"compat.ia32.maxvmem": "0",
"compat.linux.osname": "Linux",
"compat.linux.osrelease": "2.6.18",
"compat.linux.oss_version": "198144",
"compat.linux32.maxdsiz": "536870912",
"compat.linux32.maxssiz": "67108864",
"compat.linux32.maxvmem": "0",
....
}
},
"id": "fooid",
"name": "response",
"namespace": "sysadm"
}
This commit is contained in:
@@ -329,6 +329,10 @@ RestOutputStruct::ExitCode WebSocket::EvaluateSysadmSystemMgmtRequest(const QJso
|
||||
ok = true;
|
||||
out->insert("procinfo", sysadm::SysMgmt::procInfo());
|
||||
}
|
||||
if(act=="sysctllist"){
|
||||
ok = true;
|
||||
out->insert("sysctllist", sysadm::SysMgmt::sysctlList());
|
||||
}
|
||||
if(act=="systeminfo"){
|
||||
ok = true;
|
||||
out->insert("systeminfo", sysadm::SysMgmt::systemInfo());
|
||||
|
||||
Reference in New Issue
Block a user