diff options
| author | Loic Guegan <manzerberdes@gmx.com> | 2019-05-17 09:53:09 +0200 |
|---|---|---|
| committer | Loic Guegan <manzerberdes@gmx.com> | 2019-05-17 09:53:09 +0200 |
| commit | 1ab4a6a97aab850aa496fccc8c26293c57561620 (patch) | |
| tree | c867ea5d77aa7d8da157a8b64093a29cba727cbc /g5k/recordEnergy.sh | |
| parent | 026a84902cdc22f64b53aea3678d576bc29f479b (diff) | |
Debug
Diffstat (limited to 'g5k/recordEnergy.sh')
| -rw-r--r-- | g5k/recordEnergy.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/g5k/recordEnergy.sh b/g5k/recordEnergy.sh index 6a5d864..fc935a1 100644 --- a/g5k/recordEnergy.sh +++ b/g5k/recordEnergy.sh @@ -9,11 +9,12 @@ nodeName="$2" outputFile="$5" wattmeter=$(curl -s https://api.grid5000.fr/stable/sites/lyon/clusters/${clusterName}/nodes/${nodeName}.json | jq -r '.sensors.power.via.pdu[0].uid') port=$(curl -s https://api.grid5000.fr/stable/sites/lyon/pdus/${wattmeter}.json | jq -r '.ports|to_entries|map(select(.value=="'${nodeName}'"))[0].key') -energyEntry=$(expr 5 + $port) # Define the entry in the CSV that correspond to the correct energy value +energyEntry=$(( 5 + port) # Define the entry in the CSV that correspond to the correct energy value if [ -z $wattmeter ] || [ -z $port ] then echo -ne "\nCannot find energy informations (wattmeter/port) for node $nodeName\n" + echo -ne "\nCheck the node name (do not use hostname! only node name ex: nova-7)\n" exit 1 fi |
