Class: MMTop::HostInfo
- Inherits:
-
Object
- Object
- MMTop::HostInfo
- Defined in:
- lib/mmtop/host.rb
Instance Attribute Summary collapse
-
#connections ⇒ Object
readonly
Returns the value of attribute connections.
-
#host ⇒ Object
readonly
Returns the value of attribute host.
-
#slave_status ⇒ Object
readonly
Returns the value of attribute slave_status.
-
#stats ⇒ Object
readonly
Returns the value of attribute stats.
Instance Method Summary collapse
-
#initialize(host, processlist, slave_status, stats) ⇒ HostInfo
constructor
A new instance of HostInfo.
- #processlist ⇒ Object
Constructor Details
#initialize(host, processlist, slave_status, stats) ⇒ HostInfo
Returns a new instance of HostInfo.
113 114 115 116 117 118 119 |
# File 'lib/mmtop/host.rb', line 113 def initialize(host, processlist, slave_status, stats) @host = host @connections = processlist.clone @slave_status = slave_status @stats = stats @processlist = processlist end |
Instance Attribute Details
#connections ⇒ Object (readonly)
Returns the value of attribute connections.
124 125 126 |
# File 'lib/mmtop/host.rb', line 124 def connections @connections end |
#host ⇒ Object (readonly)
Returns the value of attribute host.
124 125 126 |
# File 'lib/mmtop/host.rb', line 124 def host @host end |
#slave_status ⇒ Object (readonly)
Returns the value of attribute slave_status.
124 125 126 |
# File 'lib/mmtop/host.rb', line 124 def slave_status @slave_status end |
#stats ⇒ Object (readonly)
Returns the value of attribute stats.
124 125 126 |
# File 'lib/mmtop/host.rb', line 124 def stats @stats end |
Instance Method Details
#processlist ⇒ Object
121 122 123 |
# File 'lib/mmtop/host.rb', line 121 def processlist @p ||= @processlist.select { |p| !p.status.nil? && !p.status.empty? } end |