I am running centos 5.8 with cpanel.
Lately I am getting reports that my swap is full , but there is a lot of free memory to use.
top - 10:33:43 up 133 days, 17:00, 1 user, load average: 0.05, 0.03, 0.05
Tasks: 170 total, 1 running, 169 sleeping, 0 stopped, 0 zombie
Cpu(s): 2.1%us, 0.5%sy, 0.0%ni, 97.2%id, 0.0%wa, 0.0%hi, 0.2%si, 0.0%st
Mem: 24726100k total, 8255368k used,
The following three outputs were taken essentially simultaneously:
top:
top - 02:54:36 up 2 days, 13:50, 3 users, load average: 0.05, 0.05, 0.09
Tasks: 181 total, 1 running, 179 sleeping, 0 stopped, 1 zombie
%Cpu(s): 2.5 us, 0.8 sy, 0.0 ni, 96.6 id, 0.1 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem: 16158632 total, 11234480 used, 4924152 free, 844 buffers
KiB Swap: 16777212 total,
on my linux system I get these stats from top:
Tasks: 155 total, 1 running, 153 sleeping, 0 stopped, 1 zombie
Cpu(s): 1.5%us, 0.3%sy, 0.0%ni, 97.4%id, 0.7%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 8177180k total, 2025504k used, 6151676k free, 44176k buffers
Swap: 7999996k total, 495300k used, 7504696k free, 637612k cached
There it shows me that my system is using 495Mb of swap.
From the looks of the swaps proc;
ubuntu:~$ cat /proc/swaps
Filename Type Size Used Priority
/dev/sdc2 partition 4104188 0 -1
ubuntu:~$
And from top:
ubuntu:~$ top
top - 09:35:37 up 9:07, 9 users, load average: 1.43, 0.80, 1.09
Tasks: 206 total, 3 running, 202 sleeping, 0 stopped, 1 zombie
Cpu(s): 4.4%us, 2.2%sy, 0.0%n
I've read a number of top memory use questions but I don't think they answer this.
Here's the most significant part of a top run:
top - 01:11:41 up 4 days, 1:06, 3 users, load average: 0.00, 0.03, 0.26
Tasks: 86 total, 1 running, 84 sleeping, 0 stopped, 1 zombie
Cpu(s): 0.4%us, 0.4%sy, 0.0%ni, 99.2%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 1022816k total, 986704k used, 361
I have 2 machine.
I'm looking into why our ubuntu web server hung this morning and see that there was some package upgrades a few hours prior to the problem.
Sometimes I find that 100% of my small Debian machine's RAM is used, but I can't figure out how to find this leak: top show that all memory is used, but I can't find any process that consumed this memory in process listing (processes sorted by field 'n' - %MEM):
top - 12:50:41 up 8 days, 1:13, 1 user, load average: 0.06, 0.15, 1.63
Tasks: 101 total, 1 running, 100 sleeping, 0 stopped, 0
I have a VPS and sometimes the CPU usage is high. I type top and everything seems fine. But, I don't really know what all the stuff it gives me means.