Module: Eye::Controller::Status
- Included in:
- Eye::Controller
- Defined in:
- lib/eye/controller/status.rb
Instance Method Summary collapse
- #info_data(*args) ⇒ Object
- #info_string(*args) ⇒ Object
- #info_string_debug(*args) ⇒ Object
- #info_string_short(*args) ⇒ Object
Instance Method Details
#info_data(*args) ⇒ Object
38 39 40 |
# File 'lib/eye/controller/status.rb', line 38 def info_data(*args) {:subtree => info_objects(*args).map{|a| a.status_data } } end |
#info_string(*args) ⇒ Object
3 4 5 |
# File 'lib/eye/controller/status.rb', line 3 def info_string(*args) make_str(info_data(*args)).to_s end |
#info_string_debug(*args) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/eye/controller/status.rb', line 11 def info_string_debug(*args) h = args. actors = Celluloid::Actor.all.map{|actor| actor.__klass__ }.group_by{|a| a}.map{|k,v| [k, v.size]}.sort_by{|a|a[1]}.reverse str = "About: \#{Eye::ABOUT}\nInfo: \#{resources_str(Eye::SystemResources.resources($$))}\nRuby: \#{RUBY_DESCRIPTION}\nGems: \#{%w|Celluloid Celluloid::IO ActiveSupport StateMachine NIO|.map{|c| gem_version(c) }}\nLogger: \#{Eye::Logger.dev}\nSocket: \#{Eye::Settings::socket_path}\nPid: \#{Eye::Settings::pid_path}\nActors: \#{actors.inspect}\n\n S\n\n str += make_str(info_data_debug) + \"\\n\" if h[:processes].present?\n\n if h[:config].present?\n str += \"\\nCurrent config: \\n\"\n str += YAML.dump(current_config.to_h)\n end\n\n GC.start\n str\nend\n" |
#info_string_short(*args) ⇒ Object
7 8 9 |
# File 'lib/eye/controller/status.rb', line 7 def info_string_short(*args) make_str({:subtree => @applications.map{|a| a.status_data_short } }).to_s end |