← All procedures
node.status
Get status of running Node.js processes
CLI- Package
- @procedures/node · README
- Path
["node","status"]- CLI
mark node status- As data
{"$proc":["node","status"],"input":{}}
Use it
In TypeScript
import { Client, LocalTransport, PROCEDURE_REGISTRY } from "@procedures/client";
import "@procedures/node"; // registers its procedures
const client = new Client(new LocalTransport({ registry: PROCEDURE_REGISTRY }));
const result = await client.exec(["node","status"], {});
console.log(JSON.stringify(result));From the command line
$ mark node status
As data, in a program
{ "$proc": ["node", "status"], "input": {} }Input
| Field | Type | Required | Default | Description |
|---|
processId | string | no | | Optional process ID to filter by |
output | boolean | no | | Also give the end of the output of each process (the last 64 KiB) |
Output
| Field | Type | Required | Default | Description |
|---|
processes | object[] | yes | | The processes of this host |
JSON Schemas
{
"input": {
"type": "object",
"properties": {
"processId": {
"description": "Optional process ID to filter by",
"type": "string"
},
"output": {
"description": "Also give the end of the output of each process (the last 64 KiB)",
"type": "boolean"
}
}
},
"output": {
"type": "object",
"properties": {
"processes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"processId": {
"type": "string",
"description": "The id of the process"
},
"pid": {
"type": "number",
"description": "The process id of the operating system"
},
"script": {
"type": "string",
"description": "The script"
},
"status": {
"type": "string",
"enum": [
"running",
"exited",
"error"
],
"description": "The state of the process"
},
"exitCode": {
"description": "The exit code, when the process exited",
"type": "number"
},
"startedAt": {
"type": "string",
"description": "The start time (ISO 8601)"
},
"exitedAt": {
"description": "The end time (ISO 8601), when the process ended",
"type": "string"
},
"output": {
"description": "With output: true, the end of the output",
"type": "string"
}
},
"required": [
"processId",
"pid",
"script",
"status",
"startedAt"
],
"additionalProperties": {}
},
"description": "The processes of this host"
}
},
"required": [
"processes"
],
"additionalProperties": {}
}
}