# free command



## ccc (May 11, 2010)

*H*i.

How to get free command working from the command line (Konsole) like on linux under FreeBSD 7.3?


----------



## wblock@ (May 11, 2010)

Maybe `# top -d1 | grep Mem:`

After that, http://www.freebsd.org/doc/en/books/faq/misc.html#TOP-FREEMEM may answer the standard followup question.


----------



## aragon (May 11, 2010)

There's also sysctl(8).  Variables of possible interest:


```
vm.stats.vm.v_free_count
vm.stats.vm.v_active_count
vm.stats.vm.v_inactive_count
vm.stats.vm.v_page_size
```

The values of v_*_count need to be multiplied by v_page_size to get bytes.


----------



## sixtydoses (May 11, 2010)

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


----------



## ccc (Jun 28, 2012)

For a root user just add this line in ~/.cshrc:
	
	



```
alias free      freecolor
```
but I still cannot find out, how it should work for a normal non-root user.


----------

