freebsd check memory

Posted: December 5, 2009 in Freebsd

If you wanna check memory in freebsd use this script.

download from my server or original server

fetch http://bsd.mynux.net/freebsd-memory.pl.txt

or

fetch http://www.cyberciti.biz/files/scripts/freebsd-memory.pl.txt

mv freebsd-memory.pl.txt /usr/local/bin/free

chmod +x /usr/local/bin/free

than issued this command

free

you will see this output

[root@bsd /skrip]# free
SYSTEM MEMORY INFORMATION:
mem_wire:         133365760 (    127MB) [ 12%] Wired: disabled for paging out
mem_active:  +     54943744 (     52MB) [  5%] Active: recently referenced
mem_inactive:+    558706688 (    532MB) [ 53%] Inactive: recently not referenced
mem_cache:   +      6766592 (      6MB) [  0%] Cached: almost avail. for allocation
mem_free:    +    286863360 (    273MB) [ 27%] Free: fully available for allocation
mem_gap_vm:  +       708608 (      0MB) [  0%] Memory gap: UNKNOWN
————– ———— ———– ——
mem_all:     =   1041354752 (    993MB) [100%] Total real memory managed
mem_gap_sys: +     19181568 (     18MB)        Memory gap: Kernel?!
————– ———— ———–
mem_phys:    =   1060536320 (   1011MB)        Total real memory available
mem_gap_hw:  +     13205504 (     12MB)        Memory gap: Segment Mappings?!
————– ———— ———–
mem_hw:      =   1073741824 (   1024MB)        Total real memory installed

SYSTEM MEMORY SUMMARY:
mem_used:         221405184 (    211MB) [ 20%] Logically used memory
mem_avail:   +    852336640 (    812MB) [ 79%] Logically available memory
————– ———— ———– ——
mem_total:   =   1073741824 (   1024MB) [100%] Logically total memory

Other way is using Linux Style

# cd /usr/ports/sysutils/freecolor
# make install clean

To see memory details, enter:
$ freecolor -m -o

Sample output:

total       used       free     shared    buffers     cached
Mem:          4082        825       3256          0          0        117
Swap:         2048          0       2047

$ freecolor -t -m -o

Sample output:

total       used       free     shared    buffers     cached
Mem:          4082        825       3256          0          0        117
Swap:         2048          0       2047
Total:        6130 = (     826 (used) +     5421 (free))

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s