Class: Pimon::Probe::MemoryUsage

Inherits:
Object
  • Object
show all
Defined in:
lib/pimon/probe/memory_usage.rb

Class Method Summary collapse

Class Method Details

.check(date = Time.now) ⇒ Object



4
5
6
7
8
9
10
11
# File 'lib/pimon/probe/memory_usage.rb', line 4

def self.check(date = Time.now)
  options = {
    date: date.strftime('%Y-%m-%d %H:%M:%S'), probe_name: 'mem',
    value: SystemMemory.check(:mem),
    unit: unit
  }
  OpenStruct.new(options)
end

.unitObject



13
14
15
# File 'lib/pimon/probe/memory_usage.rb', line 13

def self.unit
  '%'
end