-
Notifications
You must be signed in to change notification settings - Fork 82
Counter
Tom Barbette edited this page Oct 3, 2018
·
2 revisions
Counter — Click element; measures packet count and rate
Counter([keywords COUNT_CALL, BYTE_COUNT_CALL])
Ports: 1 input, 1 output
Processing: agnostic
Passes packets unchanged from its input to its output, maintaining statistics information about packet count and packet rate.
Keyword arguments are:
- COUNT_CALL — Argument is `N HANDLER [VALUE]'. When the packet count reaches N, call the write handler HANDLER with value VALUE before emitting the packet.
- BYTE_COUNT_CALL — Argument is `N HANDLER [VALUE]'. When the byte count reaches or exceeds N, call the write handler HANDLER with value VALUE before emitting the packet.
- BATCH_PRECISE — If true, will count packets one by one and hence call the handlers when the count is exactly the limit. The default is to count the whole batch at once and call the handlers if the limit has been reached.
- count (read-only) — Returns the number of packets that have passed through since the last reset.
- byte_count (read-only) — Returns the number of bytes that have passed through since the last reset.
- rate (read-only) — Returns the recent arrival rate, measured by exponential weighted moving average, in packets per second.
- bit_rate (read-only) — Returns the recent arrival rate, measured by exponential weighted moving average, in bits per second.
- byte_rate (read-only) — Returns the recent arrival rate, measured by exponential weighted moving average, in bytes per second.
- reset_counts (write-only) — Resets the counts and rates to zero.
- reset (write-only) — Same as 'reset_counts'.
- count_call (write-only) — Writes a new COUNT_CALL argument. The handler can be omitted.
- byte_count_call (write-only) — Writes a new BYTE_COUNT_CALL argument. The handler can be omitted.
- CLICK_LLRPC_GET_RATE (llrpc) — Argument is a pointer to an integer that must be 0. Returns the recent arrival rate (measured by exponential weighted moving average) in packets per second.
- CLICK_LLRPC_GET_COUNT (llrpc) — Argument is a pointer to an integer that must be 0 (packet count) or 1 (byte count). Returns the current packet or byte count.
-
CLICK_LLRPC_GET_COUNTS (llrpc) —
Argument is a pointer to a click_llrpc_counts_st structure (see
<click/llrpc.h>). The
keys
components must be 0 (packet count) or 1 (byte count). Stores the corresponding counts in the correspondingvalues
components.
Generated by click-elem2man from ../elements/standard/counter.hh:20
on 2018/10/03.