Class: StatsCloud::Plugin::SystemMonitor::Engine

Inherits:
Object
  • Object
show all
Includes:
BatteryInfo, CPU, FileSystem, Memory, Network
Defined in:
lib/stats_cloud/plugin/system_monitor/engine.rb

Overview

Collects all system metrics and periodically records them to statscloud client.

Instance Method Summary collapse

Methods included from BatteryInfo

#record_battery_info

Methods included from FileSystem

#record_filesystem_info

Methods included from BytesConverter

#bytes_to_megabytes, #kilobytes_to_gigabytes, #kilobytes_to_megabytes

Methods included from Network

#record_network_info

Methods included from Memory

#record_memory_info

Methods included from CPU

#record_cpu_info

Constructor Details

#initialize(meter, mutex, settings = {}) ⇒ Engine

Returns a new instance of Engine.



22
23
24
25
26
# File 'lib/stats_cloud/plugin/system_monitor/engine.rb', line 22

def initialize(meter, mutex, settings = {})
  @meter = meter
  @mutex = mutex
  @interval = settings["collectIntervalInSeconds"] || 1
end

Instance Method Details

#join_collect_stats_threadObject



28
29
30
# File 'lib/stats_cloud/plugin/system_monitor/engine.rb', line 28

def join_collect_stats_thread
  collect_stats_thread.join
end