This is the core Python CLI toolset for GPU Cluster Monitoring (GCM), providing comprehensive monitoring and health checking capabilities for High-Performance Computing (HPC) clusters. GCM powers FAIR (Fundamental AI Research) AI workloads across over hundreds of thousands of GPUs at Meta.
The GCM core Python library consists of the following components:
Monitoring (/monitoring/)
Collects cluster statistics from the Slurm workload scheduler, and NVIDIA Management Library (NVML), providing visibility into job performance and resource utilization.
Available CLI Commands (via gcm):
gcm slurm_monitor --sink=stdout --once- Job, node and diagnostics statistics according tosacct,sinfo, andsqueuegcm sacct_backfill --once new -s 'today 4pm' -e 'today 5pm' -- gcm sacct_publish --sink stdout- Historical finished jobs data backfill according tosacctgcm sacct_running --sink=stdout --once- Running Jobs according tosacctgcm sacctmgr_qos --sink=stdout --once- QOS information according tosacctmgrgcm sacctmgr_user --sink=stdout --once- User information according tosacctmgrgcm slurm_job_monitor --sink=stdout --once- Job queue and node state information according tosqueueandsinfogcm scontrol --sink=stdout --once- Slurm control plane monitoringgcm scontrol_config --sink=stdout --once- Slurm configuration file monitoringgcm scontrol_topology --sink=stdout --once- Slurm block and switch topology monitoringgcm storage --help- Storage system monitoring (not used in Meta production)gcm nvml_monitor --sink=stdout --once- GPU telemetry collection (not used in Meta production)
If you have GCM installed, you can see the full list of monitoring components with:
gcm --helpHealth Checks (/health_checks/)
Verifies the proper functioning of hardware, software, network, storage, and services throughout the job lifecycle. Includes 20+ specialized health checks.
You can check the full list of health checks here. If you have GCM installed, you can also see the full list of health checks with:
health_checks --help- Python 3.10+ (currently tested on 3.10, later versions should work)
- NVIDIA GPUs (for GPU monitoring features)
- Slurm (for job scheduler integration)
# Latest main
pip install --upgrade git+ssh://git@github.com:facebookresearch/gcm.git@main
# Specific release
pip install --upgrade git+ssh://git@github.com:facebookresearch/gcm.git@2022.9.20# Clone and setup development environment
git clone https://github.com/facebookresearch/gcm
cd gcm/gcm
# Create conda environment
conda create -y --name py310 python==3.10
conda activate py310
# Install dependencies
pip install -r dev-requirements.txt
pip install --no-deps -e .
# Install pre-commit hooks
pre-commit install# Start monitoring with stdout output (for testing)
gcm slurm_monitor --sink=stdout --once
# Start continuous monitoring with file output
gcm slurm_monitor --sink=file --sink-opt path=/var/log/gcm/monitoring.json
# Monitor with OpenTelemetry export
gcm slurm_monitor --sink=otel --sink-opt endpoint=http://localhost:4317# Run GPU diagnostics
health_checks check-dcgmi diag fair_cluster prolog --sink=stdout
# Check GPU status via NVML
health_checks check-nvidia-smi fair_cluster prolog -c gpu_num -c running_procs --sink=stdout
# Check storage and mounts
health_checks check-storage disk-usage fair_cluster prolog -v /dev/root --usage-critical-threshold=85 --sink=stdout
# Monitor system processes
health_checks check-process check-zombie fair_cluster prolog --elapsed=200 --sink=stdoutBoth monitoring and health checks support TOML configuration files to simplify parameter management:
# Using config file for monitoring
gcm --config=/etc/cluster_config.toml slurm_monitor
# CLI arguments override config file values
gcm --config=/etc/cluster_config.toml slurm_monitor --sink=stdout --onceExample configuration file in /monitoring/config/config.toml.
# Using config file for health checks
health_checks --config=cluster_config.toml check-dcgmi diag
# Using feature flags
health_checks --features-config=features.toml --config=cluster_config.toml check-nvidia-smiExample configuration files are available in /health_checks/config/.
- Adding a New Collector
- Health Checks Onboarding
- Adding a New Exporter/Sink
- Adding a New Health Check
- Contributing Guide - Development setup and contribution guidelines
- Release Process - How releases are managed
We welcome contributions! Please see our Contributing Guide for:
- Development environment setup
- Code style and testing requirements
- Pull request process
- Dependency management
Python 3.10 or greater is required. Currently only 3.10 is tested, but later versions should work as well.
This component is licensed under the MIT License.