Skip to content

Example wesplot pipelines

Shuhao Wu edited this page Apr 13, 2023 · 16 revisions

CPU Package temperature with sensors

{ 
  while true; do 
    sensors | grep -oP 'Package.*?\+\K[0-9.]+'
    sleep 1
  done 
} | wesplot -t "CPU package temp" -u "°C" -m 20 -M 120

All core frequency plots (shows off awk merging multiple lines into a single line)

{ 
  while true; do 
    cat /proc/cpuinfo | \ 
      grep "MHz" | \
      awk -F: '{ print $2 }' | \
      awk '{line=line " " $0} NR%16==0{print substr(line,2); line=""; fflush(); }'
    sleep 1
  done 
} | wesplot -t "CPU Freq" -c CPU0 -c CPU1 -c CPU2 -c CPU3 -c CPU4 -c CPU5 -c CPU6 -c CPU7 -c CPU8 -c CPU9 -c CPU10 -c CPU11 -c CPU12 -c CPU13 -c CPU14 -c CPU15 -u MHz

Clone this wiki locally