Class: MMTop::HostInfo

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#connectionsObject (readonly)

Returns the value of attribute connections.



124
125
126
# File 'lib/mmtop/host.rb', line 124

def connections
  @connections
end

#hostObject (readonly)

Returns the value of attribute host.



124
125
126
# File 'lib/mmtop/host.rb', line 124

def host
  @host
end

#slave_statusObject (readonly)

Returns the value of attribute slave_status.



124
125
126
# File 'lib/mmtop/host.rb', line 124

def slave_status
  @slave_status
end

#statsObject (readonly)

Returns the value of attribute stats.



124
125
126
# File 'lib/mmtop/host.rb', line 124

def stats
  @stats
end

Instance Method Details

#processlistObject



121
122
123
# File 'lib/mmtop/host.rb', line 121

def processlist
  @p ||= @processlist.select { |p| !p.status.nil? && !p.status.empty? }
end