Ken Moore
|
2240fdd8c7
|
[API CHANGE] Adjust the output structure for the "sysctllist" action in the system manager.
The output now returns objects with value, type, and description of each sysctl instead of just the values.
REST Request (example):
-------------------------------
PUT /sysadm/systemmanager
{
"action" : "sysctllist"
}
WebSocket Request:
-------------------------------
{
"id" : "fooid",
"namespace" : "sysadm",
"args" : {
"action" : "sysctllist"
},
"name" : "systemmanager"
}
Response:
-------------------------------
{
"args": {
"sysctllist": {
"compat.ia32.maxdsiz": {
"type": "unsigned long",
"value": "536870912"
},
"compat.ia32.maxssiz": {
"type": "unsigned long",
"value": "67108864"
},
"compat.ia32.maxvmem": {
"type": "unsigned long",
"value": "0"
},
"compat.linux.osname": {
"description": "Linux kernel OS name",
"type": "string",
"value": "Linux"
},
"compat.linux.osrelease": {
"description": "Linux kernel OS release",
"type": "string",
"value": "2.6.32"
},
"compat.linux.oss_version": {
"description": "Linux OSS version",
"type": "integer",
"value": "198144"
}
}
},
"id": "fooid",
"name": "response",
"namespace": "sysadm"
}
|
2017-10-26 09:10:02 -04:00 |
|
Ken Moore
|
34b388277d
|
[API CHANGE] Add a new "action" for sysadm/systemmanager
"action"="deviceinfo" will return the full information about all devices attached to the system (via `pciconf -lv`)
-------------------
REST Request (example):
-------------------------------
PUT /sysadm/systemmanager
{
"action" : "deviceinfo"
}
WebSocket Request:
-------------------------------
{
"id" : "fooid",
"name" : "systemmanager",
"namespace" : "sysadm",
"args" : {
"action" : "deviceinfo"
}
}
Response:
-------------------------------
{
"args": {
"deviceinfo": {
"ahci0": {
"class": "mass storage",
"device": "8 Series/C220 Series Chipset Family 6-port SATA Controller 1 [AHCI mode]",
"subclass": "SATA",
"vendor": "Intel Corporation"
},
"ehci0": {
"class": "serial bus",
"device": "8 Series/C220 Series Chipset Family USB EHCI",
"subclass": "USB",
"vendor": "Intel Corporation"
},
"ehci1": {
"class": "serial bus",
"device": "8 Series/C220 Series Chipset Family USB EHCI",
"subclass": "USB",
"vendor": "Intel Corporation"
},
"hdac0": {
"class": "multimedia",
"subclass": "HDA",
"vendor": "NVIDIA Corporation"
},
"hdac1": {
"class": "multimedia",
"device": "8 Series/C220 Series Chipset High Definition Audio Controller",
"subclass": "HDA",
"vendor": "Intel Corporation"
},
"hostb0": {
"class": "bridge",
"device": "4th Gen Core Processor DRAM Controller",
"subclass": "HOST-PCI",
"vendor": "Intel Corporation"
},
"isab0": {
"class": "bridge",
"device": "B85 Express LPC Controller",
"subclass": "PCI-ISA",
"vendor": "Intel Corporation"
},
"none0": {
"class": "simple comms",
"device": "8 Series/C220 Series Chipset Family MEI Controller",
"vendor": "Intel Corporation"
},
"none1": {
"class": "serial bus",
"device": "8 Series/C220 Series Chipset Family SMBus Controller",
"subclass": "SMBus",
"vendor": "Intel Corporation"
},
"pcib1": {
"class": "bridge",
"device": "Xeon E3-1200 v3/4th Gen Core Processor PCI Express x16 Controller",
"subclass": "PCI-PCI",
"vendor": "Intel Corporation"
},
"pcib2": {
"class": "bridge",
"device": "8 Series/C220 Series Chipset Family PCI Express Root Port",
"subclass": "PCI-PCI",
"vendor": "Intel Corporation"
},
"pcib3": {
"class": "bridge",
"device": "8 Series/C220 Series Chipset Family PCI Express Root Port",
"subclass": "PCI-PCI",
"vendor": "Intel Corporation"
},
"pcib4": {
"class": "bridge",
"device": "8 Series/C220 Series Chipset Family PCI Express Root Port",
"subclass": "PCI-PCI",
"vendor": "Intel Corporation"
},
"pcib5": {
"class": "bridge",
"device": "82801 PCI Bridge",
"subclass": "PCI-PCI",
"vendor": "Intel Corporation"
},
"re0": {
"class": "network",
"device": "RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller",
"subclass": "ethernet",
"vendor": "Realtek Semiconductor Co., Ltd."
},
"vgapci0": {
"class": "display",
"device": "GM206 [GeForce GTX 960]",
"subclass": "VGA",
"vendor": "NVIDIA Corporation"
},
"xhci0": {
"class": "serial bus",
"device": "8 Series/C220 Series Chipset Family USB xHCI",
"subclass": "USB",
"vendor": "Intel Corporation"
}
}
},
"id": "fooid",
"name": "response",
"namespace": "sysadm"
}
|
2017-08-02 11:14:38 -04:00 |
|
Kris Moore
|
80bcd67733
|
Add two new API calls, to shutdown/halt the system, and to
reboot the system.
Shutdown API call
REST Request:
-------------------------------
PUT /sysadm/systemmanager
{
"action" : "halt"
}
WebSocket Request:
-------------------------------
{
"id" : "fooid",
"args" : {
"action" : "halt"
},
"name" : "systemmanager",
"namespace" : "sysadm"
}
Response:
-------------------------------
{
"args": {
"halt": {
"response": "true"
}
},
"id": "fooid",
"name": "response",
"namespace": "sysadm"
}
Reboot API call
REST Request:
-------------------------------
PUT /sysadm/systemmanager
{
"action" : "reboot"
}
WebSocket Request:
-------------------------------
{
"id" : "fooid",
"args" : {
"action" : "reboot"
},
"name" : "systemmanager",
"namespace" : "sysadm"
}
Response:
-------------------------------
{
"args": {
"reboot": {
"response": "true"
}
},
"id": "fooid",
"name": "response",
"namespace": "sysadm"
}
|
2016-02-17 13:08:12 -05:00 |
|
Kris Moore
|
f4a61e7d0a
|
Add new API call to set a sysctl
REST Request:
-------------------------------
PUT /sysadm/systemmanager
{
"value" : "0",
"sysctl" : "security.jail.mount_devfs_allowed",
"action" : "setsysctl"
}
REST Response:
-------------------------------
{
"args": {
"setsysctl": {
"response": "security.jail.mount_devfs_allowed: 1 -> 0",
"sysctl": "security.jail.mount_devfs_allowed",
"value": "0"
}
}
}
WebSocket Request:
-------------------------------
{
"args" : {
"value" : "0",
"action" : "setsysctl",
"sysctl" : "security.jail.mount_devfs_allowed"
},
"name" : "systemmanager",
"namespace" : "sysadm",
"id" : "fooid"
}
WebSocket Response:
-------------------------------
{
"args": {
"setsysctl": {
"response": "security.jail.mount_devfs_allowed: 1 -> 0",
"sysctl": "security.jail.mount_devfs_allowed",
"value": "0"
}
},
"id": "fooid",
"name": "response",
"namespace": "sysadm"
}
|
2016-02-03 13:21:00 -05:00 |
|
Kris Moore
|
fccac94ab6
|
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"
}
|
2016-02-03 13:09:31 -05:00 |
|
Kris Moore
|
36d2f77d5c
|
Add API call to kill processes on the system
pid = <pid>
signal = {INT|QUIT|ABRT|KILL|ALRM|TERM}
REST Request:
-------------------------------
PUT /sysadm/systemmanager
{
"signal" : "KILL",
"pid" : "13939",
"action" : "killproc"
}
REST Response:
-------------------------------
{
"args": {
"killproc": {
"action": "killproc",
"pid": "13939",
"signal": "KILL"
}
}
}
WebSocket Request:
-------------------------------
{
"namespace" : "sysadm",
"args" : {
"pid" : "13939",
"action" : "killproc",
"signal" : "KILL"
},
"id" : "fooid",
"name" : "systemmanager"
}
WebSocket Response:
-------------------------------
{
"args": {
"killproc": {
"action": "killproc",
"pid": "13939",
"signal": "KILL"
}
},
"id": "fooid",
"name": "response",
"namespace": "sysadm"
}
|
2016-02-03 12:45:02 -05:00 |
|