This is automatically generated documentation. Edit after the "COMMENTS" heading; changes to the main body will be lost.

Counter Element Documentation

NAME

Counter -- Click element; measures packet count and rate

SYNOPSIS

Counter([keywords COUNT_CALL, BYTE_COUNT_CALL])

Ports: 1 input, 1 output
Processing: agnostic
Package: standard (core)

DESCRIPTION

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.

ELEMENT HANDLERS

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 corresponding values components.

Generated by 'click-elem2man' from '../elements/standard/counter.hh' on 7/Mar/2009.

COMMENTS

 
elements/counter.txt · Last modified: 2009/03/07 17:24 (external edit)
 
Recent changes RSS feed Driven by DokuWiki