Dear Ivan,
I noticed that you added a lot of commands to query counters. When we are designing the interface we made sure to add wildcard commands. So most counters can be already read without adding a special command for that.
holger
Hi Holger,
Thank you for advice. Can you give me example? Which command I should use to read counters? I can't find any documentation for these commands.
2014/1/17 Holger Hans Peter Freyther holger@freyther.de:
Dear Ivan,
I noticed that you added a lot of commands to query counters. When we are designing the interface we made sure to add wildcard commands. So most counters can be already read without adding a special command for that.
holger
On Fri, Jan 24, 2014 at 07:01:57PM +0400, Ivan Kluchnikov wrote:
Hi Holger,
Dear Ivan,
Thank you for advice. Can you give me example? Which command I should use to read counters? I can't find any documentation for these commands.
Please take a look at libctrl/control_if.c and search for counter. When we were designing the control interface we really didn't want to write one command per counter. So there is a command installed for "counter *" and "rate_ctr *". This gives access to all counters by name.
E.g. using the example script we wrote you can do:
$ ./contrib/bsc_control.py -g counter.net.paging.expired -p 4249 -d localhost Got message: GET_REPLY 1 counter.net.paging.expired 0
What is missing from the control interface is for a command to describe itself. Maybe you have the time to implement this feature? The output could be similar to the XML generated by the VTY. A command could have an additional function to describe itself, the parameters and such.
holger