# ovis-hpc/ldms architecture

> Architecture diagram of the GitHub repository ovis-hpc/ldms, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-10). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ovis-hpc/ldms
- Repository: https://github.com/ovis-hpc/ldms

## Overview

LDMS is a distributed HPC metrics collection, transport, aggregation, and storage framework. Its principal workflow is to collect system or application metrics into LDMS metric sets, transfer them between daemons, aggregate or route the data, and persist it through storage plugins. The graph also shows configuration and authentication as supporting runtime capabilities, plus kernel and Kokkos collection paths. Most connections reflect README-level capabilities; source excerpts provide limited implementation detail, so unsampled subsystem wiring is not asserted.

Main entry points: [`ldms/src/ldmsd/ldmsd.c`](https://github.com/ovis-hpc/ldms/blob/main/ldms/src/ldmsd/ldmsd.c) (LDMS Daemon), [`ldms/src/core/ldms.c`](https://github.com/ovis-hpc/ldms/blob/main/ldms/src/core/ldms.c) (Metric Sets API), [`ldms/src/core/ldms_xprt.c`](https://github.com/ovis-hpc/ldms/blob/main/ldms/src/core/ldms_xprt.c) (Transport Core), [`kernel/kldms/kldms.c`](https://github.com/ovis-hpc/ldms/blob/main/kernel/kldms/kldms.c) (Kernel Collectors)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_collection["Metric Collection"]
  node_samplers["Sampler Plugins"]
  node_lustre_sampler["Lustre Sampler<br/>[lustre_client.c]"]
  node_lustre_metrics["Lustre Metrics"]
  node_kernel_collectors["Kernel Collectors<br/>[kldms.c]"]
  node_kokkos_connector["Kokkos Connector<br/>[kp_kernel_ldms.cpp]"]
end

subgraph group_runtime["LDMS Runtime"]
  node_metric_sets["Metric Sets API<br/>[ldms.c]"]
  node_transport["Transport Core<br/>[ldms_xprt.c]"]
  node_transport_backends["Transport Backends<br/>[zap.c]"]
  node_authentication["Authentication<br/>[ldms_auth.c]"]
end

subgraph group_daemon["Daemon Services"]
  node_daemon["LDMS Daemon<br/>[ldmsd.c]"]
  node_daemon_config["Daemon Configuration<br/>[ldmsd_config.c]"]
  node_producer_management["Producer Management<br/>[ldmsd_prdcr.c]"]
  node_python_control["Python Control"]
end

subgraph group_storage["Storage"]
  node_store_plugins["Store Plugins"]
  node_timescale_store["Timescale Store<br/>[store_timescale.c]"]
end

subgraph group_integrations["Extensions"]
  node_contrib_samplers["Contributed Samplers"]
  node_kernel_metric_api["Kernel Metric API<br/>[gpcd_pub.h]"]
end

node_operator(("Operator"))
node_metric_sources(("Metric Sources"))

node_operator -.->|"configures"| node_daemon_config
node_daemon_config -.->|"configures"| node_daemon
node_metric_sources -->|"provides metrics"| node_samplers
node_samplers -->|"collects into"| node_metric_sets
node_lustre_sampler -->|"uses"| node_lustre_metrics
node_kernel_collectors -.->|"exposes metrics"| node_kernel_metric_api
node_kernel_collectors -.->|"updates"| node_metric_sets
node_kokkos_connector -.->|"publishes metrics"| node_metric_sets
node_metric_sets -->|"transfers metrics"| node_transport
node_transport -.->|"uses"| node_transport_backends
node_daemon -->|"transports data"| node_transport
node_daemon -.->|"manages producers"| node_producer_management
node_python_control -.->|"controls"| node_daemon
node_authentication -.->|"authenticates"| node_transport
node_daemon -->|"stores metrics"| node_store_plugins
node_store_plugins -.->|"includes"| node_timescale_store
node_contrib_samplers -.->|"collects into"| node_metric_sets

click node_samplers "https://github.com/ovis-hpc/ldms/tree/main/ldms/src/sampler"
click node_lustre_sampler "https://github.com/ovis-hpc/ldms/blob/main/ldms/src/sampler/lustre_newer/lustre_client.c"
click node_lustre_metrics "https://github.com/ovis-hpc/ldms/blob/main/ldms/src/sampler/lustre_newer/lustre_client_general.c"
click node_kernel_collectors "https://github.com/ovis-hpc/ldms/blob/main/kernel/kldms/kldms.c"
click node_kokkos_connector "https://github.com/ovis-hpc/ldms/blob/main/kokkosConnector/kp_kernel_ldms.cpp"
click node_metric_sets "https://github.com/ovis-hpc/ldms/blob/main/ldms/src/core/ldms.c"
click node_transport "https://github.com/ovis-hpc/ldms/blob/main/ldms/src/core/ldms_xprt.c"
click node_transport_backends "https://github.com/ovis-hpc/ldms/blob/main/lib/src/zap/zap.c"
click node_authentication "https://github.com/ovis-hpc/ldms/blob/main/ldms/src/core/ldms_auth.c"
click node_daemon "https://github.com/ovis-hpc/ldms/blob/main/ldms/src/ldmsd/ldmsd.c"
click node_daemon_config "https://github.com/ovis-hpc/ldms/blob/main/ldms/src/ldmsd/ldmsd_config.c"
click node_producer_management "https://github.com/ovis-hpc/ldms/blob/main/ldms/src/ldmsd/ldmsd_prdcr.c"
click node_python_control "https://github.com/ovis-hpc/ldms/blob/main/ldms/python/ldmsd/ldmsd_communicator.py"
click node_store_plugins "https://github.com/ovis-hpc/ldms/tree/main/ldms/src/store"
click node_timescale_store "https://github.com/ovis-hpc/ldms/blob/main/ldms/src/contrib/store/timescale/store_timescale.c"
click node_contrib_samplers "https://github.com/ovis-hpc/ldms/tree/main/ldms/src/contrib/sampler"
click node_kernel_metric_api "https://github.com/ovis-hpc/ldms/blob/main/kernel/kldms/gpcd_pub.h"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_samplers,node_lustre_sampler,node_lustre_metrics,node_kernel_collectors,node_kokkos_connector toneBlue
class node_metric_sets,node_transport,node_transport_backends,node_authentication toneAmber
class node_daemon,node_daemon_config,node_producer_management,node_python_control toneMint
class node_store_plugins,node_timescale_store toneRose
class node_contrib_samplers,node_kernel_metric_api,node_operator,node_metric_sources toneIndigo
```

## Components

### Metric Collection

- [Sampler Plugins](https://github.com/ovis-hpc/ldms/tree/main/ldms/src/sampler): `ldms/src/sampler`
- [Lustre Sampler](https://github.com/ovis-hpc/ldms/blob/main/ldms/src/sampler/lustre_newer/lustre_client.c): `ldms/src/sampler/lustre_newer/lustre_client.c`
- [Lustre Metrics](https://github.com/ovis-hpc/ldms/blob/main/ldms/src/sampler/lustre_newer/lustre_client_general.c): `ldms/src/sampler/lustre_newer/lustre_client_general.c`
- [Kernel Collectors](https://github.com/ovis-hpc/ldms/blob/main/kernel/kldms/kldms.c): `kernel/kldms/kldms.c`
- [Kokkos Connector](https://github.com/ovis-hpc/ldms/blob/main/kokkosConnector/kp_kernel_ldms.cpp): `kokkosConnector/kp_kernel_ldms.cpp`

### LDMS Runtime

- [Metric Sets API](https://github.com/ovis-hpc/ldms/blob/main/ldms/src/core/ldms.c): `ldms/src/core/ldms.c`
- [Transport Core](https://github.com/ovis-hpc/ldms/blob/main/ldms/src/core/ldms_xprt.c): `ldms/src/core/ldms_xprt.c`
- [Transport Backends](https://github.com/ovis-hpc/ldms/blob/main/lib/src/zap/zap.c): `lib/src/zap/zap.c`
- [Authentication](https://github.com/ovis-hpc/ldms/blob/main/ldms/src/core/ldms_auth.c): `ldms/src/core/ldms_auth.c`

### Daemon Services

- [LDMS Daemon](https://github.com/ovis-hpc/ldms/blob/main/ldms/src/ldmsd/ldmsd.c): `ldms/src/ldmsd/ldmsd.c`
- [Daemon Configuration](https://github.com/ovis-hpc/ldms/blob/main/ldms/src/ldmsd/ldmsd_config.c): `ldms/src/ldmsd/ldmsd_config.c`
- [Producer Management](https://github.com/ovis-hpc/ldms/blob/main/ldms/src/ldmsd/ldmsd_prdcr.c): `ldms/src/ldmsd/ldmsd_prdcr.c`
- [Python Control](https://github.com/ovis-hpc/ldms/blob/main/ldms/python/ldmsd/ldmsd_communicator.py): `ldms/python/ldmsd/ldmsd_communicator.py`

### Storage

- [Store Plugins](https://github.com/ovis-hpc/ldms/tree/main/ldms/src/store): `ldms/src/store`
- [Timescale Store](https://github.com/ovis-hpc/ldms/blob/main/ldms/src/contrib/store/timescale/store_timescale.c): `ldms/src/contrib/store/timescale/store_timescale.c`

### Extensions

- [Contributed Samplers](https://github.com/ovis-hpc/ldms/tree/main/ldms/src/contrib/sampler): `ldms/src/contrib/sampler`
- [Kernel Metric API](https://github.com/ovis-hpc/ldms/blob/main/kernel/kldms/gpcd_pub.h): `kernel/kldms/gpcd_pub.h`

### Other components

- **Operator**
- **Metric Sources**

## Connections

- Operator → Daemon Configuration: configures
- Daemon Configuration → LDMS Daemon: configures
- Metric Sources → Sampler Plugins: provides metrics
- Sampler Plugins → Metric Sets API: collects into
- Lustre Sampler → Lustre Metrics: uses (evidence: `ldms/src/sampler/lustre_newer/lustre_client.c`)
- Kernel Collectors → Kernel Metric API: exposes metrics
- Kernel Collectors → Metric Sets API: updates
- Kokkos Connector → Metric Sets API: publishes metrics
- Metric Sets API → Transport Core: transfers metrics
- Transport Core → Transport Backends: uses
- LDMS Daemon → Transport Core: transports data
- LDMS Daemon → Producer Management: manages producers
- Python Control → LDMS Daemon: controls
- Authentication → Transport Core: authenticates
- LDMS Daemon → Store Plugins: stores metrics
- Store Plugins → Timescale Store: includes
- Contributed Samplers → Metric Sets API: collects into
