-
Counters Module
Andrei Pelinescu-Onciul
iptelorg GmbH
Copyright © 2010 iptelorg GmbH
- _________________________________________________________________
+ __________________________________________________________________
Table of Contents
3. Functions
- 3.1. cnt_inc([group.]name)
- 3.2. cnt_add([group.]name, number)
- 3.3. cnt_reset([group.]name)
+ 3.1. cnt_inc([group.]name)
+ 3.2. cnt_add([group.]name, number)
+ 3.3. cnt_reset([group.]name)
4. counters RPC Functions
List of Examples
- 1.1. Create a new script_counter
- 1.2. Set script_cnt_grp_name in the config file
+ 1.1. Create a new script_counter
+ 1.2. Set script_cnt_grp_name in the config file
1.3. cnt_inc usage
1.4. cnt_add usage
1.5. cnt_reset usage
3. Functions
- 3.1. cnt_inc([group.]name)
- 3.2. cnt_add([group.]name, number)
- 3.3. cnt_reset([group.]name)
+ 3.1. cnt_inc([group.]name)
+ 3.2. cnt_add([group.]name, number)
+ 3.3. cnt_reset([group.]name)
4. counters RPC Functions
1. Overview
- This module exports counters/statistics manipulating script functions
+ This module exports counters/statistics manipulating script functions
and RPCs.
2. Parameters
2.1. script_counter
Define a new counter that can be used from the script. The declaration
- might include a group in front of the counter name, separated with
- '.'. It might also include a counter description string (help
- message), separated from the name with a ' ' or ':'. If the group is
- missing, the group defined in the script_cnt_grp_name module parameter
- will be used (the default is "script"). If the description is missing,
- the default is "custom script counter". The format of the declaration
- is: [group.]name[( |:)description].
-
- Example 1.1. Create a new script_counter
+ might include a group in front of the counter name, separated with '.'.
+ It might also include a counter description string (help message),
+ separated from the name with a ' ' or ':'. If the group is missing, the
+ group defined in the script_cnt_grp_name module parameter will be used
+ (the default is "script"). If the description is missing, the default
+ is "custom script counter". The format of the declaration is:
+ [group.]name[( |:)description].
+
+ Example 1.1. Create a new script_counter
modparam("counters", "script_counter", "foo") # script.foo
modparam("counters", "script_counter", "test.bar") # test.bar
modparam("counters", "script_counter", "baz example counter") # script.baz
2.2. script_cnt_grp_name
- Group name that will be used for the counters defined via the
+ Group name that will be used for the counters defined via the
script_counter module parameter which do not have a specified group.
Default: "script".
- Example 1.2. Set script_cnt_grp_name in the config file
+ Example 1.2. Set script_cnt_grp_name in the config file
modparam("counters", "script_cnt_grp_name", "my_counters")
3. Functions
- 3.1. cnt_inc([group.]name)
- 3.2. cnt_add([group.]name, number)
- 3.3. cnt_reset([group.]name)
+ 3.1. cnt_inc([group.]name)
+ 3.2. cnt_add([group.]name, number)
+ 3.3. cnt_reset([group.]name)
-3.1. cnt_inc([group.]name)
+3.1. cnt_inc([group.]name)
- Increments the counter group.name. The counter must be defined using
+ Increments the counter group.name. The counter must be defined using
the script_counter module parameter. If the group name is missing, the
group specified by the script_cnt_grp_name modparam will be used.
...
}
-3.2. cnt_add([group.]name, number)
+3.2. cnt_add([group.]name, number)
- Adds number the counter group.name. The counter must be defined using
+ Adds number the counter group.name. The counter must be defined using
the script_counter module parameter. If the group name is missing, the
group specified by the script_cnt_grp_name modparam will be used.
...
}
-3.3. cnt_reset([group.]name)
+3.3. cnt_reset([group.]name)
- Resets the counter group.name. The counter must be defined using the
- script_counter module parameter. If the group name is missing, the
+ Resets the counter group.name. The counter must be defined using the
+ script_counter module parameter. If the group name is missing, the
group specified by the script_cnt_grp_name modparam will be used.
Example 1.5. cnt_reset usage
4.4. cnt.var_list group
- Lists all the names of all the counters belonging to the specified
+ Lists all the names of all the counters belonging to the specified
group.
Example 1.9. cnt.var_list group usage