Last active
September 9, 2022 21:04
CRC commands
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Helper program to list useful CRC commands | |
function get_pager_cmd() { | |
if command -v bat &>/dev/null; then | |
echo "bat -l bash" | |
else | |
echo cat | |
fi | |
} | |
pager_cmd=$(get_pager_cmd) | |
# echo "Pager: $pager_cmd" | |
echo -e " | |
Cheatsheet for CRC commands: | |
# -------------- | |
# infrastructure | |
# show host group list | |
qconf -shgrpl | |
# show list of all user set lists | |
qconf -sul | |
# show list of all submission hosts | |
qconf -ss | |
# --------------- | |
# monitoring jobs | |
jobstats -d | |
htop -u \$USER | |
qstat -u \$USER | |
qstat -q gpu@@czajka | |
qstat -f | |
qhost -h qa-rtx6k-017.crc.nd.edu | |
# ------------------ | |
# interactive shells | |
qrsh -q long -pe smp 1 | |
qrsh -q long@d12chas407** -pe smp 1 | |
qrsh -q gpu@@czajka -l gpu_card=1 -pe smp 1 | |
qrsh -q gpu@qa-1080ti-002.crc.nd.edu -l gpu_card=0 -pe smp 1 | |
qsh -q gpu@qa-1080ti-002.crc.nd.edu -l gpu_card=0 -S /bin/bash | |
# -------------------- | |
# monitoring resources | |
resmon | |
# disk usage | |
spaceleft # user alias | |
quota | |
pan_df -H /scratch365/\$USER/ | |
fs listquota -hu /afs/crc.nd.edu/group/cvrl/scratch_25/ | sort -k 4n | |
# nodes usage | |
free_nodes.sh -H | |
free_nodes.sh @czajka | |
nodesInUse.sh @cvrl_gpu | |
qstat -F -q gpu@@czajka | grep -i "gpu[@_]" | |
# sum of all gpus available in CVRL GPU queue or CRC GPU queue | |
qstat -F -q gpu@@cvrl_gpu | grep -i gpu_card= | cut -f 2 -d'=' | paste -sd+ | bc | |
qstat -F -q gpu@@crc_gpu | grep -i gpu_card= | cut -f 2 -d'=' | paste -sd+ | bc | |
# list all hosts in CVRL GPU queue or CRC GPU queue | |
qstat -F -q gpu@@cvrl_gpu | grep hostname= | |
qstat -F -q gpu@@crc_gpu | grep hostname= | |
# --------------------------------------------------------------- | |
# afs permissions (see afs groups below to manage multiple users) | |
fs la ~/public/datasets/bogus-dir | |
fs sa ~/public/datasets/bogus-dir <collaborator-net-id> rlw | |
fs sa ~/public/datasets/bogus-dir $USER:demogroup rlw | |
# a 'listing' (l) permission needs to be set for all parent directories | |
# for a user to access the target directory. Similarly, all existing | |
# descendent dirs need their permissions set as well recursively | |
# (e.g. find <parent> -type d -exec echo fs sa {} <net-id> rl \;). | |
# New directories have permissions inherited. | |
# Docs: https://docs.crc.nd.edu/infrastructure/user_acls.html | |
# ---------- | |
# afs groups | |
pts listowned $USER | |
pts creategroup $USER:demogroup | |
pts membership $USER:demogroup | |
pts adduser <collaborator-net-id> $USER:demogroup | |
pts examine $USER:demogroup | |
" | $pager_cmd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment