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 16 17 |
# File 'lib/munin/rake_processes/cpu.rb', line 5 def config puts <<-CONFIG graph_args --lower-limit 0 --upper-limit 100 graph_category #{graph_category} graph_info The % of CPU currently used by each running Rake processes - (possibly from cron) graph_scale no graph_title Current CPU utilization of Rake Processes graph_vlabel Percent CONFIG rake_processes.each do |key, values| puts "#{key}.label #{values[:label]}" end end |
#run ⇒ Object
19 20 21 22 23 |
# File 'lib/munin/rake_processes/cpu.rb', line 19 def run rake_processes.each do |key, values| puts "#{key}.value #{values[:cpu]}" end end |