>perl -e 'use Sys::MemInfo qw(totalmem);print "total memory: ".(&totalmem / 1024 / 1024 / 1024)."\n";' total memory: 3.99408721923828 >system_profiler | grep " Memory:" Memory: 16 GB