Closed peterrz closed 7 years ago
Try some of the Counters elements
If you want packets per second, bit rate and packet count type stats use Counter
Counter exposes all those stats via read handlers. You can read them via ControlSocket or proclikefs (if linux module). Or you can use a Script element to print to console. Here is an example using Script:
FromDevice(eth0) -> c1::Counter -> Queue -> ToDevice(eth1);
Script (
printn "c1 Bit Rate ",
printn c1.bit_rate,
printn " Count ",
printn c1.count,
printn " Bytes ",
print c1.byte_count,
wait 2,
loop
)
I personnaly like AverageCounter that gives you a rate.
Beware of mutli-thread (un)safeness with all of those.
@bcronje @tbarbette thanks to guide me, i want send information to controller floodlight and also i want dynamic period report. any solutions ? (this dynamic report time should be set on controller )
how i can debug my code before running on my router ? any debugger available ?
click_chatter works as a starting point
@ahenning thank you, Please describe more,
Look at click_chatter examples in the existing click elements
As @ahenning said for basic help click_chatter is like printf. If you want full debugger support then just use gdb and run Click in userlevel mode. Personally I use KDevelop as my IDE for Click development and it supports gdb with a nice GUI for debugging.
@bcronje thanks!
Hi, i'm new at click ,i want monitoring performance, any available element or function ? please guide me.