Class: AppPerfAgent::Plugin::System::Network

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

Instance Method Summary collapse

Methods inherited from Base

descendants

Instance Method Details

#callObject



8
9
10
11
12
13
14
15
16
# File 'lib/app_perf_agent/plugin/system/network.rb', line 8

def call
  inets = Vmstat.ethernet_devices
  inets.flat_map {|inet|
    [
      ["system.network.in_bytes", inet.in_bytes, { "name" => inet.name.to_s }],
      ["system.network.out_bytes", inet.out_bytes, { "name" => inet.name.to_s }]
    ]
  }
end