Admin Usage Patterns

이 페이지는 shared GPU/HPC server를 운영하면서 자주 쓰는 점검 명령을 공개 가능한 형태로 정리하는 입구입니다. 실제 운영 노트에는 더 구체적인 값이 있을 수 있지만, public page에는 host, user, account, cluster, IP, SSH port, private path, incident output을 남기지 않습니다.

운영 명령은 먼저 세 종류로 나눕니다.

ClassMeaningPublic rule
read-only check상태 확인, queue 확인, log 검색command pattern은 공개 가능, output은 sanitize
state-changing adminuser/QOS/limit/NAT 변경placeholder만 사용하고 실제 정책값은 비공개
sensitive evidenceauth log, kernel log, RAID output, process tableraw output을 붙이지 않고 evidence class로 요약

Quick Routing

NeedUseDetail page
네트워크 대역폭 또는 socket pressure 확인ip, sar, ifstat, ss, netstat[[infra/hardware/storage-network
프로세스별 disk IO 확인sudo iotop -o -a[[infra/hardware/storage-network#storage-health-evidence
RAID/disk health 확인sudo <raid-tool> /c<controller-id> show[[infra/server-ops/incident-response
GPU Xid 또는 device mapping 확인journalctl, grep, nvidia-smi[[infra/gpu/index#xid-triage
Slurm queue, usage, fair-share 확인sacct, squeue, sreport, sshare, sprio[[infra/hpc/slurm-accounting-limits
Slurm user/account/QOS limit 변경sacctmgr add/modify/update[[infra/hpc/slurm-accounting-limits#policy-changes
sbatch script option 확인#SBATCH ...[[infra/hpc/slurm-job-script
접속 패턴 집계sanitized auth.log aggregation[[infra/server-ops/access-boundary
NAT 또는 outbound access 설정iptables pattern[[infra/server-ops/access-boundary

Daily Admin Loop

평소 운영 명령은 아래 순서로 정리하면 incident dump가 아니라 재사용 가능한 runbook이 됩니다.

StepQuestionCommand class
Observe지금 느린가, 실패했는가, quota가 막혔는가?squeue, sacct, GPU/IO/network counters
ClassifyGPU, disk, network, scheduler, access 중 어디인가?nvidia-smi, iotop, ip -s, journalctl, sreport
Verify같은 증거가 다른 command에서도 보이는가?queue + log, GPU mapping + Xid, IO wait + process IO
Changeread-only 확인으로 충분한가, 정책 변경이 필요한가?sacctmgr, firewall/NAT, account changes
Record공개 가능한 교훈은 무엇인가?sanitized symptom, evidence class, prevention

이 흐름을 지키면 private runbook의 구체적인 값은 내부에 남기고, public note에는 원리와 판단 기준만 남길 수 있습니다.

Change Protocol

운영 명령 중 가장 조심해야 하는 것은 sudo, sacctmgr, firewall/NAT, account/group 변경처럼 shared state를 바꾸는 명령입니다. Public note에는 command shape만 남기고, 실제 적용 전후 기록은 private runbook에 둡니다.

StepPublic-safe recordPrivate-only record
Evidencesymptom class, command family, affected resource axisraw log, real user, host, job, account, path
Intentquota class, access class, or routing purposeexact quota, exact role, internal approval
Commandplaceholder command with <user>, <account>, <interface>command with real values
Verifyread-only verification command familyraw output and before/after diff
Rollbackrollback exists and owner is knownexact rollback command and incident timeline

State-changing examples should therefore read like policy patterns, not administrative transcripts. If the value itself matters, keep it private unless it is already an official public policy.

Evidence Pairing

한 가지 command만 보고 바로 결론을 내리면 원인을 잘못 잡기 쉽습니다. Public runbook에는 가능한 한 evidence pair를 남깁니다.

SymptomPair evidence before deciding
GPU allocated but idlenvidia-smi utilization + dataloader/IO signal
Xid appearskernel log class + GPU UUID/PCI mapping in private note
Disk feels slowprocess IO + storage/controller health class
Network storage stallsinterface counters + IO wait or filesystem latency
Slurm queue is unfairsqueue/sprio + sshare/association policy
User cannot submitsubmit error class + association/QOS limits

Where Each Command Belongs

Command familyPut underPublic wording
ip, sar, ifstat, ss, netstatnetwork/storage diagnosisinterface counters and socket pressure
iotopprocess IO diagnosisprocess class causing disk pressure
RAID controller toolsstorage health and incident responsehealth class, rebuild, degraded array
nvidia-smi, Xid log searchGPU diagnosismapping logic and fault class
auth.log aggregationaccess boundaryaggregated access pattern
sacct, squeue, sprio, sshareSlurm inspectionqueue/accounting evidence
sreportusage reportingtrend and resource pressure
sacctmgr add/modify/updateSlurm policyplaceholder policy shape
iptables NATaccess/network boundarytopology-free NAT pattern
#SBATCH optionsjob script referenceresource contract

Host and IO Checks

Network interface counters are useful when storage, distributed training, or remote service calls feel slow. Do not publish real interface names if they reveal topology.

ip -s link show dev <interface>
sar -n DEV 1
ifstat <interface>
ss -s
netstat -s

netstat -m is platform-specific. On Linux, prefer interface counters for bandwidth and ss -s or netstat -s for socket-level symptoms.

For per-process disk IO:

sudo iotop -o -a

Public summary should say checkpoint writer, archive extraction, dataset reader, or large copy, not the real command, path, user, or project.

For disk/controller health:

sudo <raid-tool> /c<controller-id> show

Raw controller output may include device layout, serial-like identifiers, and incident details. Public notes should only keep the health class: healthy, degraded, rebuild, media error, or controller warning.

GPU Checks

Use stable identifiers when debugging GPU allocation, scheduler mapping, or CUDA-visible device confusion.

nvidia-smi --query-gpu=index,uuid,pci.bus_id,name --format=csv

When local device minor numbers matter, keep the raw result private and publish only the pattern:

for i in $(nvidia-smi --query-gpu=index --format=csv,noheader); do
  nvidia-smi -q -i "$i" | awk -v idx="$i" '
    /Product Name/ {sub(/.*: /,""); name=$0}
    /GPU UUID/     {sub(/.*: /,""); uuid=$0}
    /Bus Id/       {sub(/.*: /,""); bus=$0}
    /Minor Number/ {sub(/.*: /,""); minor=$0}
    END {printf("index=%s minor=%s dev=/dev/nvidia%s bus=%s uuid=%s name=%s\n", idx, minor, minor, bus, uuid, name)}
  '
done

For Xid triage:

journalctl -k | grep -i xid
grep -i xid /var/log/kern.log

Public notes should report the class of failure, not raw kernel lines.

Evidence classAsk next
repeated Xid on one GPUsame physical device, same workload, or same thermal/power window?
Xid after driver changedriver/runtime compatibility or reboot/module state?
Xid across many GPUshost, driver, PCIe, power, or scheduler-wide event?
mapping mismatchUUID, PCI bus, minor number, Slurm GRES, and CUDA_VISIBLE_DEVICES alignment

Access Log Aggregation

Access logs are sensitive. Public documentation should keep the aggregation idea, not real users or source IPs.

grep "Accepted" /var/log/auth.log \
  | awk '{print "<minute>", "<user>", "(<source-ip>)"}' \
  | sort \
  | uniq -c

Distribution log formats differ. If a private runbook needs version-specific parsing, keep it private and convert public notes to this normalized form:

Raw fieldPublic replacement
username<user> or account class
source IP<source-ip> or source category
exact login minuteaggregated window
endpoint/portomit

Slurm Read-Only Inspection

Use these before changing policy.

sacct -X --format="JobID,User,State%-10,JobName%-30,CPUTime,AllocTRES%-42"
squeue -o "%.18i %.10P %.10u %.20j %.8T %.10M %.6D %C %.10m %.6b %N %.10Q %.10p"
sprio
sshare -l
sacctmgr show association
sacctmgr list transactions Action="Add Users" Start=<date-time> format=Where,Time

Usage reports:

sreport job sizesbyaccount All_Clusters users=<user> account=<account> PrintJobCount start=<yyyy-mm-dd>
sreport -thourper cluster utilization --tres="cpu,mem,gres/gpu" start=<yyyy-mm-dd>
sreport cluster AccountUtilizationByUser cluster=<cluster> accounts=<account> start=<mm/dd/yy> -thourper
sreport user top -thourper start=<mm/dd/yy>

Public writeups should describe trend and bottleneck, not user rankings, account names, or exact internal allocation.

Slurm Policy Changes

These examples show command shape only. They are not recommended quotas.

Add a user to a generic account class:

sudo sacctmgr add user <user> account=<account> cluster=<cluster> \
  Fairshare=<n> GrpTRES="cpu=<n>,gres/gpu=<n>" \
  MaxJobs=<n> MaxTRES="cpu=<n>,gres/gpu=<n>,node=<n>" \
  MaxSubmitJobs=<n> DefaultAccount=<account> DefaultQOS=<qos> QOS=<qos>

Modify account-class limits:

sudo sacctmgr modify user where account=<account> \
  set MaxJobs=<n> MaxSubmit=<n> \
  MaxTRES=cpu=<n>,gres/gpu=<n>,node=<n> \
  GrpTRES=cpu=<n>,gres/gpu=<n>

Modify a broad user limit:

sudo sacctmgr modify user set \
  MaxTRES=cpu=<n>,gres/gpu=<n>,node=<n> \
  GrpTRES=cpu=<n>,gres/gpu=<n> \
  MaxSubmit=<n> MaxJobs=<n>

Limit QOS submissions per user:

sudo sacctmgr update qos set MaxSubmitJobsPerUser=<n> where Name=<qos>

Before applying state-changing commands, record the intended policy, affected account class, rollback plan, and verification command in a private admin note.

Network NAT Pattern

NAT/firewall changes are state-changing and topology-sensitive. Public notes should use placeholders only.

sudo iptables -t nat -A POSTROUTING -o <public-interface> -j MASQUERADE

Keep real interface names, subnets, router assumptions, and security policy private.

sbatch Option Reference

Common options belong in Slurm Job Script, but the operational split is:

GroupOptionsRisk
identity--job-name, --output, --errorleaking project names or private paths
resources--time, --nodes, --cpus-per-task, --mem, --gresover-requesting or queue delay
placement--partition, --nodelist, --nodefile, --exclusiveexposing cluster topology
environment--exportleaking tokens or private settings
workflow--dependency, --begin, --mail-type, --mail-userhidden ordering assumptions or personal info

Public Note Checklist

  • Are all users, IPs, ports, hostnames, cluster names, account names, internal paths, and private project names removed?
  • Is this command read-only or state-changing?
  • If state-changing, is it shown only with placeholders?
  • Is raw output replaced with evidence class and decision?
  • Does the note link to the right durable concept page instead of becoming a private incident dump?