Home

zhangyiqun

Thoughts, stories and ideas.

2014年以前 About Feed

02 Apr 2009
图形化vmstat

I don’t know if it is because of my science background, I am a physicist, I do like graphs, especially when I do performance tuning. With UNIX like operating systems, the vmstat command give you an easy way to grab many essential performance counters but, generating graphs from vmstat output with tools like OpenOffice Calc is time consuming and not very efficient. In order to solve this, I wrote a few scripts using gnuplot but they are not very easy to work with. Then, doing some benchmarks with DBT2, I found the vmplot.sh script and… I like that one. I just hacked it little bit to make it keeps the graph on screen, adding the “-persist” parameters to the gnuplot invocations. The script will produce 7 graphs that will be displayed on screen and save in png format in /tmp. The graphs it produces are the following:

  • CPU: graphs idle, user, sys and wait time
  • CS: graphs the context switches/s
  • IN: graphs the interrupts/s
  • IO: graphs the block read and written to disk per second
  • Memory: graphs the memory usage (swapped, free, buffers, cache)
  • Procs: graphs the number of running and blocked processes
  • Swap: graphs swap in and swap out activity

For the interested ones, my version of vmplot script is available here.

原文链接:http://www.bigdbahead.com/?p=302


zhangyiqun

scribble

2014年以前 About Feed