aicr-analyzing-snapshots

작성자: nvidia

AICR 스냅샷 YAML 파일을 분석하거나, 클러스터 상태를 검토하거나, 공급자 특성을 비교하거나, GPU/네트워크 토폴로지 인사이트를 추출할 때 사용합니다...

npx skills add https://github.com/nvidia/aicr --skill aicr-analyzing-snapshots

Analyzing AICR Snapshots

Systematic analysis of AICR snapshot YAML files to extract cluster identity, provider characteristics, GPU topology, node health, software stack, and operational signals. Produces a structured Markdown report.

When to Use

  • User provides a snapshot YAML file for review
  • User asks about cluster characteristics or provider differentiation
  • User wants to compare snapshots or extract specific insights
  • User asks to generate a cluster assessment report

Analysis Procedure

Snapshot files are large (50K-80K+ tokens). Never read the whole file. Use mcp__plugin_context-mode_context-mode__execute_file with Python/YAML parsing to extract sections, or use targeted Read with offset/limit on specific line ranges found via Grep.

Step 1: Extract Metadata and Structure

import yaml
data = yaml.safe_load(FILE_CONTENT)
meta = data.get('metadata', {})
measurements = data.get('measurements', [])
print("=== METADATA ===")
for k, v in meta.items():
    print(f"  {k}: {v}")
print("\n=== MEASUREMENTS ===")
for m in measurements:
    subtypes = [s.get('subtype', s.get('name', '?')) for s in m.get('subtypes', [])]
    print(f"  {m['type']}: {subtypes}")

Step 2: Extract K8s Server and Node Info

Key fields for provider identification:

Field PathWhat It Reveals
K8s.server.versionK8s version + vendor suffix (-eks-, -gke, -aks, +lke)
K8s.node.providerMapped provider: eks, gke, aks, oke, lke, metal3, kind
K8s.node.provider-idRaw provider URI (aws://, gce://, azure://, oci://, linode://, metal3://)
K8s.node.kernel-versionKernel + arch indicator (e.g., -64k = ARM 64K pages)
K8s.node.container-runtime-*Runtime name and version
K8s.node.kubelet-versionKubelet version
K8s.node.os-imageOS description string

Provider detection logic:

provider-id prefixServiceNotes
aws://eksAmazon EKS
gce://gkeGoogle GKE
azure://aksAzure AKS
oci://okeOracle OKE
linode://lkeAkamai Cloud / Linode LKE
metal3://bare-metalMetal3/Ironic, self-managed
kind://kindLocal dev cluster
(none/other)anySelf-managed, check version string

If provider-id is absent, check K8s.server.version for vendor substrings.

Step 3: Extract GPU Info

Key fields from GPU.smi:

FieldExampleSignificance
gpu.modelNVIDIA GB300Maps to accelerator criteria
gpu.product-architectureBlackwellGPU generation
gpu-count4GPUs per node
driver580.126.16NVIDIA driver version
cuda-version13.0CUDA toolkit version
gpu.addressing-modeATSATS = unified CPU-GPU memory (Grace)
gpu.persistence-modeDisabled/EnabledShould be Enabled for production
gpu.vbios-version97.10.4A.00.1AFirmware version
gpu.gsp-firmware-version580.126.16GSP firmware

Accelerator mapping (checked in order, case-insensitive):

gpu.model containsAccelerator
gb200gb200 (check before b200)
gb300gb200 class (Blackwell NVL family)
b200b200
h100h100
gh200unresolved — Grace Hopper Superchip, not the discrete H200 GPU (check before h200)
h200h200 (discrete H200 GPU)
a100a100
l40sl40s
l40l40
rtx pro 6000rtx-pro-6000

Step 4: Extract OS Info

From OS.release: ID, VERSION_ID, PRETTY_NAME

From OS.grub: Boot parameters (check for iommu, console, init_on_free)

From OS.kmod: Loaded kernel modules (look for nvidia*, nv_peer_mem, gdrdrv, ib_*, mlx5_* for RDMA/InfiniBand)

From OS.sysctl (key tuning parameters):

SysctlGood Value for GPUWhy
vm.swappiness<= 10Minimize swapping for GPU workloads
vm.overcommit_memory1Allow overcommit for training
vm.nr_hugepages> 0 (ideal)Large page performance
fs.file-maxHigh (9223372036854775807)Sufficient file descriptors
kernel.threads-max> 1MSufficient threads
vm.min_free_kbytes> 1MMemory reserve

Step 5: Extract Node Topology

From NodeTopology.summary: node-count, taint-count, label-count

From NodeTopology.taint and NodeTopology.label, read the items list — one entry per distinct reading, sorted by key/value (taints: key/effect/value):

Item FieldWhat It Holds
context.keyTaint or label key, verbatim
context.valueTaint or label value (may be empty)
context.effectTaints only: NoSchedule, PreferNoSchedule, NoExecute
data.node-countTrue node total, including nodes dropped by truncation
data.node-listComma-separated node names (one of node-list / node-list-ref)
data.node-list-refKey into the subtype's data map whose entry holds the names (one of node-list / node-list-ref)
data.truncatedtrue when the node list is capped and ends with (+N more)

Current snapshots also carry the older data map on both subtypes; items is authoritative. Take counts from data.node-count rather than splitting node-list, and read data.truncated rather than probing for a (+N more) suffix. Use topology.LabelReadings / TaintReadings to resolve items into hydrated readings — they expand node-list-ref automatically, so callers do not need to implement the reference logic themselves.

Older snapshots (no items): fall back to the folded data map — effect|value|node1,node2,... for taints, value|node1,node2,... for labels. That encoding is lossy, so qualify anything derived from it:

  • A map key is ambiguous: when a key carries more than one value the value is folded into the key as <key>.<value>, indistinguishable from a label literally named that, and one of the colliding readings is dropped. Report such a key verbatim instead of asserting a key/value split.
  • A taint key disambiguated the same way ends in .<effect> and its value has only two fields (value|nodes); two taints sharing key and effect collapse into one entry.
  • summary.taint-count / label-count count map entries there, so they under-report wherever a collapse occurred, and node counts reflect only what survived truncation.

High-value labels to extract (skip feature.node.kubernetes.io/cpu-cpuid.*):

Label PrefixWhat It Reveals
kubernetes.io/arch.*CPU architecture (amd64 vs arm64 = heterogeneous)
nvidia.com/gpu.*GPU product, family, memory, compute, count, MIG state
nvidia.com/cuda.*CUDA driver/runtime versions
nvidia.com/mig.*MIG capable/config/strategy
nvidia.com/gpu.clique.*NVLink GPU cliques (multi-node NVLink domains)
resource.nvidia.com/computeDomainUnified compute domain
network.topology.nvidia.com/accelerator.*NVLink fabric blocks
node-type.*Hardware type (gb300, standard)
node-pool.*Pool assignment (gpu-pool, cpu-pool)
node.dgxc.nvidia.com/*DGX Cloud node classification
k8saas.nvidia.com/*K8SaaS management (NVSentinel cordon/uncordon)
dgxc.nvidia.com/nvsentinel-stateHealth state (remediation-failed, healthy)
nvsentinel.dgxc.nvidia.com/*NVSentinel component versions, driver state
network.nvidia.com/operator.*Network operator MOFED/NIC config state
metal3.io/uuid.*Metal3 bare-metal node UUIDs
workload.*Workload type (gpu, general)
feature.node.kubernetes.io/rdma.*RDMA available/capable
feature.node.kubernetes.io/network-sriov.*SR-IOV capability
feature.node.kubernetes.io/pci-15b3.*Mellanox ConnectX presence
feature.node.kubernetes.io/pci-10de.*NVIDIA GPU PCI presence
nvidia.com/dra-kubelet-pluginDRA (Dynamic Resource Allocation)

Step 6: Extract K8s Images and Policies

From K8s.image: All deployed container images and versions.

From K8s.policy: Flattened GPU Operator ClusterPolicy spec (dot-notation).

Key policy fields:

Policy FieldWhat to Check
driver.enabledGPU driver managed by operator
driver.versionDriver version in policy
driver.rdma.enabledRDMA support
toolkit.enabledContainer toolkit
devicePlugin.enabledDevice plugin active
dcgm.enabled / dcgmExporter.enabledGPU monitoring
migManager.enabledMIG management
ccManager.enabled / ccManager.defaultModeConfidential Computing
sandboxWorkloads.enabledSandbox/KubeVirt workloads
psa.enabledPod Security Admission
vfioManager.enabledVFIO passthrough

Step 7: Extract Slinky and MariaDB Conflict Signals

From K8s.slinky-slurm, report:

  • collection-state: absent, detected, unsupported-multicluster, or unknown
  • Controller count and projected NodeSet/LoginSet/RestApi/Accounting counts
  • Item identities and Controller associations; include only the allowlisted item data already present in the snapshot

detected means a Controller declaration exists, not that Slurm or its operator is healthy. Child items and counts are emitted only after all required APIs and references are collected conclusively; their absence is otherwise not confirmed absence. Never infer platform: slurm from this subtype.

From K8s.mariadb-operator, report collection-state as official MariaDB-operator API conflict evidence:

  • absent: official API group conclusively absent
  • api-detected: official API footprint present without observed MariaDB CRs
  • crs-detected: one or more official MariaDB CRs observed
  • unknown: discovery or List was inconclusive

These states do not prove database availability, operator health, or the existence of an external database such as RDS. Never infer accounting.databaseSource.

Step 8: Check SystemD Services

From SystemD.containerd.service, SystemD.kubelet.service, SystemD.docker.service:

FieldWhat to Check
ActiveStateShould be active
SubStateShould be running
LimitNOFILEFile descriptor limits
LimitMEMLOCKMemory lock limits (important for RDMA)
KillModeprocess for containerd (graceful)
Delegatetrue for containerd (cgroup delegation)
CPUAccountingResource accounting

Report Template

Structure the output as:

# Snapshot Analysis: {name}
> Source: {file} | Captured: {timestamp} | AICR: {version}

## Cluster Identity
Table: source-node, provider, K8s version, node count, GPU model, total GPUs

## Provider-Differentiating Insights
### 1. Provider Type (cloud vs bare-metal, managed vs self-managed)
### 2. CPU Architecture (homogeneous vs heterogeneous, ARM vs x86)
### 3. GPU Hardware (model, architecture, memory, driver, CUDA, MIG, persistence)
### 4. Network Topology (NVLink blocks, cliques, compute domains, RDMA, SR-IOV)
### 5. Management Layer (K8SaaS, NVSentinel health, cordon state)
### 6. Job Scheduling (Slurm/Slinky presence, HPC vs cloud-native)
### 7. Networking Stack (CNI, RDMA, SR-IOV, DOCA/MOFED)
### 8. Security (Confidential Computing, PSA, DRA)
### 9. Operational Signals (sysctl tuning, hugepages, persistence mode)

## Software Stack
### Key Container Images (table)
### OS and Kernel (table)

## Node Inventory
List nodes by rack/block/pool

## Operational Flags
Anything unusual: GPU health issues, disabled persistence mode,
missing hugepages, NVSentinel remediation failures, etc.

What Makes Each Provider Unique

Cloud Providers (EKS, GKE, AKS, OKE)

  • Provider-id with cloud prefix
  • Cloud-specific K8s version suffixes
  • Managed node groups / auto-scaling
  • No bare-metal labels (metal3.io)
  • Typically x86_64 homogeneous
  • No NVLink fabric topology labels
  • No Slurm/Slinky stack

Bare-Metal / DGX Cloud (Metal3, K8SaaS)

  • metal3:// provider-id with per-node UUIDs
  • k8saas.nvidia.com/* management labels
  • NVSentinel health monitoring (cordon/uncordon lifecycle)
  • NVLink accelerator blocks and GPU cliques
  • Compute domains spanning racks
  • ARM64 Grace CPUs (heterogeneous with x86 head node)
  • Slurm/Slinky HPC scheduling
  • RDMA + SR-IOV networking with DOCA drivers
  • ATS GPU addressing mode (unified memory)
  • Liquid-cooled chassis machine types (LCC in machine name)

Self-Managed / Kind

  • Missing or generic provider-id
  • No cloud or bare-metal management labels
  • Simpler topology (single node or small cluster)
  • Standard x86_64

AICR Criteria Mapping

After analysis, map the snapshot to AICR recipe criteria:

aicr recipe \
  --service {detected_service} \
  --accelerator {detected_accelerator} \
  --os {detected_os} \
  --intent {training|inference} \
  --snapshot {snapshot_file}
CriteriaExtracted FromValid Values
serviceK8s.node.provider / K8s.server.versioneks, gke, aks, oke, kind, lke
acceleratorGPU.smi.gpu.modelh100, h200, gb200, b200, a100, l40s, l40, rtx-pro-6000
osOS.release.IDubuntu, rhel, cos, amazonlinux, talos, ol, sles, rocky
intentUser-specifiedtraining, inference
platformUser-specifieddynamo, kubeflow, kueue, nim, runai, slurm

nvidia의 다른 스킬

accelerated-computing-cudf
nvidia
공식 NVIDIA 작성 NVIDIA cuDF GPU 데이터프레임, pandas 가속, dask-cuDF, ETL, 조인, groupby, CSV/Parquet I/O, nullable 의미론 등에 대한 안내
accessibility
nvidia
정적 분석, 런타임 테스트, ARIA 패턴, 키보드 탐색, 색상 대비를 아우르는 통합 접근성 감사 워크플로입니다. 이 스킬을 사용하세요…
accessing-mlflow
nvidia
MLflow에 저장된 평가 결과를 조회하고 탐색합니다. 사용자가 호출 ID로 실행을 조회하거나, 모델 간 메트릭을 비교하거나, 아티팩트를 가져오려 할 때 사용하세요.
add-binding-feature
nvidia
핵심 런타임과 영향을 받는 모든 바인딩에서 공용 NeMo Relay API 표면을 추가하거나 변경합니다.
add-middleware
nvidia
NeMo Relay 미들웨어 파이프라인에 새로운 가드레일 또는 인터셉트 유형을 추가합니다.
aicr-auditing-docs
nvidia
AICR의 Markdown 문서를 검토할 때 중복, 표류, 비대, 공백을 확인하여 프로젝트가 발전함에 따라 문서의 가치를 높게 유지하기 위해 사용합니다. "감사…"로 시작하는 트리거에 반응합니다.
aicr-creating-guided-demos
nvidia
대화형 안내 데모 스크립트(demos/*.sh)를 라이브 또는 자기 주도 방식으로 Frame → Tell → Show → Close 패턴에 따라 구조화한다. "데모 스크립트", "안내…"와 같은 표현에 반응한다.
aicr-creating-slide-decks
nvidia
기술 개념이나 워크플로우에 대한 독립형 HTML 슬라이드 덱 또는 시각적 발표 자료(예: demos/*.html)를 만들 때 사용하세요. 전체 화면으로 표시하거나…