{
  "name": "ServiceProcess",
  "base": "PersistedModel",
  "description": "Represents a since OS process running on the Instance",
  "properties": {
    "parentPid": {
      "type": "number",
      "required": true,
      "index": true,
      "description": "The OS process ID of the parent of this process (eg: *NIX PPID)"
    },
    "pid": {
      "type": "number",
      "required": true,
      "index": true,
      "description": "The OS process ID of this process (eg: *NIX PID)"
    },
    "workerId": {
      "type": "number",
      "required": true,
      "description": "The cluster worker ID"
    },
    "listeningSockets": {
      "type": [
        "object"
      ],
      "default": [],
      "description": "List of addresses/ports this process is listening on"
    },
    "isTrackingObjects": {
      "type": "boolean",
      "required": true,
      "default": false,
      "description": "Indicates if object-tracking is turned on for this process"
    },
    "isProfiling": {
      "type": "boolean",
      "required": true,
      "default": false,
      "description": "Indicates if cpu-profiling is turned on for this process"
    },
    "isTracing": {
      "type": "boolean",
      "required": true,
      "default": false,
      "description": "Indicates if tracing is turned on for this process"
    },
    "debugger": {
      "type": { "running": "boolean", "port": "number" },
      "default": { "running": false, "port": null },
      "description": "Status of DevTools Debugger in this process"
    },
    "watchdogTimeout": {
      "type": "number",
      "default": 0,
      "description": "Watchdog timeout, in milliseconds. (0 = watchdog disabled)"
    },
    "watchdogStallout": {
      "type": "number",
      "default": 0,
      "description": "Watchdog stallout, in stall counts. (0 = stall disabled)"
    },
    "isSnapshotting": {
      "type": "boolean",
      "required": true,
      "default": false,
      "description": "Indicates if a heap-dump is being performed on this process"
    },
    "startTime": {
      "type": "date",
      "description": "Timestamp when this process was started"
    },
    "stopTime": {
      "type": "date",
      "description": "Timestamp when this process was stopped or killed"
    },
    "stopReason": {
      "type": "string",
      "description": "The signal or reason this process exited",
      "default": ""
    }
  },
  "validations": [],
  "relations": {
    "serviceInstance": {
      "type": "belongsTo",
      "model": "ServiceInstance"
    }
  },
  "acls": [],
  "methods": []
}
