2015-07-22 14 views
-1

我有VMWare安裝CentOS 5.5並部署了一些java應用程序。 我想知道剩下多少內存,因爲我使用下面的命令,所有的內存都被使用。 但是,當我用top命令檢查時,所有進程都使用「0.0%」的內存。 所以我想知道發生了什麼?這個虛擬機有什麼真正的內存使用?CentOS上的內存使用異常

問候, Sathit

[[email protected] ~]# free -t -m 
      total  used  free  shared buffers  cached 
Mem:   16050  15911  139   0  185  15051 
-/+ buffers/cache:  674  15376 
Swap:  49151   0  49151 
Total:  65202  15911  49290 

[[email protected] ~]# cat /proc/meminfo 
MemTotal:  16435972 kB 
MemFree:  142484 kB 
Buffers:  189632 kB 
Cached:  15413188 kB 
SwapCached:   0 kB 
Active:  1095596 kB 
Inactive:  15032400 kB 
HighTotal:   0 kB 
HighFree:   0 kB 
LowTotal:  16435972 kB 
LowFree:  142484 kB 
SwapTotal: 50331604 kB 
SwapFree:  50331604 kB 
Dirty:    48 kB 
Writeback:   0 kB 
AnonPages:  525148 kB 
Mapped:   31580 kB 
Slab:   103152 kB 
PageTables:  8840 kB 
NFS_Unstable:  0 kB 
Bounce:    0 kB 
CommitLimit: 58549588 kB 
Committed_AS: 1138116 kB 
VmallocTotal: 34359738367 kB 
VmallocUsed: 287644 kB 
VmallocChunk: 34359450359 kB 
HugePages_Total:  0 
HugePages_Free:  0 
HugePages_Rsvd:  0 
Hugepagesize:  2048 kB 

top - 10:05:02 up 7 days, 17:36, 2 users, load average: 0.01, 0.03, 0.00 
Tasks: 165 total, 1 running, 164 sleeping, 0 stopped, 0 zombie 
Cpu(s): 0.0%us, 0.0%sy, 0.0%ni,100.0%id, 0.0%wa, 0.0%hi, 0.0%si,  0.0%st 
Mem: 16435972k total, 16293488k used, 142484k free, 189636k buffers 
Swap: 50331604k total,  0k used, 50331604k free, 15413352k cached 

    PID USER  PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND                         
    919 root  10 -5  0 0 0 S 0.3 0.0 0:38.53 kjournald                         
    1 root  15 0 10368 684 572 S 0.0 0.0 0:00.75 init                          
    2 root  RT -5  0 0 0 S 0.0 0.0 0:00.58 migration/0                        
    3 root  34 19  0 0 0 S 0.0 0.0 0:00.00 ksoftirqd/0                        
    4 root  RT -5  0 0 0 S 0.0 0.0 0:00.72 migration/1                        
    5 root  34 19  0 0 0 S 0.0 0.0 0:00.00 ksoftirqd/1                        
    6 root  RT -5  0 0 0 S 0.0 0.0 0:00.43 migration/2                        
    7 root  34 19  0 0 0 S 0.0 0.0 0:00.00 ksoftirqd/2                        
    8 root  RT -5  0 0 0 S 0.0 0.0 0:02.25 migration/3                        
    9 root  34 19  0 0 0 S 0.0 0.0 0:00.00 ksoftirqd/3                        
    10 root  RT -5  0 0 0 S 0.0 0.0 0:00.21 migration/4                        
    11 root  34 19  0 0 0 S 0.0 0.0 0:00.00 ksoftirqd/4                        
    12 root  RT -5  0 0 0 S 0.0 0.0 0:00.83 migration/5                        
    13 root  34 19  0 0 0 S 0.0 0.0 0:00.00 ksoftirqd/5                        
    14 root  RT -5  0 0 0 S 0.0 0.0 0:00.40 migration/6                        
    15 root  34 19  0 0 0 S 0.0 0.0 0:00.00 ksoftirqd/6                        
    16 root  RT -5  0 0 0 S 0.0 0.0 0:00.32 migration/7                        
    17 root  34 19  0 0 0 S 0.0 0.0 0:00.00 ksoftirqd/7                        
    18 root  10 -5  0 0 0 S 0.0 0.0 0:00.21 events/0                         
    19 root  10 -5  0 0 0 S 0.0 0.0 0:00.00 events/1                         
    20 root  10 -5  0 0 0 S 0.0 0.0 0:00.00 events/2                         
    21 root  10 -5  0 0 0 S 0.0 0.0 0:00.00 events/3                         
    22 root  10 -5  0 0 0 S 0.0 0.0 0:00.00 events/4                         
    23 root  10 -5  0 0 0 S 0.0 0.0 0:00.00 events/5                         
    24 root  10 -5  0 0 0 S 0.0 0.0 0:00.00 events/6                         
    25 root  10 -5  0 0 0 S 0.0 0.0 0:00.00 events/7                         
    26 root  10 -5  0 0 0 S 0.0 0.0 0:00.66 khelper  
+1

http://www.linuxatemyram.com/ –

回答

1

,我認爲你的系統問題。你可以重新啓動系統並再次檢查。

對於我的系統:

[[email protected] ~]# cat /proc/meminfo 
MemTotal:  8115536 kB 
MemFree:   7611020 kB 
Buffers:    0 kB 
Cached:   77544 kB 
SwapCached:   0 kB 
Active:   172188 kB 
Inactive:   69860 kB 
Active(anon):  164632 kB 
Inactive(anon):  344 kB 
Active(file):  7556 kB 
Inactive(file): 69516 kB 
Unevictable:   0 kB 
Mlocked:    0 kB 
SwapTotal:    0 kB 
SwapFree:    0 kB 
Dirty:     0 kB 
Writeback:    0 kB 
AnonPages:  164764 kB 
Mapped:    4996 kB 
Shmem:    472 kB 
Slab:    16004 kB 
SReclaimable:  5148 kB 
SUnreclaim:  10856 kB 
KernelStack:  3120 kB 
PageTables:   644 kB 
NFS_Unstable:   0 kB 
Bounce:    0 kB 
WritebackTmp:   0 kB 
CommitLimit:  4057768 kB 
Committed_AS:  701412 kB 
VmallocTotal: 251658176 kB 
VmallocUsed:  34712 kB 
VmallocChunk: 251554396 kB 
AnonHugePages: 159744 kB 
HugePages_Total:  0 
HugePages_Free:  0 
HugePages_Rsvd:  0 
HugePages_Surp:  0 
Hugepagesize:  2048 kB 
[[email protected] ~]# free -t -m 
       total  used  free  shared buff/cache available 
Mem:   7925   401  7432   0   91  7417 
Swap:    0   0   0 
Total:   7925   401  7432 
[[email protected] ~]# 

問候,

HuyLe

+0

我重新啓動它,現在它恢復正常。內存使用量低於1 Gbps。我會繼續關注它。謝謝。 – user2194507