freebsd可幾種查看內存總體使用率的方法,但都不夠簡潔。本文給出使用使用sh文件查看的方法:git
curl如未安裝的話請先安裝curl。安裝後下載freebsd-memory.shgithub
$ curl -O https://raw.githubusercontent.com/ocochard/myscripts/master/FreeBSD/freebsd-memory.sh
而後運行該sh文件便可:app
$ sh freebsd-memory.sh
查看到的信息以下curl
SYSTEM MEMORY INFORMATION: mem_wire: 1113022464 ( 1061MB) [ 27%] Wired: disabled for paging out mem_active: + 508321792 ( 484MB) [ 12%] Active: recently referenced mem_inactive:+ 219136000 ( 208MB) [ 5%] Inactive: recently not referenced mem_cache: + 0 ( 0MB) [ 0%] Cached: almost avail. for allocation mem_free: + 482025472 ( 459MB) [ 11%] Free: fully available for allocation mem_gap_vm: + 1794072576 ( 1710MB) [ 43%] Memory gap: UNKNOWN ______________ ____________ ___________ ______ mem_all: = 4116578304 ( 3925MB) [100%] Total real memory managed mem_gap_sys: + 137998336 ( 131MB) Memory gap: Kernel?! ______________ ____________ ___________ mem_phys: = 4254576640 ( 4057MB) Total real memory available mem_gap_hw: + 40390656 ( 38MB) Memory gap: Segment Mappings?! ______________ ____________ ___________ mem_hw: = 4294967296 ( 4096MB) Total real memory installed SYSTEM MEMORY SUMMARY: mem_used➊: 3593805824 ( 3427MB) [ 83%] Logically used memory mem_avail➋: + 701161472 ( 668MB) [ 16%] Logically available memory ______________ ____________ __________ _______ mem_total: = 4294967296 ( 4096MB) [100%] Logically total memory