Skip to content

Instantly share code, notes, and snippets.

@giovtorres
giovtorres / scontrol-show-node.py
Last active January 2, 2016 04:27
"scontrol show node" in python
#!/usr/bin/python
"""
scontrol-show-node - python equivalent to `scontrol show node`.
It also takes an optional node as an argument.
"""
import sys
from datetime import datetime
from operator import itemgetter
@giovtorres
giovtorres / slurm_core_states.py
Last active July 30, 2020 00:21
Collectd Python plugin to get Slurm's core allocation by state
#!/usr/bin/python
# vim: set ts=4 sw=4 et
"""
slurm_core_states.py - A read plugin that will dispatch the core cpu states
returned by the Slurm sinfo command.
"""
import collectd
import signal