Class: Munin::RakeProcesses::Cpu
- Defined in:
- lib/munin/rake_processes/cpu.rb
Instance Attribute Summary
Attributes inherited from Plugin
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
#config ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/munin/rake_processes/cpu.rb', line 5 def config puts <<-CONFIG graph_category #{graph_category} graph_info The CPU usage of Rake processes currently running - (possibly from cron) graph_title CPU usage of Rake Processes graph_vlabel CPU usage of Rake Processes CONFIG rake_processes.each_key do |key| puts "#{key}_CPU.label #{key}_CPU" end end |
#run ⇒ Object
17 18 19 20 21 |
# File 'lib/munin/rake_processes/cpu.rb', line 17 def run rake_processes.each do |cmd, values| puts "#{cmd}_CPU.value #{values[:cpu]}" end end |