Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include all nodes in node.go and nodes.go if run as unprivileged user #94

Open
wants to merge 2 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cpus.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func ParseCPUsMetrics(input []byte) *CPUsMetrics {

// Execute the sinfo command and return its output
func CPUsData() []byte {
cmd := exec.Command("sinfo", "-h", "-o %C")
cmd := exec.Command("sinfo", "-h", "-a", "-o %C")
stdout, err := cmd.StdoutPipe()
if err != nil {
log.Fatal(err)
Expand Down
2 changes: 1 addition & 1 deletion node.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ 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
func NodeData() []byte {
cmd := exec.Command("sinfo", "-h", "-N", "-O", "NodeList: ,AllocMem: ,Memory: ,CPUsState: ,StateLong:")
cmd := exec.Command("sinfo", "-h", "-a", "-N", "-O", "NodeList: ,AllocMem: ,Memory: ,CPUsState: ,StateLong:")
out, err := cmd.Output()
if err != nil {
log.Fatal(err)
Expand Down
2 changes: 1 addition & 1 deletion nodes.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ func ParseNodesMetrics(input []byte) *NodesMetrics {

// Execute the sinfo command and return its output
func NodesData() []byte {
cmd := exec.Command("sinfo", "-h", "-o %D,%T")
cmd := exec.Command("sinfo", "-h", "-a", "-o %D,%T")
stdout, err := cmd.StdoutPipe()
if err != nil {
log.Fatal(err)
Expand Down