How glenngit/dsh-top works
dsh-top is a DeepSeek Harness web-GUI plugin for live host monitoring. Its workflow is: the browser panel polls a host API, the handler gathers CPU, memory, disk, network, and process data, and the panel renders the response. The host code also computes rates and uses Linux cgroups for container-aware CPU and memory reporting. The README documents the bundle patch as the client-loader integration. Host collection details are in one source file; the sampled excerpts do not show every collector call.
Main entry points: index.js Stats handler · client.js Stats poller · cordis.patch.yml Bundle patch
Components 14
Host monitoring
- CPU and memory
lib/index.js - Cgroup limits
lib/index.js - Disk collector
lib/index.js - Network collector
lib/index.js - Process collector
lib/index.js
Stats API
- Stats handler
lib/index.js - Rate calculation
lib/index.js
Browser panel
- Bundle patch
cordis.patch.yml - Stats poller
lib/client.js - Overlay registration
lib/client.js - Monitor panel
lib/client.js
Other components
- DSH user
- Host OS
- System tools
Connections 18
- Stats handler → CPU and memory: samples
- Stats handler → Disk collector: collects
- Stats handler → Network collector: collects
- Stats handler → Process collector: collects
- CPU and memory → Cgroup limits: checks limits
- CPU and memory → Host OS: reads os stats
- Cgroup limits → Host OS: reads cgroup files
- Disk collector → Host OS: reads platform data
- Disk collector → System tools: runs platform commands
- Network collector → Host OS: reads platform data
- Network collector → System tools: runs platform commands
- Process collector → System tools: runs platform commands
- Stats handler → Rate calculation: computes deltas
- Stats poller → Stats handler: polls stats
- Stats handler → Stats poller: returns JSON
- Bundle patch → Stats poller: loads client
- Overlay registration → Monitor panel: registers panel
- DSH user → Monitor panel: uses panel