linux_cli_live_plot_using_gnuplot

no way to compare when less than two revisions

Differences

This shows you the differences between two versions of the page.


linux_cli_live_plot_using_gnuplot [08.05.2020 19:29] (current) – created Pascal Suter
Line 1: Line 1:
 +====== linux cli live plot using gnuplot ======
 +thanks to [[http://hxcaine.com/blog/2013/02/28/running-gnuplot-as-a-live-graph-with-automatic-updates/|Horation Caine]] for the essentials... 
 +
 +write data to ''plot.dat'' .. for example graph nvidia-smi delivered GPU temperature of a Tesla card: 
 +  while true; do echo -e "$(<plot.dat)\n##\t$(nvidia-smi | grep -A1 Tesla | tail -1 | awk '{print $3}' | tr -d C)" | tail -n 60 | awk '{print NR "\t" $2}' > plot.new && mv -f plot.new plot.dat && cat plot.dat; sleep 1; done
 +
 +gnuplot script to display update a graph on the command line every second, save this to 
 +<code>
 +set yrange [60:85]
 +set xrange [1:60]
 +set terminal dumb
 +plot "plot.dat" using 1:2 with lines
 +pause 1
 +reread
 +</code>
 +
 +run the plot: 
 +   gnuplot liveplot.gnu
 +
  
  • linux_cli_live_plot_using_gnuplot.txt
  • Last modified: 08.05.2020 19:29
  • by Pascal Suter