freebsd可几种查看内存整体使用率的方法,但都不够简洁。本文给出使用使用sh文件查看的方法:
curl如未安装的话请先安装curl。安装后下载freebsd-memory.sh
$ curl -O https://raw.githubusercontent.com/ocochard/myscripts/master/FreeBSD/freebsd-memory.sh
然后运行该sh文件即可:
$ sh freebsd-memory.sh
查看到的信息如下
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
- ➊ 已用内存
- ➋ 可用内存
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。