Skip to content

Commit

Permalink
node.go: fix vpenso#55
Browse files Browse the repository at this point in the history
  • Loading branch information
gpontrand committed Mar 3, 2022
1 parent 89d4431 commit 1f6498f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions node.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,10 @@ func ParseNodeMetrics(input []byte) map[string]*NodeMetrics {
}

// NodeData executes the sinfo command to get data for each node
// It returns the output of the sinfo command
// It returns the output of the sinfo command using the echo workaround to bypass a slurm bug on
// version 19.5.05 that removes a space between the 1st and 2nd field of the array returned in output
func NodeData() []byte {
cmd := exec.Command("echo", "$(", "sinfo", "-h", "-N", "-O", "NodeList:)","$(", "sinfo", "-h", "-N", "-O","AllocMem,Memory,CPUsState,StateLong)")
cmd := exec.Command("echo", "$(sinfo", "-h", "-N", "-O", "NodeList:)", "$(sinfo", "-h", "-N", "-O","AllocMem,Memory,CPUsState,StateLong)")
out, err := cmd.Output()
if err != nil {
log.Fatal(err)
Expand Down

0 comments on commit 1f6498f

Please sign in to comment.