Class: Eye::Checker::ChildrenMemory
- Inherits:
-
Measure
- Object
- Eye::Checker
- Measure
- Eye::Checker::ChildrenMemory
- Defined in:
- lib/eye/checker/children_memory.rb
Constant Summary
Constants inherited from Eye::Checker
Instance Attribute Summary
Attributes inherited from Eye::Checker
#check_count, #options, #pid, #process, #type, #value, #values
Instance Method Summary collapse
-
#get_value ⇒ Object
check :children_memory, :every => 30.seconds, :below => 400.megabytes monitor_children should be enabled.
Methods inherited from Measure
Methods inherited from Eye::Checker
#check, #check_name, create, #defer, #fire, get_class, #get_value_safe, #good?, #human_value, #initialize, #inspect, #last_human_values, #logger_sub_tag, #logger_tag, #max_tries, #min_tries, name_and_class, #previous_value, register, requires, #run_in_process_context, validate!
Methods included from Dsl::Validation
Constructor Details
This class inherits a constructor from Eye::Checker
Instance Method Details
#get_value ⇒ Object
check :children_memory, :every => 30.seconds, :below => 400.megabytes
monitor_children should be enabled
6 7 8 9 10 |
# File 'lib/eye/checker/children_memory.rb', line 6 def get_value process.children.values.inject(0) do |sum, ch| sum + Eye::SystemResources.memory(ch.pid).to_i end end |