近半个月,公司有一台服务器,内存居高不下,从刚开始的15%到后来,一直上升到了65%
程上升趋势,查看进程也没有什么进程占用大量内存,top命令只能看到进程占用到20%左右,可是用free –m时内存占用缺到了6000MB,一共是8GB的内存,占用了N
执行俩个命令就搞定了
这个是在另一台机器上的结果
[root@mail mnt]# free -m<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

             total       used       free     shared    buffers     cached

Mem:          3656    3635         20       0        226       2083

-/+ buffers/cache:       1325       2330

Swap:         1983          0       1983

[root@mail mnt]# sync

 

[root@mail mnt]# echo "3" > /proc/sys/vm/drop_caches

 

[root@mail mnt]# free -m

             total       used       free     shared    buffers     cached

Mem:          3656     1213       2442     0          0         41

-/+ buffers/cache:       1171       2484

Swap:         1983          0       1983

[root@mail mnt]#