From 5ddf1c16dc7962790821bd61f0eb280d9929604b Mon Sep 17 00:00:00 2001 From: Nat Lasseter Date: Thu, 7 Jan 2021 13:55:59 +0000 Subject: specify absolute path to slurm tools in raiders --- slurm_job_states.rb | 2 +- slurm_number_jobs.rb | 2 +- slurm_pending_on_qos.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/slurm_job_states.rb b/slurm_job_states.rb index 2881d68..232df3c 100644 --- a/slurm_job_states.rb +++ b/slurm_job_states.rb @@ -8,7 +8,7 @@ class SlurmJobStates start_time = (Time.now - @interval).strftime("%H:%M:%S") # Get raw data from sacct and read jobs into an array - raw = `sacct -a -P -o State,Partition -S #{start_time}`.lines + raw = `/usr/bin/sacct -a -P -o State,Partition -S #{start_time}`.lines # remove any whitespace from the ends of each string raw = raw.map(&:strip) # drop the header line diff --git a/slurm_number_jobs.rb b/slurm_number_jobs.rb index 91fe630..2a08704 100644 --- a/slurm_number_jobs.rb +++ b/slurm_number_jobs.rb @@ -9,7 +9,7 @@ class SlurmNumberJobs end def raid - raw = `squeue --format="%P,%u,%T" --noheader` + raw = `/usr/bin/squeue --format="%P,%u,%T" --noheader` raw = raw.lines.map(&:strip) raw = raw.map { |line| line.split(',') } diff --git a/slurm_pending_on_qos.rb b/slurm_pending_on_qos.rb index 288719a..aeaf481 100644 --- a/slurm_pending_on_qos.rb +++ b/slurm_pending_on_qos.rb @@ -23,7 +23,7 @@ class SlurmPendingOnQos def raid @partition_thresholds.each do |partition, threshold| squeue_cmd = [ - 'squeue', + '/usr/bin/squeue', '--format="%R,%V"', '--noheader', "--partition=#{partition}", -- cgit v1.2.1