加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Linux > 正文

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

发布时间:2020-12-14 02:29:10 所属栏目:Linux 来源:网络整理
导读:免费报告的交换使用非常高. [root@rhel6 ~]# free -m total used free shared buffers cachedMem: 9892 9537 354 0 71 884-/+ buffers/cache: 8581 1310 Swap: 767 1759218592 116869 就像,非常高. [root@bb14 blackboard]# free -g|grep SwapSwap: 0 171798
免费报告的交换使用非常高.
[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)

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读