Performance Visualization with Gnuplot, continued

After I post my command to commandlinefu.com, there is an alternative command followed:
(echo “set terminal png;plot ‘-’ u 1:2 t ‘cpu’ w linespoints;”; sudo vmstat 2 10 | awk ‘NR > 2 {print NR, $13}’) | gnuplot > plot.png

This one is appreciated for using pipes and redirection. It works on Ubuntu Jaunty, on which, gnuplot doesn’t provide a -e option. The author also showed an link to an open source project ‘vmplot’ on freshmeat. Vmplot is written in python, which combines parameters with scripts and end up with an os.system call. Grab the source from here. (Why use python instead on a simple bash command? because it’s difficult to draw a multiplot without temp file or variables, you cannot read ‘-’ twice.)

There are several people vote me down for my command! It must be primers whose use ubuntu and knows the world via Synaptic only, because they failed to run the command on their dated machine (*_*)

This entry was written by Sunng , posted on Thursday September 24 2009at 09:09 pm , filed under 装备 and tagged , , , , . Bookmark the permalink . Post a comment below or leave a trackback: Trackback URL.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word