showing total/free memory

Rowdy david at fielden.com.au
Wed Jan 28 13:26:09 PST 2004


Matthew Hunt wrote:

> On Thu, Jan 29, 2004 at 08:03:46AM +1100, Rowdy wrote:
> 
> 
>>I am setting up MRTG and at the moment I am parsing /var/run/dmesg.boot 
>>and the output from `top -b -d 1` to get total and free memory 
>>respectively, but I hope there is an easier way.
> 
> 
> Try "vmstat" instead.
> 

Thought of that.  According to the man page, vmstat shows, for memory:

avm     active virtual pages
fre     size of the free list

Does the size of the free list correspond to actual free memory?  I 
wasn't sure whether that was the case or not.

Also, it's a case of parsing the output from top or parsing the output 
from vmstat - I had hoped there would be a simple command that would 
show memory state :)

Dave



More information about the freebsd-questions mailing list