Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
actually it looks like your swap is not in use, therefore I think it is ok. Probably the config of the alarm is not ok, or not similar to the others...
actually it looks like your swap is not in use, therefore I think it is ok. Probably the config of the alarm is not ok, or not similar to the others...
Here my configuration to monitor the server memory. I check if the memory reach 90% of its total memory it will be critical.
Maybe you are facing a memory leak in kernel space. You won't see anything with "free" in that case. Can you check these files :
# cat /proc/meminfo
# cat /proc/slabinfo
also here a few usefull commands which can help you (for debian) :
user space usage :
# ps -e o rsz,vsz,pid,command --sort -rsz
that sounds good, however you only dropped the caches... I fear that your problem may occur again in the future.
/proc/meminfo shows a lot amount of caches but it's not an issue. I suggest that you monitor the /proc/slabinfo file if the problem occures again.
Yes, it actually happen again after 9 to 12 hour later. I really tried command "cat /proc/slabinfo" but i really can not understand the out put of this command. what information that i can get from this command. and could you tell me any solution that i can fix this problem permanently?
Well I think that you should monitor the evolution of /proc/meminfo (and drop the caches when the system becomes unsafe). This can be done with a simple loop like that for example :
# mkdir /root/tmp
# while true; do cp /proc/meminfo /root/tmp/meminfo.`date +%Y%m%d%H%M`; sleep 3600; done
After a while, you can try to find out which part of the memory is concerned. For exemple for Slab cache :
# grep Slab root/tmp/meminfo.*
you can "export" the result to excel or something like that to check the evolution, that can give you a first clue.
If the part of memory is the cache, then you should have a look at the slab cache because it can help you to find out which process is leaking.
You can monitor the amount of memory allocated inside the cache like that :
# cat /proc/slabinfo | awk -F" " '{printf "$1 : %10.0f\n", ($3*$4) }'
use this to drop the process which are not using any memory :
# cat /proc/slabinfo | awk -F" " '{printf $1" : %10.0f\n", ($3*$4) }' | grep -ve " 0$"
after that, you can create the same kind of loop to monitor the slab cache :
# while true; do cat /proc/slabinfo | awk -F" " '{printf $1" : %10.0f\n", ($3*$4) }' | grep -ve " 0$" > /root/tmp/slab.`date +%Y%m%d%H%M` ; sleep 3600; done
and chech the evolution of the process. cred_jar for example :
# grep cred_jar root/tmp/slab.*
Based on what you will find, you may be able to google about a memory leak in that process...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.