这是 free -m 的输出
total used free shared buffers cached
Mem: 3850 3369 481 2 20 179
-/+ buffers/cache: 3168 681
Swap: 7628 57 7571
显示可用空间为 681MB(含缓存)。
顶部(按内存使用情况排序):
top - 13:30:16 up 10 days, 31 min, 3 users, load average: 0.00, 2.18, 6.54
Tasks: 143 total, 1 running, 142 sleeping, 0 stopped, 0 zombie
%Cpu(s): 0.3 us, 0.3 sy, 0.0 ni, 99.4 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem: 3943132 total, 3449240 used, 493892 free, 21496 buffers
KiB Swap: 7812092 total, 59320 used, 7752772 free. 183972 cached Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
30660 deployer 20 0 170624 31132 4364 S 0.0 0.8 0:00.62 ruby
30583 whoopsie 20 0 335684 3584 2424 S 0.0 0.1 0:00.00 whoopsie
22772 root 20 0 23584 2412 1356 S 0.0 0.1 0:00.12 bash
1 root 20 0 33640 1940 740 S 0.0 0.0 0:03.29 init
30737 root 20 0 25012 1732 1208 R 0.0 0.0 0:00.00 top
20987 deployer 20 0 23668 1272 772 S 0.0 0.0 0:00.11 bash
2267 rabbitmq 20 0 8392 1104 32 S 0.0 0.0 0:06.92 epmd
21397 root 20 0 23484 1092 652 S 0.0 0.0 0:00.08 bash
21365 postfix 20 0 42768 1044 804 S 0.0 0.0 0:00.07 smtpd
猫/proc/meminfo
MemTotal: 3943132 kB
MemFree: 494660 kB
Buffers: 21304 kB
Cached: 183892 kB
SwapCached: 9904 kB
Active: 64912 kB
Inactive: 183804 kB
Active(anon): 34912 kB
Inactive(anon): 10788 kB
Active(file): 30000 kB
Inactive(file): 173016 kB
Unevictable: 0 kB
Mlocked: 0 kB
SwapTotal: 7812092 kB
SwapFree: 7752720 kB
Dirty: 104 kB
Writeback: 0 kB
AnonPages: 37492 kB
Mapped: 10748 kB
Shmem: 2172 kB
Slab: 48140 kB
SReclaimable: 26300 kB
SUnreclaim: 21840 kB
KernelStack: 1224 kB
PageTables: 8040 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 9783656 kB
Committed_AS: 370152 kB
VmallocTotal: 34359738367 kB
VmallocUsed: 347604 kB
VmallocChunk: 34359366292 kB
HardwareCorrupted: 0 kB
AnonHugePages: 0 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 2048 kB
DirectMap4k: 73228 kB
DirectMap2M: 4016128 kB
我尝试终止所有占用大量内存的进程,但仍然显示已使用 3168MB 内存(不包括缓存) - 为什么?这些内存都用在哪儿了?我该如何找出答案?