Difference between revisions of "Gnuplot"

From Linuxintro
imported>ThorstenStaerk
imported>ThorstenStaerk
Line 2: Line 2:
  
 
  vmstat 1 10 | grep -v r > vmstat.txt
 
  vmstat 1 10 | grep -v r > vmstat.txt
  gnuplot -p -e "plot 'vmstat.txt' using 4 title 'free mem' with lines, 'vmstat.txt' using 5 title 'buffers' with lines, 'vmstat.txt' using 6 title 'caches' with lines"
+
  gnuplot -p -e "plot 'vmstat.txt' using 13 title 'CPU user load' with lines, 'vmstat.txt' using 14 title 'CPU system load' with lines, 'vmstat.txt' using 15 title 'CPU idle time' with lines, 'vmstat.txt' using 16 title 'CPU IO wait time' with lines"
 +
 
 +
The result will look like this:
 +
{{Image:Snapshot-gnuplot.png}}

Revision as of 12:37, 11 December 2010

Here is an example how to visualize vmstat's output using gnuplot.

vmstat 1 10 | grep -v r > vmstat.txt
gnuplot -p -e "plot 'vmstat.txt' using 13 title 'CPU user load' with lines, 'vmstat.txt' using 14 title 'CPU system load' with lines, 'vmstat.txt' using 15 title 'CPU idle time' with lines, 'vmstat.txt' using 16 title 'CPU IO wait time' with lines"

The result will look like this: