Pergunta

I have a Linode 512 VPS running Ubuntu 12.04 and I noticed a very big discrepency between Monit's report of memory utilization and Ubuntu's report. This becomes an issue when monit tries to restart some of my processes when it crosses a certain threshold. Does anyone know why there is this discrepency?

Ubuntu

Monit

Foi útil?

Solução

Without digging too deep into monit's source code, it appears that monit takes into account memory buffers used by the kernel when computing used memory.

From monit on my Linode:

  status                            Running
  monitoring status                 Monitored
  load average                      [0.00] [0.01] [0.05]
  cpu                               0.0%us 0.0%sy 0.0%wa
  memory usage                      264652 kB [52.0%]
  swap usage                        47096 kB [2.2%]
  data collected                    Tue, 11 Dec 2012 20:51:45

and running free right after:

               total       used       free     shared    buffers     cached
  Mem:        508576     405572     103004          0      20288     120636
  -/+ buffers/cache:     264648     243928
  Swap:      2097148      47092    2050056

Considering monit's default configuration is to refresh every 120 seconds, 264648 kB pretty accurate compared to monit's 264652 kB.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top