Skip to main content

Plotting memory usage on console

This is just a simple hack to play around with gnuplot set to dumb terminal (character console), doesn't meant to be serious application.
First I had written a bash scritp to log memory usage a while ago:


So, while running this script in background (./memUsage.sh > memUsage.dat &), logging the data, the memory usage information can be plotted with gnuplot and watched in real time:
watch -n 1 'gnuplot -e "set terminal dumb;p \"memUsage.dat\" with impulses"'

The chart can be plotted with lines, with impulses or any gnuplot style option.


Comments