3 Commits
0.5 ... 1.01

Author SHA1 Message Date
939da6f3dc fixed Tmax bug. 2026-05-21 12:22:55 +00:00
3d68686a96 fio uses all cores of the system. 2026-02-27 09:14:32 +01:00
dcd6806e72 updated inline help
added check if gnuplot is installed correctly.
2026-02-06 07:13:36 +01:00
3 changed files with 29 additions and 12 deletions

View File

@@ -1,28 +1,47 @@
#!/bin/bash
VERSION="1.00"
usage() {
local name=${0##*/}
cat <<-EOF
Usage: ${name} [-h || --help] <logfile> <outfile> <title>
Version: ${VERSION}
Usage: ${name}
-h, --help display this help
-l, --logfile <logfile> logfile with temperature data to be plotted
-o, --output <output.png> output file the plotted chart should be written to
-c, --color <colorname> color in which the ghraph should be plotted ('red','blue'dtc.) defaults to 'red'
-t, --title <title> title of the graph
-v, --verbose verbose mode (not implemented yet)
Generates graph of the <logfile> and writes it to <outfile>
Plots the graph of the <logfile> and writes it to <outfile>
<logfile> must contain
timestamp temperature
in seperate lines
EOF
}
check() {
if ! command -v gnuplot >/dev/null 2>&1; then
echo "gnuplot is not installed."
echo "Please use"
echo " sudo apt install -y gnuplot"
echo "and try again"
exit 5
fi
}
verbose=false
COLOR='red'
PADDING=5
PADDING=0
VALID_ARGS=$(getopt -o vho:c:t:l: --long verbose,help,output,color:,title:,logfile: -- "$@")
if [[ $? -ne 0 ]]; then
exit 1;
fi
echo "VALID_ARGS=${VALID_ARGS}"
eval set -- "$VALID_ARGS"
while [ : ]; do
# echo "aktueller Parameter: ${1}"
case "$1" in
-h | --help)
usage
@@ -35,19 +54,15 @@ while [ : ]; do
shift 2
;;
-o | --output)
echo "1: ${1}, 2:${2},3:${3}"
OUTFILE="${2}"
echo "OUTFILE=${OUTFILE}"
shift 2
;;
-c | --color)
COLOR="${2}"
echo "COLOR=${COLOR}"
shift 2
;;
-t | --title)
TITLE="${2}"
echo "TITLE=${TITLE}"
shift 2
;;
-v | --verbose)
@@ -59,7 +74,7 @@ while [ : ]; do
;;
esac
done
check
#determine max and min values
read YMIN YMAX < <(
awk '

View File

@@ -1,5 +1,7 @@
export FIO_NUMJOBS=$(nproc)
measure_temp.sh > ${1} &
TPID=$!
fio ~/git/pistress/fio/fio_cpu
kill $TPID > /dev/null
unset FIO_NUMJOBS

View File

@@ -5,7 +5,7 @@ cpuchunks=100000
runtime=3600
time_based
group_reporting
numjobs=4
numjobs=${FIO_NUMJOBS}
[cpu-stress]