Linux 了解vmstat内存利用率的输出
我有一个solaris盒子,我想知道它是否内存不足或者是否稳定 下面是vmstat的输出Linux 了解vmstat内存利用率的输出,linux,oracle,unix,solaris,solaris-10,Linux,Oracle,Unix,Solaris,Solaris 10,我有一个solaris盒子,我想知道它是否内存不足或者是否稳定 下面是vmstat的输出 kthr memory page disk faults cpu r b w swap free re mf pi po fr de sr vc vc vc vc in sy cs us sy id 1 0 0 11426696 4603520 613 1477 449 6 6 0 0 78 22
kthr memory page disk faults cpu
r b w swap free re mf pi po fr de sr vc vc vc vc in sy cs us sy id
1 0 0 11426696 4603520 613 1477 449 6 6 0 0 78 22 28 29 8970 37714 22961 43 6 51
4 0 0 4975280 0 1747 3487 805 0 0 0 0 233 41 33 44 9558 53713 15845 74 8 18
4 0 0 4936944 0 933 1837 0 0 0 0 0 56 28 12 39 9317 46898 14648 82 7 11
5 0 0 4943080 0 1056 2806 805 0 0 0 0 103 21 18 18 9286 46900 14866 78 8 14
5 0 0 4942264 0 1088 2173 804 6 6 0 0 109 8 40 31 9927 56484 16495 84 8 8
3 0 0 4942520 0 308 1018 1756 3 3 0 0 166 87 29 44 10638 64146 21413 83 9 8
0 0 0 4942512 0 156 326 1740 0 0 0 0 370 12 33 52 11554 40375 21897 75 9 16
2 0 0 4947384 0 294 560 845 0 0 0 0 121 18 23 20 9445 52382 17016 77 6 17
我可以看到自由列显示0,但是sr列也显示0
top命令的输出不会显示可用内存的多少。掉期显示0.0%
load averages: 11.4, 9.12, 9.24;
9021 processes: 9018 sleeping, 1 running, 2 on cpu
CPU states: 0.0% idle, 71.4% user, 28.6% kernel, 0.0% iowait, 0.0% swap
Memory: 24G phys mem, 16G total swap, 13G free swap
我的内存快用完了吗?
请建议如何解释这些数据。我需要增加我的物理记忆吗
欣赏一些见解。这会对您有所帮助。这些短裤是有原因的
记忆
swpd: the amount of virtual memory used. In other words, how much memory has been swapped out.,
free: the amount of idle (currently unused) memory.
buff: the amount of memory used as buffers.
cache: the amount of memory used as cache.
交换
木卫一
系统
in: The number of interrupts per second, including the clock.
cs: The number of context switches per second. A context switch is when the kernel swaps from system mode processing into user mode processing.
从中,有一件重要的事情需要注意:
如果没有选项,vmstat
显示自系统启动以来虚拟内存活动的单行摘要
这也适用于Solarisvmstat
的第一行输出:它是自系统启动以来所有活动的摘要
有关输出字段的详细说明,请参见Solarisman vmstat
页面的示例部分:
示例
示例1使用vmstat
以下命令显示系统正在执行的操作的摘要
每五秒钟
示例%vmstat 5
kthr memory page disk faults cpu
r b w swap free re mf pi p fr de sr s0 s1 s2 s3 in sy cs us sy id
0 0 0 11456 4120 1 41 19 1 3 0 2 0 4 0 0 48 112 130 4 14 82
0 0 1 10132 4280 0 4 44 0 0 0 0 0 23 0 0 211 230 144 3 35 62
0 0 1 10132 4616 0 0 20 0 0 0 0 0 19 0 0 150 172 146 3 33 64
0 0 1 10132 5292 0 0 9 0 0 0 0 0 21 0 0 165 105 130 1 21 78
1 1 1 10132 5496 0 0 5 0 0 0 0 0 23 0 0 183 92 134 1 20 79
1 0 1 10132 5564 0 0 25 0 0 0 0 0 18 0 0 131 231 116 4 34 62
1 0 1 10124 5412 0 0 37 0 0 0 0 0 22 0 0 166 179 118 1 33 67
1 0 1 10124 5236 0 0 24 0 0 0 0 0 14 0 0 109 243 113 4 56 39
示例%
vmstat显示的字段是
kthr
报告以下三个线程中每个线程的内核线程数
国家:
内存
报告虚拟内存和真实内存的使用情况
swap
available swap space (Kbytes)
free
size of the free list (Kbytes)
页面
报告有关页面错误和分页活动的信息。这个
以下每项活动的信息以单位为单位
第二
在区域中执行时,如果池设施处于活动状态,则所有
上述(de除外)仅报告中处理器上的活动
区域池的处理器集
磁盘
报告每秒的磁盘操作数。有两个插槽可供选择
最多四个磁盘,标有一个字母和数字。信
指示磁盘的类型(s=SCSI、i=IPI等);这个
number是逻辑单元号
故障
报告陷阱/中断速率(每秒)
在区域中执行时,如果池设施处于活动状态,则所有
以上仅报告处理器集中处理器上的活动
这个区域的游泳池
cpu
给出CPU时间使用百分比的明细。在MP系统上,这个
是所有处理器的平均值
us
user time
sy
system time
id
idle time
在区域中执行时,如果池设施处于活动状态,则所有
以上仅报告处理器集中处理器上的活动
这个区域的游泳池
“0”不是有效的可用内存值
根据设计,Solaris始终确保可用的可用内存量最小。sr
列也等于零,这表明没有内存不足。在任何情况下,在内存极度短缺的情况下,您都无法运行vmstat
或top
您应该进一步调查,以了解空闲内存报告为零的原因mdb
的::memstat
命令将是一个良好的开端:
# echo "::memstat" | mdb -k
swap
available swap space (Kbytes)
free
size of the free list (Kbytes)
re
page reclaims — but see the –S option for how this field is modified.
mf
minor faults — but see the –S option for how this field is modified.
pi
kilobytes paged in
po
kilobytes paged out
fr
kilobytes freed
de
anticipated short-term memory shortfall (Kbytes)
sr
pages scanned by clock algorithm
in
interrupts
sy
system calls
cs
CPU context switches
us
user time
sy
system time
id
idle time
# echo "::memstat" | mdb -k