Plot power usage from 'detailed_power" report
This commit is contained in:
parent
cef6b54cc2
commit
2032ccfea8
1 changed files with 47 additions and 0 deletions
47
monitoring/logs/scripts/plot_energy_logs.sh
Executable file
47
monitoring/logs/scripts/plot_energy_logs.sh
Executable file
|
@ -0,0 +1,47 @@
|
|||
#!/bin/bash
|
||||
if [ ! -r $1 ]; then
|
||||
echo "File $1 is not readable. Exiting."
|
||||
exit
|
||||
fi
|
||||
|
||||
fn=$1
|
||||
if [[ $1 == *gz ]]; then
|
||||
fn="<zcat $fn"
|
||||
fi
|
||||
|
||||
#id=$(echo $1 | sed "s/\(.*-pbs5\).*/\1/")
|
||||
# drop leading dirs
|
||||
id=$(echo $1 | rev | cut -d "/" -f1 | rev | sed "s/\(.*-pbs5\).*/\1/")
|
||||
|
||||
ts=""
|
||||
if [[ $# -eq 2 ]]; then
|
||||
ts=$2
|
||||
fi
|
||||
|
||||
gnuplot --persist <<EOF
|
||||
fn = "$fn"
|
||||
ts = "$ts"
|
||||
|
||||
set datafile separator ','
|
||||
|
||||
stats fn u 1 name "time" nooutput
|
||||
tmin=time_min
|
||||
|
||||
set title " Job ID $id
|
||||
set title noenhanced
|
||||
set xlabel "time since jobstart [s]"
|
||||
set ylabel "power [W]"
|
||||
set key left top
|
||||
set grid
|
||||
|
||||
do for [t in ts ] {
|
||||
set arrow from t, graph 0 to t, graph 0.95 nohead
|
||||
set arrow from t-tmin, graph 0 to t-tmin, graph 0.95 nohead
|
||||
}
|
||||
|
||||
plot fn u (\$1-tmin):3 w l lc "red" t "head", "" u (\$1-tmin):(\$4-\$8):(\$4+\$8) w filledcurves lc "skyblue" fs transparent solid 0.5 t "nodes avg+-stddev", "" u (\$1-tmin):5 w l lc "blue" t "nodes median"
|
||||
|
||||
|
||||
EOF
|
||||
|
||||
|
Loading…
Reference in a new issue