Skip to content

Commit 3d108ab

Browse files
authored
Include all partitions in squeue
If running slurm_exporter as a non-priviledged user and have multiple partitions the squeue command will not show you all jobs, but only ones that the user can access. The easiest solution is to add the '-a' flag to squeue to see all partitions, including hidden partitions.
1 parent cef8c26 commit 3d108ab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

queue.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ func ParseQueueMetrics(input []byte) *QueueMetrics {
8484

8585
// Execute the squeue command and return its output
8686
func QueueData() []byte {
87-
cmd := exec.Command("/usr/bin/squeue", "-r", "-h", "-o %A,%T,%r", "--states=all")
87+
cmd := exec.Command("/usr/bin/squeue", "-a", "-r", "-h", "-o %A,%T,%r", "--states=all")
8888
stdout, err := cmd.StdoutPipe()
8989
if err != nil {
9090
log.Fatal(err)

0 commit comments

Comments
 (0)