“free” command to determine ram/memory usage in FreeBSD

People moving from Linux to FreeBSD get confused when they need to determine ram/memory usage. Although there is no equivalent command, there is a nice perl script located at http://people.freebsd.org/~rse/dist/freebsd-memory. Just download and run the perl script, and it gives a formatted output of your memory status. Something like:

# fetch http://people.freebsd.org/~rse/dist/freebsd-memory
# perl freebsd-memory

In case  you need to mimic the linux command, simply set the execution bit and move it to bin.

# fetch -o /usr/local/bin/free http://people.freebsd.org/~rse/dist/freebsd-memory
# chmod +x /usr/local/bin/free

You should now be able to use “free” command without any problems from anywhere within your system.

Amitabh Kant

Advertisements