close Warning: Can't synchronize with repository "(default)" (/common/SVN/wimax does not appear to be a Subversion repository.). Look in the Trac log for more information.

WiMAX/30/07: iperf.rb

File iperf.rb, 7.3 KB (added by Nilanjan Paul, 12 years ago)
Line 
1defApplication('test:app:iperf', 'iperf') do |a|
2 a.path = "/usr/bin/oml2-iperf"
3 a.version(2, 0, 5)
4 a.shortDescription = 'Iperf traffic generator and bandwidth measurement tool'
5 a.description = %{
6Iperf is a traffic generator and bandwidth measurement tool. It provides
7generators producing various forms of packet streams and port for sending these
8packets via various transports, such as TCP and UDP.
9 }
10
11 a.defProperty('interval', 'pause n seconds between periodic bandwidth reports',
12 'i', {:type => :string, :dynamic => false})
13 a.defProperty('len', 'set length read/write buffer to n (default 8 KB)',
14 'l', {:type => :string, :dynamic => false})
15 a.defProperty('print_mss', 'print TCP maximum segment size (MTU - TCP/IP header)',
16 'm', {:type => :boolean, :dynamic => false})
17 a.defProperty('output', 'output the report or error message to this specified file',
18 'o', {:type => :string, :dynamic => false})
19 a.defProperty('port', 'set server port to listen on/connect to to n (default 5001)',
20 'p', {:type => :integer, :dynamic => false})
21 a.defProperty('udp', 'use UDP rather than TCP',
22 'u', {:order => 2, :type => :boolean, :dynamic => false})
23 a.defProperty('window', 'TCP window size (socket buffer size)',
24 'w', {:type => :integer, :dynamic => false})
25 a.defProperty('bind', 'bind to <host>, an interface or multicast address',
26 'B', {:type => :string, :dynamic => false})
27 a.defProperty('compatibility', 'for use with older versions does not sent extra msgs',
28 'C', {:type => :boolean, :dynamic => false})
29 a.defProperty('mss', 'set TCP maximum segment size (MTU - 40 bytes)',
30 'M', {:type => :integer, :dynamic => false})
31 a.defProperty('nodelay', 'set TCP no delay, disabling Nagle\'s Algorithm',
32 'N', {:type => :boolean, :dynamic => false})
33 a.defProperty('IPv6Version', 'set the domain to IPv6',
34 'V', {:type => :boolean, :dynamic => false})
35 a.defProperty('reportexclude', '[CDMSV] exclude C(connection) D(data) M(multicast) S(settings) V(server) reports',
36 'x', {:type => :string, :dynamic => false})
37 a.defProperty('reportstyle', 'C or c for CSV report, O or o for OML',
38 'y', {:type => :string, :dynamic => false})
39
40 a.defProperty('server', 'run in server mode',
41 's', {:type => :boolean, :dynamic => false})
42
43 a.defProperty('bandwidth', 'set target bandwidth to n bits/sec (default 1 Mbit/sec)',
44 'b', {:type => :string, :dynamic => false})
45 a.defProperty('client', 'run in client mode, connecting to <host>',
46 'c', {:order => 1, :type => :string, :dynamic => false})
47 a.defProperty('dualtest', 'do a bidirectional test simultaneously',
48 'd', {:type => :boolean, :dynamic => false})
49 a.defProperty('num', 'number of bytes to transmit (instead of -t)',
50 'n', {:type => :integer, :dynamic => false})
51 a.defProperty('tradeoff', 'do a bidirectional test individually',
52 'r', {:type => :boolean, :dynamic => false})
53 a.defProperty('time', 'time in seconds to transmit for (default 10 secs)',
54 't', {:type => :integer, :dynamic => false})
55 a.defProperty('fileinput', 'input the data to be transmitted from a file',
56 'F', {:type => :string, :dynamic => false})
57 a.defProperty('stdin', 'input the data to be transmitted from stdin',
58 'I', {:type => :boolean, :dynamic => false})
59 a.defProperty('listenport', 'port to recieve bidirectional tests back on',
60 'L', {:type => :integer, :dynamic => false})
61 a.defProperty('parallel', 'number of parallel client threads to run',
62 'P', {:type => :integer, :dynamic => false})
63 a.defProperty('ttl', 'time-to-live, for multicast (default 1)',
64 'T', {:type => :integer, :dynamic => false})
65 a.defProperty('linux-congestion', 'set TCP congestion control algorithm (Linux only)',
66 'Z', {:type => :boolean, :dynamic => false})
67
68 a.defMeasurement("application"){ |m|
69 m.defMetric('pid', :long, 'Main process identifier')
70 m.defMetric('version', :string, 'Iperf version')
71 m.defMetric('cmdline', :string, 'Iperf invocation command line')
72 m.defMetric('starttime_s', :long, 'Time the application was received (s)')
73 m.defMetric('starttime_us', :long, 'Time the application was received (us)')
74 }
75
76 a.defMeasurement("settings"){ |m|
77 m.defMetric('pid', :long, 'Main process identifier')
78 m.defMetric('server_mode', :long, '1 if in server mode, 0 otherwise')
79 m.defMetric('bind_address', :string, 'Address to bind')
80 m.defMetric('multicast', :long, '1 if listening to a Multicast group')
81 m.defMetric('multicast_ttl', :long, 'Multicast TTL if relevant')
82 m.defMetric('transport_protocol', :long, 'Transport protocol (IANA number)')
83 m.defMetric('window_size', :long, 'TCP window size')
84 m.defMetric('buffer_size', :long, 'UDP buffer size')
85 }
86
87 a.defMeasurement("connection"){ |m|
88 m.defMetric('pid', :long, 'Main process identifier')
89 m.defMetric('connection_id', :long, 'Connection identifier (socket)')
90 m.defMetric('local_address', :string, 'Local network address')
91 m.defMetric('local_port', :long, 'Local port')
92 m.defMetric('foreign_address', :string, 'Remote network address')
93 m.defMetric('foreign_port', :long, 'Remote port')
94 }
95
96 a.defMeasurement("transfer"){ |m|
97 m.defMetric('pid', :long, 'Main process identifier')
98 m.defMetric('connection_id', :long, 'Connection identifier (socket)')
99 m.defMetric('begin_interval', :float, 'Start of the averaging interval (Iperf timestamp)')
100 m.defMetric('end_interval', :float, 'End of the averaging interval (Iperf timestamp)')
101 m.defMetric('size', :long, 'Amount of transmitted data [Bytes]')
102 }
103
104 a.defMeasurement("losses"){ |m|
105 m.defMetric('pid', :long, 'Main process identifier')
106 m.defMetric('connection_id', :long, 'Connection identifier (socket)')
107 m.defMetric('begin_interval', :float, 'Start of the averaging interval (Iperf timestamp)')
108 m.defMetric('end_interval', :float, 'End of the averaging interval (Iperf timestamp)')
109 m.defMetric('total_datagrams', :long, 'Total number of datagrams')
110 m.defMetric('lost_datagrams', :long, 'Number of lost datagrams')
111 }
112
113 a.defMeasurement("jitter"){ |m|
114 m.defMetric('pid', :long, 'Main process identifier')
115 m.defMetric('connection_id', :long, 'Connection identifier (socket)')
116 m.defMetric('begin_interval', :float, 'Start of the averaging interval (Iperf timestamp)')
117 m.defMetric('end_interval', :float, 'End of the averaging interval (Iperf timestamp)')
118 m.defMetric('jitter', :float, 'Average jitter [ms]')
119 }
120
121 a.defMeasurement("packets"){ |m|
122 m.defMetric('pid', :long, 'Main process identifier')
123 m.defMetric('connection_id', :long, 'Connection identifier (socket)')
124 m.defMetric('packet_id', :long, 'Packet sequence number for datagram-oriented protocols')
125 m.defMetric('packet_size', :long, 'Packet size')
126 m.defMetric('packet_time_s', :long, 'Time the packet was processed (s)')
127 m.defMetric('packet_time_us', :long, 'Time the packet was processed (us)')
128 m.defMetric('packet_sent_time_s', :long, 'Time the packet was sent (s) for datagram-oriented protocols')
129 m.defMetric('packet_sent_time_us', :long, 'Time the packet was sent (us) for datagram-oriented protocols')
130 }
131
132 a.defMeasurement("UDP_Rich_Info"){ |m|
133 m.defMetric('ID', :long)
134 m.defMetric('Begin_interval', :float)
135 m.defMetric('End_interval', :float)
136 m.defMetric('Transfer', :float)
137 m.defMetric('Bandwidth', :float)
138 m.defMetric('Jitter', :float)
139 m.defMetric('Packet_Lost', :long)
140 m.defMetric('Total_Packet', :long)
141 m.defMetric('PLR', :float)
142 }
143
144end