Class: AppPerfAgent::Plugin::System::Memory

Inherits:
Base
  • Object
show all
Defined in:
lib/app_perf_agent/plugin/system/memory.rb

Instance Method Summary collapse

Methods inherited from Base

descendants

Instance Method Details

#callObject



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# File 'lib/app_perf_agent/plugin/system/memory.rb', line 8

def call
  memory = Vmstat.memory
  [
    [
      AppPerfAgent::Types::MEMORY,
      "system.memory.free_bytes",
      "Memory (Free)",
      memory.free_bytes
    ],
    [
      AppPerfAgent::Types::MEMORY,
      "system.memory.inactive_bytes",
      "Memory (Inactive)",
      memory.inactive_bytes
    ],
    [
      AppPerfAgent::Types::MEMORY,
      "system.memory.active_bytes",
      "Memory (Active)",
      memory.active_bytes
    ],
    [
      AppPerfAgent::Types::MEMORY,
      "system.memory.wired_bytes",
      "Memory (Wired)",
      memory.wired_bytes
    ],
    [
      AppPerfAgent::Types::MEMORY,
      "system.memory.total_bytes",
      "Memory (Total)",
      memory.total_bytes
    ]
  ]
end