[Click] Counter in userlevel Click

Beyers Cronje bcronje at gmail.com
Mon Mar 26 11:06:57 EST 2007


You need to read AverageCounter and Counter handlers. In userlevel click
you'll need to use ControlSocket to access these handlers. See
http://www.read.cs.ucla.edu/click/elements/controlsocket for a list of
supported commands. Userlevel click has build-in controlsocket functionality
with the '-p <port>' command line option. In example:

// Click script
FromDevice(eth0) -> counter :: Counter -> Discard;

Now start click with this command:
click -p 777 yourconfigfile.click

You can then telnel into port 777 and issue the controlsocket commands. For
the example script you can specify the following to read the rate handler of
Counter:

read counter.rate

Cheers

Beyers

On 3/26/07, ﻯﻮﻠﻫﺩ ﺮﻤﻋ <omerbeg at gmail.com> wrote:
>
> How can I use AverageCounter() or Counter() for measurement in userlevel
> Click ? is there a file in which they write the output ? because they
> don't
> write on standard out.
>
> If somebody has the script for such measurement, it would be greatly
> appreciated.
>
> Sincerely
> -Omer
> _______________________________________________
> click mailing list
> click at amsterdam.lcs.mit.edu
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click
>


More information about the click mailing list