New API call to get a listing of all the CPU temps on the system,

if the "coretemp" module isn't loaded, it will be loaded beforehand

REST Request:
-------------------------------
PUT /sysadm/systeminfo
{
   "action" : "cputemps"
}

REST Response:
-------------------------------
{
    "args": {
        "cputemps": {
            "cpu0": "27.0C",
            "cpu1": "34.0C",
            "cpu2": "33.0C",
            "cpu3": "31.0C"
        }
    }
}

WebSocket Request:
-------------------------------
{
   "args" : {
      "action" : "cputemps"
   },
   "id" : "fooid",
   "name" : "systeminfo",
   "namespace" : "sysadm"
}

WebSocket Response:
-------------------------------
{
  "args": {
    "cputemps": {
      "cpu0": "34.0C",
      "cpu1": "32.0C",
      "cpu2": "34.0C",
      "cpu3": "31.0C"
    }
  },
  "id": "fooid",
  "name": "response",
  "namespace": "sysadm"
}
This commit is contained in:
Kris Moore
2016-01-21 12:58:12 -05:00
parent 305c8da71c
commit 609bba2ded
5 changed files with 35 additions and 6 deletions

View File

@@ -32,7 +32,8 @@ Battery Information
===================
The "batteryinfo" action will indicate whether or not a battery exists. If it does, it will also report its current charge percentage level (1-99) and its
status (offline, charging, on backup, or unknown).
status (offline, charging, on backup, or unknown) and estimated time left (in seconds)
timeleft (1-XXXXXX)
**REST Request**
@@ -148,4 +149,4 @@ For each mounted device, the response will include the device name, filesystem,
"id": "fooid",
"name": "response",
"namespace": "sysadm"
}
}