Class: Custodian::Samplers::Load
- Defined in:
- lib/custodian/samplers/linux/load.rb,
lib/custodian/samplers/darwin/load.rb
Class Method Summary collapse
Methods inherited from Sampler
compatible?, describe, description
Methods included from Utilities
directory_exists?, file_exists?, program_exists?
Class Method Details
.sample ⇒ Object
7 8 9 10 11 12 13 14 15 |
# File 'lib/custodian/samplers/linux/load.rb', line 7 def self.sample uptime = `uptime`.match /load average: ([0-9.]+), ([0-9.]+), ([0-9.]+)/ { "Last 5 minutes" => uptime[1], "Last 10 minutes" => uptime[2], "Last 15 minutes" => uptime[3] } end |