Skip to Content

Processes

The processes of the host.

OperationKindHTTP
processes.listcallGET /v1/processes
processes.signalcallPOST /v1/processes/{pid}/signal

processes.list

The processes, from /proc.

Host level only. Through rookery serve it needs the role view.

Result

Process[]

Request
{
  "id": 1,
  "op": "processes.list"
}
Reply
{
  "id": 1,
  "result": [
    {
      "command": "uname -a",
      "cpu_time": 0,
      "memory": 0,
      "parent": 0,
      "pid": 4812,
      "user": "agent"
    }
  ]
}

processes.signal

Send a signal to a process.

Host level only. Through rookery serve it needs the role operate.

Arguments

NameWhereRequiredDescription
pidpathyesA process id.

Input

FieldTypeDescription
signalstringINT, TERM, HUP or KILL.

Result

FieldTypeDescription
okboolean
Request
{
  "id": 1,
  "op": "processes.signal",
  "args": {
    "pid": 4812
  },
  "data": {
    "signal": "TERM"
  }
}
Reply
{
  "id": 1,
  "result": {
    "ok": true
  }
}

Types

The named types used on this page.

Process

FieldTypeDescription
commandstring
cpu_timenumberSeconds of CPU used so far.
memoryintegerResident memory in bytes.
parentinteger
pidinteger
userstring

On this page