[Click] Click for measurement
sandeep
sandeep048 at gmail.com
Wed Aug 31 11:31:21 EDT 2011
Nicely explained. Thanks Prof. Eddie.
Regards,
Sandeep
On Mon, Aug 29, 2011 at 12:53 PM, Eddie Kohler <kohler at cs.ucla.edu> wrote:
> Hi Sandeep,
>
> Thanks for these good questions!
>
> A more current version of this configuration would look like this.
>
>
>
> in0::InfiniteSource -> Queue
> -> EtherEncap(0x0800, 11:22:33:44:55:66, 66:55:44:33:22:11)
> -> Counter(COUNT_CALL 100 stop)
> -> Print
> -> tr :: TimeRange
> -> Discard;
>
> DriverManager(wait, print >- tr.interval, stop)
>
>
> However, I've checked in some changes to the Git version so that "save
> tr.interval" will work again.
>
> As for why 121 packets were sent, instead of 100: For performance reasons,
> a "stop" instruction does not immediately stop the router. Rather, it
> enqueues a stop request, which stops the router soon afterwards. If you
> wanted to immediately stop the InfiniteSource, you could do this instead:
>
>
>
> in0::InfiniteSource -> Queue
> -> EtherEncap(0x0800, 11:22:33:44:55:66, 66:55:44:33:22:11)
> -> Counter(COUNT_CALL 100 finish.run)
> -> Print
> -> tr :: TimeRange
> -> Discard;
>
> finish :: Script(TYPE PASSIVE, print >- tr.interval, write in0.active
> false, stop)
>
>
> Note how the "finish" script explicitly turns off the InfiniteSource and
> THEN stops the router. Little Scripts that do multiple things are a quite
> useful technique for your toolbox.
>
> However, over the weekend I figured out a way to speed up "stop" requests
> in many cases. So if you update the Click sources from git, the *original*
> configuration will process 100 packets exactly as well.
>
> Best,
> Eddie
>
>
>
> On 8/27/11 1:05 PM, sandeep wrote:
>
>> Hi Guys,
>>
>> I am using a simple example from "click for measurement" paper and facing
>> this error. Any ideas on how to correct it?
>>
>> in0::InfiniteSource -> Queue
>> -> EtherEncap(0x0800, 11:22:33:44:55:66, 66:55:44:33:22:11)
>> -> Counter(COUNT_CALL 100 stop)
>> -> Print
>> -> tr :: TimeRange
>> -> Discard;
>>
>> DriverManager(wait, save tr.interval -, stop)
>>
>> ---
>> countint.click:8: While configuring 'DriverManager at 8 :: DriverManager':
>> syntax error at 'save'
>> Router could not be initialized!
>> ---
>>
>> Also out of curiosity I want to know why the script is printing 121
>> packets
>> instead of stopping at 100 (commented the DriverManager line in this
>> case).
>>
>> Kind Regards,
>> Sandeep,
>> PhD Student,
>> CTVR<http://ctvr.ie/> - Trinity College Dublin
>> ______________________________**_________________
>> click mailing list
>> click at amsterdam.lcs.mit.edu
>> https://amsterdam.lcs.mit.edu/**mailman/listinfo/click<https://amsterdam.lcs.mit.edu/mailman/listinfo/click>
>>
>
More information about the click
mailing list