From 91fd12324185bd403faffa3c2712cd739c2b8d53 Mon Sep 17 00:00:00 2001 From: Caughlin Bohn <35080828+cbohn4@users.noreply.github.com> Date: Tue, 13 Oct 2020 06:09:06 -0500 Subject: [PATCH] sacct, scancel, srun: add page (#4600) --- pages/linux/sacct.md | 20 ++++++++++++++++++++ pages/linux/scancel.md | 12 ++++++++++++ pages/linux/srun.md | 16 ++++++++++++++++ 3 files changed, 48 insertions(+) create mode 100644 pages/linux/sacct.md create mode 100644 pages/linux/scancel.md create mode 100644 pages/linux/srun.md diff --git a/pages/linux/sacct.md b/pages/linux/sacct.md new file mode 100644 index 000000000..e14644c36 --- /dev/null +++ b/pages/linux/sacct.md @@ -0,0 +1,20 @@ +# sacct + +> Display accounting data from the Slurm service. +> More information: . + +- Display job id, job name, partition, account, number of allocated cpus, job state, and job exit codes for recent jobs: + +`sacct` + +- Display job id, job state, job exit code for recent jobs: + +`sacct --brief` + +- Display the allocations of a job: + +`sacct --jobs {{job_id}} --allocations` + +- Display elapsed time, job name, number of requested CPUs, and memory requested of a job: + +`sacct --jobs {{job_id}} --format={{elapsed}},{{jobname}},{{reqcpus}},{{reqmem}}` diff --git a/pages/linux/scancel.md b/pages/linux/scancel.md new file mode 100644 index 000000000..f5982fd82 --- /dev/null +++ b/pages/linux/scancel.md @@ -0,0 +1,12 @@ +# scancel + +> Cancel a Slurm job. +> More information: . + +- Cancel a job using its ID: + +`scancel {{job_id}}` + +- Cancel all jobs from a user: + +`scancel {{user_name}}` diff --git a/pages/linux/srun.md b/pages/linux/srun.md new file mode 100644 index 000000000..141ecc6cf --- /dev/null +++ b/pages/linux/srun.md @@ -0,0 +1,16 @@ +# srun + +> Create an interactive slurm job or connect to an existing job. +> More information: . + +- Submit a basic interactive job: + +`srun --pty /bin/bash` + +- Submit an interactive job with different attributes: + +`srun --ntasks-per-node={{num_cores}} --mem-per-cpu={{memory_MB}} --pty /bin/bash` + +- Connect to a worker node with a job running: + +`srun --jobid={{job_id}} --pty /bin/bash`