Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save saurabh-kataria/c632e238b1ac794278a7a9e8b67ed0b4 to your computer and use it in GitHub Desktop.
Save saurabh-kataria/c632e238b1ac794278a7a9e8b67ed0b4 to your computer and use it in GitHub Desktop.
get your cluster information which is managed by slurm
#!/bin/bash
echo "Gathering detailed node information..."
scontrol show nodes
echo "Gathering partition information..."
scontrol show partition
echo "Gathering cluster configuration..."
scontrol show config
echo "Listing all jobs in the queue..."
squeue -l
echo "Summary of node states..."
sinfo -N -l
# Uncomment the following lines to gather information about a specific job ID
# JOB_ID=<your_job_id>
# echo "Gathering job step information for job ID $JOB_ID..."
# sstat --allsteps -j $JOB_ID
# echo "Gathering CPU and memory usage for job ID $JOB_ID..."
# sstat -j $JOB_ID --format=JobID,JobName,MaxRSS,MaxVMSize,AveRSS,AveVMSize
# If you have GPU resources and want to gather GPU information:
# echo "Gathering GPU information..."
# scontrol show gpu
# echo "Gathering GPU usage for job ID $JOB_ID..."
# sstat -j $JOB_ID --format=JobID,JobName,GPU
echo "Gathering cluster accounting information..."
sacct -a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment