How hpc2n/softwareaccounting works
SAMS collects software-accounting data, processes and aggregates it, then submits or exposes results. The main stages are job/process sampling, file-based ingestion and aggregation, software-metadata database maintenance, and output formatting or metrics exposure. The graph includes the central runtime abstractions and documented capability branches. Several implementation excerpts are incomplete, so links between dynamically configured stages are omitted unless supported by the shown source references.
Main entry points: base.py Runtime abstractions · core.py Config and dispatch · SoftwareAccountingPW.py Software database · Software.py Process accounting
Components 23
Runtime core
- Collector CLI
scripts/sams-collector.py - Config and dispatch
sams/core.py - Runtime abstractions
sams/base.py
Data collection
- Process accounting
sams/sampler/Software.py - GPU sampling
sams/sampler/NvidiaSMI.py - Job metrics
sams/sampler/SlurmInfo.py - Slurm cgroups
sams/sampler/SlurmCGroup.py - Filesystem stats
sams/sampler/FSStats.py - I/O statistics
sams/sampler/IOStats.py - Pressure stats
sams/sampler/Pressure.py - ZFS statistics
sams/sampler/ZFSStats.py
Accounting data
- File ingestion
sams/loader/File.py - Job aggregation
sams/aggregator/SoftwareAccounting.py - Software database
sams/backend/SoftwareAccountingPW.py - Software aggregation
sams/aggregator/SoftwareAccountingPW.py - Software updater
scripts/sams-software-updater.py - Software extractor
scripts/sams-software-extractor.py
Output and integration
- XML records
sams/xmlwriter/File.py - Prometheus files
sams/output/Prometheus.py - Prometheus listener
sams/listener/Prometheus.py - Metric outputs
sams/output
Other components
- Operator
- Prometheus
Connections 23
- Collector CLI → Config and dispatch: imports
scripts/sams-collector.py - Process accounting → Runtime abstractions: inherits from
sams/sampler/Software.py - Process accounting → Config and dispatch: uses
sams/sampler/Software.py - GPU sampling → Runtime abstractions: inherits from
sams/sampler/NvidiaSMI.py - Job metrics → Runtime abstractions: inherits from
sams/sampler/SlurmInfo.py - Slurm cgroups → Runtime abstractions: inherits from
sams/sampler/SlurmCGroup.py - Filesystem stats → Runtime abstractions: inherits from
sams/sampler/FSStats.py - I/O statistics → Runtime abstractions: inherits from
sams/sampler/IOStats.py - Pressure stats → Runtime abstractions: inherits from
sams/sampler/Pressure.py - ZFS statistics → Runtime abstractions: inherits from
sams/sampler/ZFSStats.py - File ingestion → Runtime abstractions: inherits from
sams/loader/File.py - Job aggregation → Runtime abstractions: inherits from
sams/aggregator/SoftwareAccounting.py - Software aggregation → Software database: uses backend
sams/aggregator/SoftwareAccountingPW.py - Software database → Runtime abstractions: inherits from
sams/backend/SoftwareAccountingPW.py - Software database → Config and dispatch: uses
sams/backend/SoftwareAccountingPW.py - Software updater → Config and dispatch: imports
scripts/sams-software-updater.py - Software extractor → Software database: extracts metadata
- XML records → Runtime abstractions: inherits from
sams/xmlwriter/File.py - Prometheus files → Runtime abstractions: inherits from
sams/output/Prometheus.py - Prometheus listener → Runtime abstractions: inherits from
sams/listener/Prometheus.py - Prometheus listener → Config and dispatch: uses config
sams/listener/Prometheus.py - Operator → Collector CLI: runs
- Prometheus → Prometheus files: scrapes metrics