VSIZE is in kilobytes.
Yes, %MEM is percentage of the system memory.
The whole script for recording memory usage is from here: http://stackoverflow.com/questions/7998302/graphing-a-processs-memory-usage 285