Module: CitrusMonitor::SystemMonitor
- Includes:
- Utils
- Defined in:
- lib/citrus-monitor/system_monitor.rb
Overview
SystemMonitor
Instance Method Summary collapse
-
#get_sys_info(&block) ⇒ Object
Get operating system’s information.
Methods included from Utils
Instance Method Details
#get_sys_info(&block) ⇒ Object
Get operating system’s information
13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/citrus-monitor/system_monitor.rb', line 13 def get_sys_info &block return if OS.windows? sys_info = get_basic_info EM.system('iostat') { |output, status| if status.exitstatus == 0 sys_info[:iostat] = format output block_given? and yield nil, sys_info else block_given? and yield status, sys_info end } end |