View Single Post
  #1   (View Single Post)  
Old 17th November 2008
unixdude unixdude is offline
Real Name: Raul Ruiz, Jr.
New User
 
Join Date: Jun 2008
Location: Southern California
Posts: 6
Smile "free" command/perl script for freebsd

I have a lot of friends who started out learning about unix concepts using linux. And many of them are now migrating over to freeBSD. They are used to the "free" command to look up ram/memory usage. I found a perl script written for freebsd that sort of mimics this command. I normally just use "top", "sysctl" or "vmstat" command myself. However, this is a pretty cool little perl script and might be handy in someones BSD toolbox out there. Here is the link.

http://www.cyberciti.biz/faq/freebsd...m-information/

Have fun!

Here is what the output looks like on my computer running freeBSD-7.1 prelease using this perl script.


[unixdude@ ~]$ free
SYSTEM MEMORY INFORMATION:
mem_wire: 16265216 ( 15MB) [ 2%] Wired: disabled for paging out
mem_active: + 8024064 ( 7MB) [ 1%] Active: recently referenced
mem_inactive:+ 6471680 ( 6MB) [ 0%] Inactive: recently not referenced
mem_cache: + 16384 ( 0MB) [ 0%] Cached: almost avail. for allocation
mem_free: + 746426368 ( 711MB) [ 95%] Free: fully available for allocation
mem_gap_vm: + 331776 ( 0MB) [ 0%] Memory gap: UNKNOWN
-------------- ------------ ----------- ------
mem_all: = 777535488 ( 741MB) [100%] Total real memory managed
mem_gap_sys: + 14438400 ( 13MB) Memory gap: Kernel?!
-------------- ------------ -----------
mem_phys: = 791973888 ( 755MB) Total real memory available
mem_gap_hw: + 13332480 ( 12MB) Memory gap: Segment Mappings?!
-------------- ------------ -----------
mem_hw: = 805306368 ( 768MB) Total real memory installed

SYSTEM MEMORY SUMMARY:
mem_used: 52391936 ( 49MB) [ 6%] Logically used memory
mem_avail: + 752914432 ( 718MB) [ 93%] Logically available memory
-------------- ------------ ----------- ------
mem_total: = 805306368 ( 768MB) [100%] Logically total memory

Last edited by unixdude; 18th November 2008 at 09:14 AM.
Reply With Quote