Home > bsd > FreeBSD View Memory Usage

FreeBSD View Memory Usage

Get memory from dmesg:

[root@freebitch10 /]# dmesg | grep memory
real memory = 134152192 (127 MB)
avail memory = 102039552 (97 MB)

To see swap memory only

[root@freebitch10 /]# swapinfo
Device          1K-blocks     Used    Avail Capacity
/dev/ada0p3        314368    13052   301316     4%

Total physical memory in the system (with sysctl):

[root@freebitch10 /]# sysctl hw.physmem
hw.physmem: 110563328

Another way is to use top command

[root@freebitch10 /]# top -n | grep Mem
Mem: 3704K Active, 35M Inact, 41M Wired, 940K Cache, 20M Buf, 20M Free

Just to see free memory

[root@freebitch10 /]# top -d 1|grep '^Mem:'|cut -d ',' -f 6
 20M Free

You can also install sysinfo (utility used to gather system configuration information)

[root@freebitch10 /]# pkg install sysinfo
Updating FreeBSD repository catalogue...
FreeBSD repository is up-to-date.
All repositories are up-to-date.
The following 1 packages will be affected (of 0 checked):

New packages to be INSTALLED:
	sysinfo: 1.0.1_2

The process will require 39 KB more space.
16 KB to be downloaded.

Proceed with this action? [y/N]: y
Fetching sysinfo-1.0.1_2.txz: 100%   16 KB  16.7k/s    00:01    
Checking integrity... done (0 conflicting)
[1/1] Installing sysinfo-1.0.1_2: 100%

And get the memory information:

[root@freebitch10 /]# sysinfo mem
Generated by SysInfo v1.0.1 by Daniel Gerzo

RAM information

Memory information from dmidecode(8)
WARNING: You will need to install the sysutils/dmidecode port in order to obtain this information.

System memory summary
Total real memory available:	105 MB
Logically used memory:		51 MB
Logically available memory:	53 MB

Swap information
Device          1K-blocks     Used    Avail Capacity
/dev/ada0p3        314368      13M     294M     4%

Or install freecolor ( like Linux free command )

[root@freebitch10 /]# pkg install freecolor
Updating FreeBSD repository catalogue...
FreeBSD repository is up-to-date.
All repositories are up-to-date.
The following 2 packages will be affected (of 0 checked):

New packages to be INSTALLED:
	freecolor: 0.9.2_1
	libstatgrab: 0.91

The process will require 549 KB more space.
118 KB to be downloaded.

Proceed with this action? [y/N]: y
Fetching freecolor-0.9.2_1.txz: 100%    5 KB   5.3k/s    00:01    
Fetching libstatgrab-0.91.txz: 100%  113 KB 115.7k/s    00:01    
Checking integrity... done (0 conflicting)
[1/2] Installing libstatgrab-0.91: 100%
[2/2] Installing freecolor-0.9.2_1: 100%

To view memory information in text mode

[root@freebitch10 /]# freecolor -t -m -o
             total       used       free     shared    buffers     cached
Mem:           101         45         56          0          0          0
Swap:          307         12        294
Total:         408 = (      57 (used) +      351 (free))

To view memory information in graphical mode

[root@freebitch10 /]# freecolor -t -m
Physical  : [###################................] 56%	(57/101)
Swap      : [#################################..] 95%	(294/307)
Total     : [##############################%%%%%] (408=351+56)
Advertisements
  1. No comments yet.
  1. No trackbacks yet.

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

%d bloggers like this: