I was putting some sparklines at an web app I am designing. I am using the "Sparkline PHP Graphing Library" which is a well written PHP library for generating the famous sparklines created by Edward Tufte. So I was wondering which another advice I could pick up from Master Tufte... I went googling arround for Edward Tufte and a bunch of links came up but, the one which most called my attention was a Tufte-inspired LaTeX class for producing handouts, papers, and books. The samples provided by the web site are really well designed.
In my post " Plotting memory usage on console " the chart doesn't pan the data. Now, using a named pipe, the effect got a little bit nicer. First, we have to run the memUsage.sh script to get a file filled with memory usage info: ./memUsage.sh > memUsage.dat & Then we have to create a named pipe: mkfifo pipe Now we have to run another process to tail only the last 64 lines from the memUsage.dat while [ 1 ]; do tail -64 memUsage.dat> pipe; done & And now we just have to plot the data from the pipe: watch -n 1 'gnuplot -e "set terminal dumb;p \"pipe\" with lines"' And that is it!
Comments
Post a Comment