# `vcctl` Command Line Enhancement [@jiangkaihua](jiangkaihua1@huawei.com); Dec. 16, 2019 ## Catalog - [`vcctl` Command Line Enhancement](#vcctl-command-line-enhancement) - [Catalog](#catalog) - [Functions of `vcctl`](#functions-of-vcctl) - [Command `vcctl job`](#command-vcctl-job) - [Command `vcctl queue`](#command-vcctl-queue) - [`vcctl` vs. Slurm Command Line](#vcctl-vs-slurm-command-line) - [New Format of Volcano Command Line](#new-format-of-volcano-command-line) - [For Common User](#for-common-user) - [`vsub` submit via file](#vsub-submit-via-file) - [For Administrator](#for-administrator) - [Reference](#reference) ## Functions of `vcctl` `vcctl` is the command line of [volcano](https://github.com/volcano-sh/volcano). The main functions are listed below: ### Command `vcctl job` | Command Format | Usage | | - | - | | `vcctl job delete -N -n ` | delete a job | | `vcctl job list -S -n ` | list job info | | `vcctl job resume -N -n ` | resume a job | | `vcctl job run -f -i -L -m -N -n -r -R -S ` | run job by parameters from the command line | | `vcctl job suspend -N -n ` | suspend a job | | `vcctl job view -N -n ` | show a job info | ### Command `vcctl queue` | Command Format | Usage | | - | - | | `vcctl queue create -n -w ` | create a queue | | `vcctl queue delete -n ` | delete a queue | | `vcctl queue get -n ` | get a queue | | `vcctl queue list ` | list all the queue | | `vcctl queue operate -a -n -w ` | operate a queue | ## `vcctl` vs. Slurm Command Line The similar Slurm command lines are listed below: | `vcctl` Function | Similar Slurm Command Line | | - | - | | `vcctl job run -f ` | `sbatch ` | | `vcctl job run -N ` | `srun -J ` | | `vcctl job delete -N -n ` | `scancel / -n -u ` | | `vcctl job suspend -N -n ` | `scontrol suspend ` | | `vcctl job resume -N -n ` | `scontrol resume ` | | `vcctl job view -N -n ` | `scontrol show job ` | | `vcctl job list --all-namespaces` | `scontrol show job` | | `vcctl job list -n ` | `squeue -u ` | | `vcctl queue create -n -w ` | `scontrol create PartitionName=` | | `vcctl queue delete -n ` | `scontrol delete PartitionName=` | | `vcctl queue get -n ` | `squeue -p & scontrol show partition ` | | `vcctl queue list ` | `squeue -a & scontrol show partition` | | `vcctl queue operate -a -n -w ` | no similar commands | ## New Format of Volcano Command Line ### For Common User | Old Format | New Format | | - | - | | `vcctl job run -N ` | `vsub -j/--job-name ` | | `vcctl job delete -N -n ` | `vcancel -n -N ` | | `vcctl job suspend -N -n ` | `vsuspend -n -N ` | | `vcctl job resume -N -n ` | `vresume -n -N ` | | `vcctl job view -N -n ` | `vjobs -n -N ` | | `vcctl job list -S -n ` | `vjobs -S -N ` | | `vcctl queue get -n ` | `vqueues -n ` | | `vcctl queue list ` | `vqueues` | #### `vsub` submit via file Command `vsub` can also submit a batch job via `.sh` file, like: ```shell [user@host]$ vsub test.sh Submitted batch job test ``` The job file owns a format like: ```shell #!/bin/bash` #VSUB jobName test #VSUB namespace volcano-system #VSUB queue default #VSUB schedulerName volcano #VSUB image busybox #VSUB replicas 10 #VSUB minAvailable 4 ... echo test.sh start on $(date) sleep 100 echo test.sh end on $(date) ``` ### For Administrator | Old Format | New Format | | - | - | | `vcctl queue create -n -w ` | `vadmin qcreate -n -w ` | | `vcctl queue delete -n `| `vadmin qcancel -n ` | | `vcctl queue operate -a open -n `| `vadmin qopen -n ` | | `vcctl queue operate -a close -n `| `vadmin qclose -n ` | | `vcctl queue operate -a update -n -w `| `vadmin qupdate -n -w ` | operate -a -n -w ## Reference - [Slurm Documentation](https://slurm.schedmd.com/) - [IBM Platform LSF Command Reference](https://www.ibm.com/support/knowledgecenter/en/SSETD4_9.1.2/lsf_kc_cmd_ref.html) - [Slurm作业调度系统使用指南](http://hmli.ustc.edu.cn/doc/userguide/slurm-userguide.pdf) - [SLURM使用基础教程](https://www.hpccube.com/wiki/index.php/SLURM%E4%BD%BF%E7%94%A8%E5%9F%BA%E7%A1%80%E6%95%99%E7%A8%8B) - [北京大学国际数学中心微型工作站-SLURM 使用参考](http://bicmr.pku.edu.cn/~wenzw/pages/index.html)