Processes
The processes of the host.
| Operation | Kind | HTTP |
|---|---|---|
processes.list | call | GET /v1/processes |
processes.signal | call | POST /v1/processes/{pid}/signal |
processes.list
The processes, from /proc.
Host level only. Through rookery serve it needs the role view.
Result
Process[]
{
"id": 1,
"op": "processes.list"
}{
"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
| Name | Where | Required | Description |
|---|---|---|---|
pid | path | yes | A process id. |
Input
| Field | Type | Description |
|---|---|---|
signal | string | INT, TERM, HUP or KILL. |
Result
| Field | Type | Description |
|---|---|---|
ok | boolean |
{
"id": 1,
"op": "processes.signal",
"args": {
"pid": 4812
},
"data": {
"signal": "TERM"
}
}{
"id": 1,
"result": {
"ok": true
}
}Types
The named types used on this page.
Process
| Field | Type | Description |
|---|---|---|
command | string | |
cpu_time | number | Seconds of CPU used so far. |
memory | integer | Resident memory in bytes. |
parent | integer | |
pid | integer | |
user | string |