linux – 免费报告虚假交换使用量

免费报告的交换使用非常高.
[root@rhel6 ~]# free -m
             total       used       free     shared    buffers     cached
Mem:          9892       9537        354          0         71        884
-/+ buffers/cache:       8581       1310 
Swap:          767 1759218592     116869

就像,非常高.

[root@bb14 blackboard]# free -g|grep Swap
Swap:            0 1717986906        114

或者是吗?

[root@bb14 blackboard]# free -h |grep Swap
Swap:         767M       767M       114G

更奇怪的是,即使我禁用交换数量仍然保持高位.

[root@rhel6 ~]# swapoff -a
[root@rhel6 ~]# free -m
             total       used       free     shared    buffers     cached
Mem:          9892       9760        131          0         45        638
-/+ buffers/cache:       9076        815 
Swap:            0 1759218592     116814

检查meminfo时,事情不会变得混乱,这表明swapfree高于swaptotal.

[root@rhel6 ~]# cat /proc/meminfo|grep Swap
SwapCached:            0 kB
SwapTotal:        786428 kB
SwapFree:       120404008 kB

显然有些东西是不稳定的,我的第一直觉是重新启动,但这是一台生产机器,这意味着维护窗口等,我想知道是否有任何方法可以找出问题所在,甚至可以在没有停机的情况下修复它.

解决方法

解决方案是升级到kernel-2.6.32-573.7.1.el6或更高版本.

只需简单的yum更新和重新启动即可.

以下是kernel-2.6.32-573.1.1.el6.x86_64的错误报告的引用,该报告导致Swap free大于交换总数:

A prevIoUs change in the get_swap_page() locking removed the use of the swap_lock spinlock. This Could cause nr_swap_pages corruption and invalid SwapFree information in the /proc/meminfo file,where the size of SwapFree Could exceed the size of SwapTotal. This update uses an atomic variable for nr_swap_pages,and the size of SwapFree in /proc/meminfo is Now correct. (BZ#1259362)

相关文章

Linux中的ARP防火墙主要用于防御ARP欺骗攻击,其效果取决于多...
insmod和modprobe加-f参数导致Invalid module format错误 这...
将ArchLinux安装到U盘 几个月前入门Arch的时候上网搜了不少安...
1、安装Apache。 1)执行如下命令,安装Apache服务及其扩展包...
一、先说一下用ansible批量采集机器信息的实现办法: 1、先把...
安装配置 1. 安装vsftpd 检查是否安装了vsftpd # rpm -qa | ...