How newsand/beholder works
Beholder is a Linux process and NVIDIA VRAM monitor with two entry modes: an egui dashboard and an MCP stdio server. Both let users select targets and inspect collected metrics; sampling gathers RAM/CPU and optional process VRAM, while the GUI and MCP expose history, window statistics, and export. The graph groups the interfaces, target discovery, metric acquisition, and history. Some wiring is supported by imports and the SOURCE INDEX rather than complete excerpts; those limits are reflected by omitting uncertain links.
Main entry points: app.rs Dashboard · main.rs Mode Entry · mcp.rs MCP Server · buffer.rs Time-Series Buffer
Components 14
User Interfaces
- Mode Entry
crates/app/src/main.rs - Dashboard
crates/app/src/app.rs - MCP Server
crates/core/src/mcp.rs
Target Management
- Target Manager
crates/core/src/targets.rs - Linux Process Data
Metric Acquisition
- Process Sampler
crates/core/src/sampler.rs - NVML Wrapper
crates/core/src/nvml.rs - Metric Models
crates/core/src/model.rs
History and Export
- Time-Series Buffer
crates/core/src/buffer.rs - GUI Export
crates/app/src/app.rs - MCP Tools and Export
crates/core/src/mcp.rs
Other components
- Desktop User
- MCP Client
- NVIDIA GPU
Connections 18
- Desktop User → Mode Entry: launches
README.md - MCP Client → Mode Entry: sends stdio requests
README.md - Mode Entry → Dashboard: starts GUI
crates/app/src/main.rs - Mode Entry → MCP Server: starts headless server
crates/app/src/main.rs - Dashboard → Target Manager: manages targets
crates/app/src/app.rs - MCP Server → Target Manager: manages targets
crates/core/src/mcp.rs - Target Manager → Linux Process Data: reads process info
crates/core/src/targets.rs - Dashboard → Process Sampler: samples PIDs
crates/app/src/app.rs - Process Sampler → NVML Wrapper: queries process VRAM
crates/core/src/sampler.rs - Mode Entry → NVML Wrapper: initializes optionally
crates/app/src/main.rs - NVML Wrapper → NVIDIA GPU: queries GPU memory
README.md - Process Sampler → Metric Models: produces samples
crates/core/src/sampler.rs - Dashboard → Time-Series Buffer: reads and clears history
crates/app/src/app.rs - MCP Server → Time-Series Buffer: reads and manages history
crates/core/src/mcp.rs - Dashboard → GUI Export: exports CSV or JSON
crates/app/src/app.rs - MCP Server → MCP Tools and Export: dispatches export tools
crates/core/src/mcp.rs - GUI Export → Time-Series Buffer: reads samples
crates/app/src/app.rs - MCP Tools and Export → Time-Series Buffer: reads samples
crates/core/src/mcp.rs