File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ NHC_AUTH_USERS="${NHC_AUTH_USERS:-root nobody}"
99
1010# Find all users with jobs currently running on the node.
1111function nhc_job_find_users() {
12- local IFS JOBFILE JOBUSER STAT_OUT LINE PBS_XML
12+ local IFS JOBFILE JOBUSER SQUEUE_OUT LINE PBS_XML
1313 local -a JOBLIST USERLIST
1414
1515 dbg "Searching for job files"
@@ -54,9 +54,9 @@ function nhc_job_find_users() {
5454 elif [[ "$NHC_RM" == "slurm" ]]; then
5555 SLURM_SERVER_HOME="${SLURM_SERVER_HOME:-/var/spool/slurmd}"
5656 JOBFILE_PATH="${JOBFILE_PATH:-$SLURM_SERVER_HOME}"
57- STAT_OUT =$(${STAT_CMD :-/usr/bin/stat } ${STAT_FMT_ARGS :--c} %U $JOBFILE_PATH/job*/slurm_script )
57+ SQUEUE_OUT =$(${SQUEUE_CMD :-/usr/bin/squeue } ${SQUEUE_NODE :--w $(hostname -s)} ${SQUEUE_FMT_ARGS:---noheader -o %u} )
5858 IFS=$'\n'
59- USERLIST=( $STAT_OUT )
59+ USERLIST=( $SQUEUE_OUT )
6060 IFS=$' \t\n'
6161 dbg "Found ${#USERLIST[*]} job files in $JOBFILE_PATH"
6262 for JOBUSER in "${USERLIST[@]}" ; do
You can’t perform that action at this time.
0 commit comments