In Astra, you can manage process and control it status using HTTP API methods.
Request: GET /api/system-status
Optional query parameters: GET /api/system-status?t={time}
time - default is 1 - statistics for last minute. 0 - statistics for last second (current system status).Response:
{
"timestamp": 0,
"instance": "...",
"la1": 0,
"la5": 0,
"la15": 0,
"app_threads": 1,
"sys_cpu_usage": 0,
"app_cpu_usage": 0,
"sys_mem_usage": 0,
"app_mem_usage": 0,
"app_mem_kb": 0,
"sys_uptime": 0,
"app_uptime": 0
}
timestamp - report time, for t=0 is a current timeinstance - instance name if defined in the Settings -> General -> Instance Namela1 - load average for 1 minute multiplied by 100la5 - load average for 5 minutes multiplied by 100la15 - load average for 15 minutes multiplied by 100app_threads - number of the threadssys_cpu_usage - total CPU usage. Could be up to: 100 multiplied with the core numbers on all CPUsapp_cpu_usage - CPU usage by the process and all threadssys_mem_usage - total RAM usageapp_mem_usage - RAM usage by the process and all threadsapp_mem_kb - RAM usage by the process and all threads in kilobytessys_uptime - total system uptime in secondsapp_uptime - process uptime in secondsRequest: POST /control/
{
"cmd": "restart"
}