GetSystemStatus
This API can be used to get the Dashboard values of: CPU, Memory and Live Threads.
The settings can be found on the AhsayCBS web console at:
- Monitoring > Dashboard > CPU
- Monitoring > Dashboard > Memory
- Monitoring > Dashboard > Live Threads
URL
https://CBS.EXAMPLE.COM/cbs/api/json/GetSystemStatus.do
Available Since Version: 9.1
Parameters
Key | Type | Description |
---|---|---|
SysUser | String | Username of an AhsayCBS System User with Admin, API or Read-Only API role. |
SysPwd | String | Password matching SysUser. |
Type | String |
(optional)Values: memory, cpuUsage or thread. When Type or StartDate has no input, overall result is returned. When Type and StartDate has input, history of the type is returned. |
StartDate | String | Date in yyyy-MM-dd format |
Return Values
"Type" or "StartDate" has no input
Key | Type | Description |
---|---|---|
Status | String | "OK" or "Error" |
Message | String | Error message, it only appears if status displays "Error". |
nonHeapMemPoolList | Array of MemPool | Memory pool information for non heap. |
HeapMemPoolList | Array of MemPool | Memory pool information for heap. |
garbageCollectorList | Array of GarbageCollector | Garbage collection information. |
totalSwapSpace | String | Total swap space |
heapUsed | String | Heap used |
daemonThreads | Integer | Number of daemon threads |
freeSwapSpace | String | Free swap space |
peakThreads | Integer | Peak number of threads |
nonHeapPercentage | Integer | Non heap size percentage |
liveThreads | Integer | Number of live threads |
committedVirtualMemory | String | Committed virtual memory |
totalThreadsStarted | Integer | Total number of threads started |
totalPhysicalMemory | String | Total physical memory |
heapPercentage | Integer | Heap percentage |
Timestamp | Long | Timestamp of the request |
nonHeapUsed | String | Non heap size used |
processCpuLoad | Double | Process CPU load |
freePhysicalMemory | String | Free physical memory |
systemCpuLoad | Double | System CPU load |
maxNonHeap | String | Maximum non heap size used |
heapUsage | Double | Heap usage |
maxHeap | String | Maximum heap size |
JSON Objects
Mempool
Key | Type | Description |
---|---|---|
usedPercentage | Integer | Used percentage |
Max | Integer | Maximum number jof memory assigned |
used | Integer | Memory used |
formattedUsed | String | Formatted memory used |
formattedMax | String | Formatted maximum number of memory |
formattedPoolName | String | Formatted memory pool name |
poolName | String | Memory pool name |
GarbageCollector
Key | Type | Description |
---|---|---|
time | Integer | Time |
count | Integer | Count |
formattedTime | String | Formatted time |
Type | String | Type |
formattedType | String | Formatted type |
Examples
Example 1: No Type / Overall result
INPUT
{
"SysUser":"api_user",
"SysPwd":"qWeRtY123456!@#$%"
}
OUTPUT
{
"Status":"OK",
"totalSwapSpace":"9.25 G",
"heapUsed":"126.27 M",
"daemonThreads":41,
"freeSwapSpace":"5.44 G",
"peakThreads":47,
"nonHeapMemPoolList":[
{
"servletWrapper":{},
"usedPercentage":15,
"max":251658240,
"formattedMax":"240 M",
"used":"39791424",
"formattedPoolName":"CodeCache",
"formattedUsed":"37.95 M",
"poolName":"CodeCache"
}
{
"servletWrapper":{},
"usedPercentage":36,
"max":268435456,
"formattedMax":"256 M",
"used":"98743520",
"formattedPoolName":"Metaspace",
"formattedUsed":"94.17 M",
"poolName":"Metaspace"
}
{
"servletWrapper":{},
"usedPercentage":3,
"max":260046848,
"formattedMax":"248 M",
"used":"9740424",
"formattedPoolName":"CompressedClassSpace",
"formattedUsed":"9.29 M",
"poolName":"CompressedClassSpace"
}
]
"nonHeapPercentage":19,
"liveThreads":43,
"committedVirtualMemory":"793.76 M",
"totalThreadsStarted":158,
"totalPhysicalMemory":"8 G",
"garbageCollectorList":[
{
"servletWrapper":{},
"formattedType":"ParNew",
"count":45,
"formattedTime":"00:00:01.245",
"time":1245,
"type":"ParNew"
}
{
"servletWrapper":{},
"formattedType":"ConcurrentMarkSweep",
"count":20,
"formattedTime":"00:00:05.732",
"time":5732,
"type":"ConcurrentMarkSweep"
}
]
"heapPercentage":6,
"timestamp":1683256740537,
"nonHeapUsed":"141.4 M",
"processCpuLoad":0.18,
"freePhysicalMemory":"4.29 G",
"systemCpuLoad":0.5,
"maxNonHeap":"744 M",
"heapUsage":126.27443,
"maxHeap":"1.99 G",
"heapMemPoolList":[
{
"servletWrapper":{},
"usedPercentage":5,
"max":505413632,
"formattedMax":"482 M",
"used":29969944,
"formattedPoolName":"ParEdenSpace",
"formattedUsed":"28.58 M",
"poolName":"Par Eden Space"
}
{
"servletWrapper":{},
"usedPercentage":0,
"max":15728640,
"formattedMax":"15 M",
"used":0,
"formattedPoolName":"ParSurvivorSpace",
"formattedUsed":"0",
"poolName":"Par Survivor Space"
}
{
"servletWrapper":{},
"usedPercentage":6,
"max":1610612736,
"formattedMax":"1.5 G",
"used":102438392,
"formattedPoolName":"CMSOldGen",
"formattedUsed":"0",
"poolName":"CMS Old Gen"
}
]
}
Example 2: Type = "memory"
INPUT
{
"SysUser":"api_user",
"SysPwd":"qWeRtY123456!@#$%",
"Type":"memory",
"StartDate":""
}
OUTPUT
{
"Status":"OK",
"sysStatusList":[
{
"timestamp":1683216012284,
"heapUsage":144.28317
},
{
"timestamp":1683216072391
"heapUsage":98.49154
}
]
}
Example 3: Type = "thread"
INPUT
{
"SysUser":"api_user",
"SysPwd":"qWeRtY123456!@#$%",
"Type":"thread",
"StartDate":"2024-05-05"
}
OUTPUT
{
"Status":"OK",
"sysStatusList":[
{
"timestamp":1683216012284,
"liveThreads":41
},
{
"timestamp":1683216072391
"liveThreads":41
}
]
}
Example 4: Type = "cpu"
INPUT
{
"SysUser":"api_user",
"SysPwd":"qWeRtY123456!@#$%",
"Type":"cpuUsage",
"StartDate":"2024-05-05"
}
OUTPUT
{
"Status":"OK",
"sysStatusList":[
{
"timestamp":1683216012284,
"processCpuLoad":0.01,
"systemCpuLoad":0.64
},
{
"timestamp":1683216072391,
"processCpuLoad":0.39,
"systemCpuLoad":0.64
}
]
}