Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > ISPConfig 3 Priority Support

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 29th January 2014, 06:03
bobpit bobpit is offline
Senior Member
 
Join Date: Feb 2013
Posts: 119
Thanks: 11
Thanked 2 Times in 2 Posts
Default monit reports different RAM loads

From the monit screen:
SYSTEM memory: 18.1% [189964 kB]
php5-fpm memory: 49.0% [514512 kB]

Code:
root@server1:~# free
             total       used       free     shared    buffers     cached
Mem:       1048576     351148     697428          0          0     157568
-/+ buffers/cache:     193580     854996
Swap:      1048576      10140    1038436
I understand that monit [SYSTEM memory] is total memory used. This is in par with the "free" command reporting 193580 KB used.

The php5-fpm memory: 49.0% [514512 kB] must be wrong. How can it be greater than the total memory used? It must have something to do with calculating wrong the memory used by each process of php.
__________________
https://surf-anonymous.info - Fast SSL Proxy server.
http://mmprox.com - Fast Proxy server.
Ubuntu 12.04 server
Nginx 1.4.4
Reply With Quote
Sponsored Links
  #2  
Old 29th January 2014, 08:49
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,046
Thanks: 826
Thanked 5,385 Times in 4,231 Posts
Default

I dont think that monit mans total memory with system memory. In my opinion, system memory is the ram used by the Linux kernel while applications like php-fpm belong to the userland and not the kernel.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 29th January 2014, 10:32
bobpit bobpit is offline
Senior Member
 
Join Date: Feb 2013
Posts: 119
Thanks: 11
Thanked 2 Times in 2 Posts
Default

Then how do you explain the result of the free command:
Code:
-/+ buffers/cache:     193580     854996
The 193580 is the TOTAL memory used by OS + applications, am I correct? Which is almost the same like the monit SYSTEM memory: 18.1% [189964 kB]. This can't be a coinsidence.
__________________
https://surf-anonymous.info - Fast SSL Proxy server.
http://mmprox.com - Fast Proxy server.
Ubuntu 12.04 server
Nginx 1.4.4
Reply With Quote
  #4  
Old 13th February 2014, 21:26
bobpit bobpit is offline
Senior Member
 
Join Date: Feb 2013
Posts: 119
Thanks: 11
Thanked 2 Times in 2 Posts
Default

Here is a pic of monit. System memory is 33,8% (354.920 mb) and php5-fpm ram is 122% (1.279.608 mb). Where 100% corresponds to 1 GB RAM.

MUNIN reports for RAM:
apps : 295 mb
slab_cache : 73 mb

From what I understand apps + slab_cache is the ram used by apps and kernel. This totals 295 + 73 = 368 mb, very close to the 354.920 mb reported by monit.

Now what could be this 122% (1.279.608 mb) ram used by php5-fpm only?
Attached Images
File Type: jpg monit-ram-2014-02-13 22:06:24.jpg (42.6 KB, 3 views)
__________________
https://surf-anonymous.info - Fast SSL Proxy server.
http://mmprox.com - Fast Proxy server.
Ubuntu 12.04 server
Nginx 1.4.4
Reply With Quote
  #5  
Old 13th February 2014, 21:34
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,046
Thanks: 826
Thanked 5,385 Times in 4,231 Posts
Default

When you want to know in detail which memory is used on your system, the query the kernel directly:

cat /proc/meminfo
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #6  
Old 13th February 2014, 21:40
bobpit bobpit is offline
Senior Member
 
Join Date: Feb 2013
Posts: 119
Thanks: 11
Thanked 2 Times in 2 Posts
Default

Code:
root@server1:~# cat /proc/meminfo 
MemTotal:        1048576 kB
MemFree:          547836 kB
Cached:           139772 kB
Active:           243436 kB
Inactive:         182496 kB
Active(anon):     135760 kB
Inactive(anon):   150400 kB
Active(file):     107676 kB
Inactive(file):    32096 kB
Unevictable:           0 kB
Mlocked:               0 kB
SwapTotal:       1048576 kB
SwapFree:         987668 kB
Dirty:                72 kB
Writeback:             0 kB
AnonPages:        286160 kB
Shmem:             38832 kB
Slab:              74780 kB
SReclaimable:      13680 kB
SUnreclaim:        61100 kB
I don't see how this can help interpret the 122% (1.279.608 mb) ram used by php5-fpm only.
__________________
https://surf-anonymous.info - Fast SSL Proxy server.
http://mmprox.com - Fast Proxy server.
Ubuntu 12.04 server
Nginx 1.4.4
Reply With Quote
  #7  
Old 13th February 2014, 21:44
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,046
Thanks: 826
Thanked 5,385 Times in 4,231 Posts
 
Default

Thats the ram that your server really uses, I showed you that so that you see that there is not THE ram usage. Applications can use ram and they can just reserve ram but not use it etc. so there are a lot of options. You should write the munin and monit developers or read the sourcecode of thes eapps if you want to know which values are used and summed up in detail by these two applications for the different values that they show.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Monit not restarting stalled programs - how to troubleshoot? flameproof Server Operation 1 17th July 2012 18:02
Monit start failed Andreas0815 HOWTO-Related Questions 5 22nd May 2012 20:05
SpamSnake 10.10 issue - Quarantine reports colskinet HOWTO-Related Questions 3 25th December 2010 19:17
Monit on Debian Hans Tips/Tricks/Mods 2 6th October 2008 13:53
Who is consuming my ram? rafael-ec Installation/Configuration 1 9th July 2008 04:22


All times are GMT +2. The time now is 22:16.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.