Skip to content
Eddie Kohler edited this page Oct 17, 2017 · 2 revisions

Meter Element Documentation

NAME

Meter — Click element; classifies packet stream by rate (pkt/s)

SYNOPSIS

Meter(RATE1, RATE2, ..., RATEn)

Ports: 1 input, 2 or more outputs
Processing: push

DESCRIPTION

Classifies packets based on the rate of packet arrival. The rate is measured in packets per second using an exponential weighted moving average. (The related BandwidthMeter element measures rates in bytes per second.)

The configuration string consists of one or more rate arguments. Earlier rates in the list must be less than later rates. A Meter with n rate arguments will have n+1 outputs. It sends packets out the output corresponding to the current rate. If the rate is less than RATE1 packets are sent to output 0; if it is >= RATE1 but < RATE2, packets are sent to output 1; and so on. If it is >= RATEn, packets are sent to output n.

NOTES

The entire packet stream is sent to the output corresponding to the current rate. If you would like the packet stream to be split, with at most RATE1 packets per second being sent out the first output and the remainder being sent to the second output, check out RatedSplitter.

EXAMPLES

This configuration fragment drops the input stream when it is generating more than 10,000 packets per second.

 ... -> m :: Meter(10000) -> ...;
 m[1] -> Discard;

SEE ALSO

BandwidthMeter, RatedSplitter, Shaper, BandwidthShaper, RatedUnqueue, BandwidthRatedUnqueue

Generated by click-elem2man from ../elements/standard/meter.hh:6 on 2017/10/17.

Clone this wiki locally