Class: Munin::RakeProcesses::CpuTime

Inherits:
Plugin
  • Object
show all
Defined in:
lib/munin/rake_processes/cpu_time.rb

Instance Attribute Summary

Attributes inherited from Plugin

#debug, #graph_category

Instance Method Summary collapse

Methods inherited from Plugin

#autoconf, #initialize, #rake_processes, rake_ps_string

Constructor Details

This class inherits a constructor from Munin::RakeProcesses::Plugin

Instance Method Details

#configObject



5
6
7
8
9
10
11
12
13
14
15
# File 'lib/munin/rake_processes/cpu_time.rb', line 5

def config
  puts <<-CONFIG
graph_category #{graph_category}
graph_info The CPU time consumed of Rake processes currently running - (possibly from cron)
graph_title CPU Time of Rake Processes
graph_vlabel CPU Time of Rake Processes
  CONFIG
  rake_processes.each_key do |key|
    puts "#{key}_TIME.label #{key}_TIME"
  end
end

#runObject



17
18
19
20
21
# File 'lib/munin/rake_processes/cpu_time.rb', line 17

def run
  rake_processes.each do |cmd, values|
    puts "#{cmd}_TIME.value #{values[:time]}"
  end
end