Hi
I am new in this forum (a few minutes)! I work for some time on linux (SLES 10.3 and 11) but I am still far away from being a guru!
So my question is:
The nagios’s application run on a server and the memory used is about 96%…
Is 96% normal for a mem used?
Is there a possibility to down that?
I insert two commands :
# free -m
total used free shared buffers cached
Mem: 1877 1813 64 0 356 1015
-/+ buffers/cache: 440 1436
Swap: 10236 0 10236
top - 14:44:55 up 9 days, 4:34, 2 users, load average: 0.16, 0.05, 0.01
Tasks: 167 total, 1 running, 166 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.3%us, 0.2%sy, 0.0%ni, 99.6%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 1922588k total, 1857480k used, 65108k free, 364956k buffers
Swap: 10482372k total, 28k used, 10482344k free, 1040352k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
5134 root 20 0 98520 19m 3928 S 1 1.0 5:49.80 Xorg
8616 <myuser> 20 0 121m 69m 4440 S 1 3.7 1:52.73 nxagent
10668 root 20 0 16940 1324 940 R 1 0.1 0:00.08 top
3235 ntp 20 0 19676 1324 912 S 0 0.1 1:17.63 ntpd
4955 nagios 20 0 66868 14m 2460 S 0 0.8 0:05.17 nagios
5158 root 20 0 273m 23m 14m S 0 1.2 6:30.54 kdm_greet
1 root 20 0 1064 384 324 S 0 0.0 0:17.98 init
2 root 15 -5 0 0 0 S 0 0.0 0:00.00 kthreadd
3 root RT -5 0 0 0 S 0 0.0 0:00.92 migration/0
4 root 15 -5 0 0 0 S 0 0.0 0:00.06 ksoftirqd/0
5 root RT -5 0 0 0 S 0 0.0 0:01.36 migration/1
6 root 15 -5 0 0 0 S 0 0.0 0:00.20 ksoftirqd/1
7 root RT -5 0 0 0 S 0 0.0 0:00.92 migration/2
8 root 15 -5 0 0 0 S 0 0.0 0:00.18 ksoftirq
So, hope that I hear from you soon and thanks in advance…
Yes, that’s fine. This question is asked all the time. It’s normal for Linux to leave data in buffers and caches and reclaim them when they are needed, instead of freeing them right away. Your actual usage is shown on the second line of the output from free after this cached data is subtracted: 440MB.
Free memory is a wasted memory. Remember, even if you use ike 5% of your ram then it doesn’t mean those free chips on the memory sticks don’t draw power 
Linux caches as much as it can and if more memory is needed then it descards some cached data and everything is fine 
Thank a lot for your answers!
It’s means that the problem will be where the are not more place in free and cached=> free = 0; cached = 0;
I monitor the total memory with nagios and it checks the percentage used, and actually it is about 96-98% So, I should put the warning level at 99%? yeah, it is not cool!
Of couse it is 98% because it adds caches and buffers to the total memory used.
When using top the actual applciations memory usage is
used = used - (buffers + cached)
darshadow adjusted his/her AFDB on Thursday 16 Jul 2009 14:46 to write:
>
> Thank a lot for your answers!
>
> It’s means that the problem will be where the are not more place in
> free and cached=> free = 0; cached = 0;
>
> I monitor the total memory with nagios and it checks the percentage
> used, and actually it is about 96-98% So, I should put the warning level
> at 99%? yeah, it is not cool!
>
>
I would only worry when you see that swap is being used.
The only one you want to monitor is the “Used” ignore “Cached” + “Buffers”
these irrelevant as that memory is freed up as and when it is needed.
If you have an errant application that starts eating your memory then it
will be the Used that will increase the others will decrease until there is
no more Free ram and swap is then utilised.
HTH
–
Mark
Caveat emptor
Nullus in verba
Nil illegitimi carborundum
Thanks…
Ok now I understood but another question yet : how to known which application need memory?
I’v check a other machine and the command top show me the following :
top - 10:00:56 up 125 days, 18:04, 4 users, load average: 0.02, 0.02, 0.00
Tasks: 92 total, 1 running, 91 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.0%us, 0.0%sy, 0.0%ni, 99.0%id, 1.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 2052272k total, 2028404k used, 23868k free, 40772k buffers
Swap: 78140120k total, 5253932k used, 72886188k free, 292544k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
19127 root 16 0 5524 1192 876 R 0 0.1 0:00.01 top
1 root 15 0 800 72 40 S 0 0.0 0:01.39 init
2 root RT 0 0 0 0 S 0 0.0 0:00.64 migration/0
3 root 34 19 0 0 0 S 0 0.0 0:00.00 ksoftirqd/0
4 root RT 0 0 0 0 S 0 0.0 0:00.35 migration/1
5 root 34 19 0 0 0 S 0 0.0 0:00.00 ksoftirqd/1
6 root 10 -5 0 0 0 S 0 0.0 0:00.13 events/0
7 root 10 -5 0 0 0 S 0 0.0 0:00.00 events/1
8 root 10 -5 0 0 0 S 0 0.0 0:00.00 khelper
9 root 10 -5 0 0 0 S 0 0.0 0:00.00 kthread
13 root 10 -5 0 0 0 S 0 0.0 0:00.01 kblockd/0
14 root 10 -5 0 0 0 S 0 0.0 0:00.00 kblockd/1
15 root 13 -5 0 0 0 S 0 0.0 0:00.00 kacpid
16 root 13 -5 0 0 0 S 0 0.0 0:00.00 kacpi_notify
187 root 15 0 0 0 0 S 0 0.0 0:24.26 kswapd0
188 root 13 -5 0 0 0 S 0 0.0 0:00.00 aio/0
189 root 10 -5 0 0 0 S 0 0.0 0:00.00 aio/1
401 root 12 -5 0 0 0 S 0 0.0 0:00.00 cqueue/0
402 root 10 -5 0 0 0 S 0 0.0 0:00.00 cqueue/1
403 root 11 -5 0 0 0 S 0 0.0 0:00.00 kseriod
438 root 12 -5 0 0 0 S 0 0.0 0:00.00 kpsmoused
free
total used free shared buffers cached
Mem: 2052272 2029156 23116 0 40772 292544
-/+ buffers/cache: 1695840 356432
Swap: 78140120 5253932 72886188
the used memory is about 98% and the only software on the machine are the radius server and the postfix and both don’t use many CPU (no many connection with radius and no many mails)
Where could be the problem? if problem is?
sometimes… so many questions
There definitely something is using memory, use top press Shift+ F and sort it by memory (n). You can sort the output by various things in there:)
Oh! great command…
The mem use 50% for the nscd processus!
Thank you !!