Last active
September 30, 2019 06:22
-
-
Save shortcord/8fa78c24377cf4a2b27cb746ad6199eb to your computer and use it in GitHub Desktop.
Dirty script. Grabs the power consumption average from IPMI, shoves it through JQ and gives back an array of objects prefixed by the measurement label.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!#/bin/sh | |
ipmi-oem dell get-power-consumption-statistics average | awk -F":" '{gsub (" ", "", $0); print}' | jq --slurp --compact-output --raw-input 'split("\n") | map(select(. !="") | split(":") | { (.[0]): (.[1]) })' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment