Process Manager

v0.1.2
0 PublicLibrary

System process monitoring and management UI

Apache-2.0 25 downloads
Updated 4 months ago
processmonitormanagement

Run

wippy run lattice/pm

lattice/pm

System process monitoring and management UI. Displays a real-time process tree with per-process CPU and memory stats, and supports process termination.

Requirements

| Requirement | Description | |-------------|-------------| | server | HTTP server for static file serving | | api_router | HTTP router for API endpoints |

Usage

- name: pm
  kind: ns.dependency
  component: lattice/pm
  version: "*"
  parameters:
    - name: server
      value: app:gateway
    - name: api_router
      value: app:api

API Endpoints

| Method | Path | Description | |--------|------|-------------| | GET | /lattice/pm/stats | Process tree with CPU/memory stats per host | | POST | /lattice/pm/terminate | Terminate a process by PID |

GET /lattice/pm/stats

Returns a list of hosts, each containing a process tree with stats.

{
  "hosts": [
    {
      "host_id": "app:processes",
      "processes": [
        {
          "pid": "0x00001",
          "entry_id": "wippy.relay:central",
          "state": "running",
          "cpu_percent": 0.5,
          "memory_bytes": 1048576
        }
      ]
    }
  ]
}

POST /lattice/pm/terminate

Terminates a process by PID.

{
  "pid": "0x00001"
}

Page

Registers a view.page entry at /lattice/pm with proxy-enabled iframe rendering. The page uses PrimeVue components and polls /lattice/pm/stats for live updates.