Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/Azure/az-hop
Browse files Browse the repository at this point in the history
  • Loading branch information
xpillons committed Dec 7, 2023
2 parents 8042d37 + d786eeb commit 55b2dae
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions playbooks/telegraf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -205,14 +205,14 @@
mode: 0755
owner: telegraf
content: |
#!/usr/bin/env python
#!/usr/bin/env python3
import json
import subprocess
import sys
def sinfo():
for sinfo_line in subprocess.check_output(["/bin/sinfo", "-h", "-o", "%R %D %F %T"]).split('\n'):
for sinfo_line in subprocess.check_output(["/bin/sinfo", "-h", "-o", "%R %D %F %T"]).decode().split('\n'):
data = sinfo_line.split(' ')
if (data[0] != ''):
partition = data[0]
Expand All @@ -227,7 +227,7 @@
jobs_pending = 0
jobs_configuring = 0
jobs_other = 0
for sinfo_line in subprocess.check_output(["/bin/squeue", "-h", "-o", "%a %D %T %P"]).split('\n'):
for sinfo_line in subprocess.check_output(["/bin/squeue", "-h", "-o", "%a %D %T %P"]).decode().split('\n'):
data = sinfo_line.split(' ')
if (data[0] != ''):
account = data[0]
Expand Down

0 comments on commit 55b2dae

Please sign in to comment.