|
@@ -22,14 +22,18 @@ Olle E. Johansson
|
|
|
|
|
|
<[email protected]>
|
|
|
|
|
|
+Juha Heinanen
|
|
|
+
|
|
|
+ <[email protected]>
|
|
|
+
|
|
|
Edited by
|
|
|
|
|
|
Daniel-Constantin Mierla
|
|
|
|
|
|
<[email protected]>
|
|
|
|
|
|
- Copyright © 2013, 2007, 2008, 2004 Edvina AB, 1und1 Internet AG, BASIS
|
|
|
- AudioNet GmbH, Elena-Ramona Modroiu, FhG FOKUS
|
|
|
+ Copyright (c) 2014, 2013, 2007, 2008, 2004 Edvina AB, 1und1 Internet
|
|
|
+ AG, BASIS AudioNet GmbH, Elena-Ramona Modroiu, Juha Heinanen, FhG FOKUS
|
|
|
__________________________________________________________________
|
|
|
|
|
|
Table of Contents
|
|
@@ -79,9 +83,15 @@ Daniel-Constantin Mierla
|
|
|
5.8. is_gflag
|
|
|
5.9. get_gflags
|
|
|
|
|
|
- 6. Exported pseudo-variables
|
|
|
+ 6. RPC Commands
|
|
|
+
|
|
|
+ 6.1. cfgutils.set_gflag
|
|
|
+ 6.2. cfgutils.reset_gflag
|
|
|
+ 6.3. cfgutils.is_gflag
|
|
|
|
|
|
- 6.1. $RANDOM
|
|
|
+ 7. Exported pseudo-variables
|
|
|
+
|
|
|
+ 7.1. $RANDOM
|
|
|
|
|
|
List of Examples
|
|
|
|
|
@@ -117,7 +127,10 @@ Daniel-Constantin Mierla
|
|
|
1.30. reset_gflag usage
|
|
|
1.31. is_gflag usage
|
|
|
1.32. get_gflags usage
|
|
|
- 1.33. RANDOM pseudo-variable usage
|
|
|
+ 1.33. cfgutils.set_gflag usage
|
|
|
+ 1.34. cfgutils.reset_gflag usage
|
|
|
+ 1.35. cfgutils.is_gflag usage
|
|
|
+ 1.36. RANDOM pseudo-variable usage
|
|
|
|
|
|
Chapter 1. Admin Guide
|
|
|
|
|
@@ -166,9 +179,15 @@ Chapter 1. Admin Guide
|
|
|
5.8. is_gflag
|
|
|
5.9. get_gflags
|
|
|
|
|
|
- 6. Exported pseudo-variables
|
|
|
+ 6. RPC Commands
|
|
|
+
|
|
|
+ 6.1. cfgutils.set_gflag
|
|
|
+ 6.2. cfgutils.reset_gflag
|
|
|
+ 6.3. cfgutils.is_gflag
|
|
|
|
|
|
- 6.1. $RANDOM
|
|
|
+ 7. Exported pseudo-variables
|
|
|
+
|
|
|
+ 7.1. $RANDOM
|
|
|
|
|
|
1. Overview
|
|
|
|
|
@@ -218,8 +237,8 @@ Chapter 1. Admin Guide
|
|
|
The size of bitmap is 32.
|
|
|
|
|
|
The module exports external commands that can be used to change the
|
|
|
- global flags via Management Interface. The MI commands are:
|
|
|
- "set_gflag", "reset_gflag" and "is_gflag".
|
|
|
+ global flags via Management Interface and RPC. See relevant sections
|
|
|
+ below.
|
|
|
|
|
|
2. Dependencies
|
|
|
|
|
@@ -338,7 +357,7 @@ rand_reset_prob();
|
|
|
...
|
|
|
rand_get_prob();
|
|
|
|
|
|
-4.5. sleep(time)
|
|
|
+4.5. sleep(time)
|
|
|
|
|
|
Waits "time" seconds.
|
|
|
|
|
@@ -353,7 +372,7 @@ rand_get_prob();
|
|
|
sleep("1");
|
|
|
...
|
|
|
|
|
|
-4.6. usleep(time)
|
|
|
+4.6. usleep(time)
|
|
|
|
|
|
Waits "time" micro-seconds.
|
|
|
|
|
@@ -369,7 +388,7 @@ sleep("1");
|
|
|
usleep("5000");
|
|
|
...
|
|
|
|
|
|
-4.7. abort()
|
|
|
+4.7. abort()
|
|
|
|
|
|
Debugging function that aborts the server. Depending on the
|
|
|
configuration of the server a core dump will be created.
|
|
@@ -382,7 +401,7 @@ usleep("5000");
|
|
|
abort();
|
|
|
...
|
|
|
|
|
|
-4.8. pkg_status()
|
|
|
+4.8. pkg_status()
|
|
|
|
|
|
Debugging function that dumps the status for the private (PKG) memory.
|
|
|
This information is logged to the default log facility, depending on
|
|
@@ -397,7 +416,7 @@ abort();
|
|
|
pkg_status();
|
|
|
...
|
|
|
|
|
|
-4.9. pkg_summary()
|
|
|
+4.9. pkg_summary()
|
|
|
|
|
|
Debugging function that dumps the summary for the private (PKG) memory
|
|
|
usage. This information is logged to the default log facility,
|
|
@@ -412,7 +431,7 @@ pkg_status();
|
|
|
pkg_summary();
|
|
|
...
|
|
|
|
|
|
-4.10. shm_status()
|
|
|
+4.10. shm_status()
|
|
|
|
|
|
Debugging function that dumps the status for the shared (SHM) memory.
|
|
|
This information is logged to the default log facility, depending on
|
|
@@ -427,7 +446,7 @@ pkg_summary();
|
|
|
shm_status();
|
|
|
...
|
|
|
|
|
|
-4.11. shm_summary()
|
|
|
+4.11. shm_summary()
|
|
|
|
|
|
Debugging function that dumps the summary for the shared (SHM) memory
|
|
|
usage. This information is logged to the default log facility,
|
|
@@ -613,7 +632,7 @@ $ kamctl fifo rand_set_prob 10
|
|
|
|
|
|
This command don't need a parameter.
|
|
|
|
|
|
- Example 1.25. rand_reset_prob usage
|
|
|
+ Example 1.25. rand_reset_prob usage
|
|
|
...
|
|
|
$ kamctl fifo rand_reset_prob
|
|
|
...
|
|
@@ -677,7 +696,7 @@ $ kamctl fifo set_gflag 0x3
|
|
|
The parameter value must be a bitmask in decimal or hexadecimal format.
|
|
|
The bitmask has a 32 bit size.
|
|
|
|
|
|
- Example 1.30. reset_gflag usage
|
|
|
+ Example 1.30. reset_gflag usage
|
|
|
...
|
|
|
$ kamctl fifo reset_gflag 1
|
|
|
$ kamctl fifo reset_gflag 0x3
|
|
@@ -716,22 +735,74 @@ TRUE
|
|
|
Return the bitmap with all flags. The function gets no parameters and
|
|
|
returns the bitmap in hexadecimal and decimal format.
|
|
|
|
|
|
- Example 1.32. get_gflags usage
|
|
|
+ Example 1.32. get_gflags usage
|
|
|
...
|
|
|
$ kamctl fifo get_gflags
|
|
|
0x3039
|
|
|
12345
|
|
|
...
|
|
|
|
|
|
-6. Exported pseudo-variables
|
|
|
+6. RPC Commands
|
|
|
+
|
|
|
+ 6.1. cfgutils.set_gflag
|
|
|
+ 6.2. cfgutils.reset_gflag
|
|
|
+ 6.3. cfgutils.is_gflag
|
|
|
+
|
|
|
+6.1. cfgutils.set_gflag
|
|
|
+
|
|
|
+ Set the value of some flags (specified by bitmask) to 1.
|
|
|
+
|
|
|
+ The parameter value must be a bitmask in decimal or hexadecimal format.
|
|
|
+ The bitmask has a 32 bit size.
|
|
|
+
|
|
|
+ Example 1.33. cfgutils.set_gflag usage
|
|
|
+...
|
|
|
+$ kamctl cfgutils.set_gflag s:1
|
|
|
+...
|
|
|
+
|
|
|
+6.2. cfgutils.reset_gflag
|
|
|
+
|
|
|
+ Reset the value of some flags to 0.
|
|
|
+
|
|
|
+ Reset the value of some flags (specified by bitmask) to 1.
|
|
|
+
|
|
|
+ The parameter value must be a bitmask in decimal or hexadecimal format.
|
|
|
+ The bitmask has a 32 bit size.
|
|
|
+
|
|
|
+ Example 1.34. cfgutils.reset_gflag usage
|
|
|
+...
|
|
|
+$ kamctl cfgutils.reset_gflag s:0x1
|
|
|
+...
|
|
|
+
|
|
|
+6.3. cfgutils.is_gflag
|
|
|
+
|
|
|
+ Returns string "TRUE" if all the flags from the given set are set and
|
|
|
+ "FALSE" if at least one is not set.
|
|
|
+
|
|
|
+ The parameter value must be a bitmask in decimal or hexadecimal format.
|
|
|
+ The bitmask has a 32 bit size.
|
|
|
+
|
|
|
+ Example 1.35. cfgutils.is_gflag usage
|
|
|
+...
|
|
|
+$ kamctl cfgutils.set_gflag s:1024
|
|
|
+$ kamctl cfgutils.is_gflag s:1024
|
|
|
+TRUE
|
|
|
+$ kamctl cfgutils.is_gflag s:1023
|
|
|
+FALSE
|
|
|
+$ kamctl cfgutils.set_gflag s:0x7FFF
|
|
|
+$ kamctl cfgutils.is_gflag s:1023
|
|
|
+TRUE
|
|
|
+...
|
|
|
+
|
|
|
+7. Exported pseudo-variables
|
|
|
|
|
|
- 6.1. $RANDOM
|
|
|
+ 7.1. $RANDOM
|
|
|
|
|
|
-6.1. $RANDOM
|
|
|
+7.1. $RANDOM
|
|
|
|
|
|
Returns a random value from the [0 - 2^31) range.
|
|
|
|
|
|
- Example 1.33. RANDOM pseudo-variable usage
|
|
|
+ Example 1.36. RANDOM pseudo-variable usage
|
|
|
...
|
|
|
if (rand_event()) {
|
|
|
$avp(i:10) = ($RANDOM / 16777216); # 2^24
|