Class: LeoManager::Status::NodeStat

Inherits:
Object
  • Object
show all
Defined in:
lib/leo_manager_models.rb

Overview

Node Common Status

Constant Summary collapse

@@properties =
[:version,
 :log_dir,
 :ring_cur,
 :ring_prev,
 :vm_version,
 :total_mem_usage,
 :system_mem_usage,
 :procs_mem_usage,
 :ets_mem_usage,
 :num_of_procs,
 :limit_of_procs,
 :thread_pool_size,
 :kernel_poll,
 :wd_rex_interval,
 :wd_rex_threshold_mem_capacity,
 :wd_cpu_enabled,
 :wd_cpu_interval,
 :wd_cpu_threshold_cpu_load_avg,
 :wd_cpu_threshold_cpu_util,
 :wd_io_enabled,
 :wd_io_interval,
 :wd_io_threshold_input_per_sec,
 :wd_io_threshold_output_per_sec
]

Instance Method Summary collapse

Constructor Details

#initialize(h) ⇒ NodeStat

Returns a new instance of NodeStat.



134
135
136
137
138
139
# File 'lib/leo_manager_models.rb', line 134

def initialize(h)
  @@properties.each do |property|
    instance_variable_set("@#{property}", h[property])
  end
  @kernel_poll = (h[:kernel_poll] == "true") if h.has_key?(:kernel_poll)
end