Class: Monitors::Memory

Inherits:
Base
  • Object
show all
Defined in:
lib/monitors/memory.rb

Class Method Summary collapse

Methods inherited from Base

run

Methods included from Logging

#log, #logger

Class Method Details

.check_intervalObject



19
20
21
# File 'lib/monitors/memory.rb', line 19

def check_interval
  Cfg.memory_check_interval
end

.perform_checkObject



9
10
11
12
13
14
15
16
17
# File 'lib/monitors/memory.rb', line 9

def perform_check
  running_instances.each do |p|
    if ViolationsRecorders::Memory.is_violating?(p)
      log "process #{p.pid} had a memory violation"
      Phantom::Manager.restart(p)
    end
  end

end