Take a measurement via /proc/meminfo and pipe it to a parser AWK script to turn it into a data row:
cat /proc/meminfo | parse-meminfo.awk
Maybe append it to a series of measurements (removing the extra header line from each measurement):
cat /proc/meminfo | parse-meminfo.awk | tail -n +2 | tee --append memory-measurements.csv
Plot measurements as time series:
gnuplot -c plot-memory-measurements.gnuplot memory-measurements.csv | display -