-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnmetrics.oedl
104 lines (97 loc) · 4.67 KB
/
nmetrics.oedl
1
2
3
4
5
6
7
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
#
# Copyright 2009-2014 National ICT Australia (NICTA)
#
# This software may be used and distributed solely under the terms of
# the MIT license (License). You should find a copy of the License in
# COPYING or at http://opensource.org/licenses/MIT. By downloading or
# using this software you accept the terms and the liability disclaimer
# in the License.
#
defApplication('nmetrics') do |app|
app.binary_path = "/usr/bin/nmetrics-oml2"
app.defProperty('cpu', 'Report cpu usage', '-c',
:type => 'boolean', :mnemonic => 'c',
:var_name => 'report_cpu')
app.defProperty('interface0', 'Report usage for the specified network interface', '-i',
:type => :string, :mnemonic => 'i',
:default => '"eth0"', :var_name => 'if_name')
app.defProperty('interface1', 'Report usage for the specified network interface', '-i',
:type => :string, :mnemonic => 'i',
:default => '"eth1"', :var_name => 'if_name')
app.defProperty('memory', 'Report memory usage', '-m',
:type => 'boolean', :mnemonic => 'm',
:var_name => 'report_memory')
app.defProperty('sample-interval', 'Time between consecutive measurements', '-s',
:type => :int, :unit => 'seconds', :mnemonic => 's',
:var_name => 'sample_interval')
app.defMeasurement("memory") do |m|
m.defMetric('ram', :uint64, :unit => "mebibyte", # unit guessed by comparing to free(1) under linux
:description => "System Random Access Memory (in MiB)")
m.defMetric('total', :uint64, :unit => "byte",
:description => "Total system memory")
m.defMetric('used', :uint64, :unit => "byte",
:description => "Total used system memory")
m.defMetric('free', :uint64, :unit => "byte",
:description => "Total free system memory (e.g., Linux plus cached)")
m.defMetric('actual_used', :uint64, :unit => "byte",
:description => "Actual total used system memory (e.g., Linux minus buffers)")
m.defMetric('actual_free', :uint64, :unit => "byte",
:description => "Actual total free system memory")
end
app.defMeasurement("cpu") do |m|
m.defMetric('user', :uint64, :unit => "second",
:description => "Time running un-niced user processes")
m.defMetric('sys', :uint64, :unit => "second",
:description => "Time running kernel processes")
m.defMetric('nice', :uint64, :unit => "second",
:description => "Time running niced user processes")
m.defMetric('idle', :uint64, :unit => "second",
:description => "Time being idle")
m.defMetric('wait', :uint64, :unit => "second",
:description => "Time waiting for I/O completion")
m.defMetric('irq', :uint64, :unit => "second",
:description => "Time spent servicing hardware interrupts")
m.defMetric('soft_irq', :uint64, :unit => "second",
:description => "Time spent servicing software interrupts")
m.defMetric('stolen', :uint64, :unit => "second",
:description => "Time stolen from this VM by the hypervisor")
m.defMetric('total', :uint64, :unit => "second",
:description => "Total system CPU time")
end
app.defMeasurement("network") do |m|
m.defMetric('name', :string,
:description => "Interface name")
m.defMetric('rx_packets', :uint64, :unit => "packet",
:description => "Received packets")
m.defMetric('rx_bytes', :uint64, :unit => "byte",
:description => "Received data")
m.defMetric('rx_errors', :uint64, :unit => "error",
:description => "Reception errors")
m.defMetric('rx_dropped', :uint64, :unit => "drop",
:description => "Dropped packets on reception")
m.defMetric('rx_overruns', :uint64, :unit => "overrun",
:description => "Reception overrun")
m.defMetric('rx_frame', :uint64, :unit => "frame",
:description => "Received frames")
m.defMetric('tx_packets', :uint64, :unit => "packet",
:description => "Sent packets")
m.defMetric('tx_bytes', :uint64, :unit => "byte",
:description => "Sent data")
m.defMetric('tx_errors', :uint64, :unit => "error",
:description => "Transmission errors")
m.defMetric('tx_dropped', :uint64, :unit => "drop",
:description => "Dropped packets on transmission")
m.defMetric('tx_overruns', :uint64, :unit => "overrun",
:description => "Transmission overrun")
m.defMetric('tx_collisions', :uint64, :unit => "collision",
:description => "Collisions on transmission")
m.defMetric('tx_carrier', :uint64,
:description => "Carrier present")
m.defMetric('speed', :uint64, :unit => "megabit/second",
:description => "Interface speed (not implemented under Linux)") # see https://jira.hyperic.com/browse/SIGAR-220
end
end
# Local Variables:
# mode:ruby
# End:
# vim: ft=ruby:sw=2