Module: sip-router
Branch: master
Commit: 0156d9e3e46e592c951acbbe8924840b3ca7860f
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=0156d9e…
Author: Olle E. Johansson <oej(a)edvina.net>
Committer: Olle E. Johansson <oej(a)edvina.net>
Date: Thu Dec 20 20:40:19 2012 +0100
malloc_test Minor README edits
---
modules/malloc_test/README | 89 +++++++++++---------
modules/malloc_test/doc/malloc_test.xml | 16 ++--
.../…
[View More]{functions.xml => malloc_test_functions.xml} | 0
.../doc/{params.xml => malloc_test_params.xml} | 0
.../doc/{rpc.xml => malloc_test_rpc.xml} | 0
5 files changed, 56 insertions(+), 49 deletions(-)
diff --git a/modules/malloc_test/README b/modules/malloc_test/README
index 2158a0f..cfe7818 100644
--- a/modules/malloc_test/README
+++ b/modules/malloc_test/README
@@ -1,4 +1,4 @@
-1. malloc_test Module
+The malloc_test Module
Andrei Pelinescu-Onciul
@@ -7,31 +7,23 @@ Andrei Pelinescu-Onciul
Copyright � 2010 iptelorg GmbH
__________________________________________________________________
- 1.1. Overview
- 1.2. Parameters
+ List of Examples
- 1.2.1. check_content
+ 1. Set check_content in the config file
+ 2. Set check_content at runtime via sercmd
+ 3. men_alloc usage
+ 4. mem_free usage
+ 5. mt.mem_alloc usage
+ 6. mt.mem_free usage
+ 7. mt.mem_used usage
+ 8. mt.mem_rnd_alloc usage
+ 9. mt.mem_test_start usage
+ 10. mt.mem_test_stop usage
+ 11. mt.mem_test_destroy usage
+ 12. mt.mem_test_destroy_all usage
+ 13. mt.mem_test_list usage
- 1.3. Functions
-
- 1.3.1. mt_mem_alloc(size)
- 1.3.2. mt_mem_free()
-
- 1.4. malloc_test RPC Functions
-
- 1.4.1. mt.mem_alloc size [unit]
- 1.4.2. mt.mem_free [size] [unit]
- 1.4.3. mt.mem_used [unit]
- 1.4.4. mt.mem_rnd_alloc min max total [unit]
- 1.4.5. mt.mem_test_start min max total min_int max_int total_time
- [unit]
-
- 1.4.6. mt.mem_test_stop id
- 1.4.7. mt.mem_test_destroy id
- 1.4.8. mt.mem_test_destroy_all id
- 1.4.9. mt.mem_test_list [id] [unit]
-
-1.1. Overview
+1. Overview
This is a debugging/test module. It implements functions (both script
and rpcs) that can be used to stress the memory allocator or force
@@ -41,9 +33,11 @@ Warning
This module should never be used in a production environment.
-1.2. Parameters
+2. Parameters
+
+ 2.1. check_content
-1.2.1. check_content
+2.1. check_content
When doing the tests, check also for the possibility of the memory
being overwritten. When activated, the allocated memory will be filled
@@ -53,15 +47,18 @@ Warning
It can be changed also at runtime, via the rpc interface.
- Example 1. Set check_content in the config file
+ Example 1. Set check_content in the config file
modparam("malloc_test", "check_content", 1)
- Example 2. Set check_content at runtime via sercmd
+ Example 2. Set check_content at runtime via sercmd
$ sercmd cfg.set_now_int malloc_test check_content 1
-1.3. Functions
+3. Functions
-1.3.1. mt_mem_alloc(size)
+ 3.1. mt_mem_alloc(size)
+ 3.2. mt_mem_free()
+
+3.1. mt_mem_alloc(size)
Allocates size bytes.
@@ -75,7 +72,7 @@ Note
mem_alloc(1048576); # 1MB
...
-1.3.2. mt_mem_free()
+3.2. mt_mem_free()
Frees all the memory allocated with mem_alloc() up to this point.
@@ -89,9 +86,19 @@ Note
mem_free();
...
-1.4. malloc_test RPC Functions
+4. malloc_test RPC Functions
+
+ 4.1. mt.mem_alloc size [unit]
+ 4.2. mt.mem_free [size] [unit]
+ 4.3. mt.mem_used [unit]
+ 4.4. mt.mem_rnd_alloc min max total [unit]
+ 4.5. mt.mem_test_start min max total min_int max_int total_time [unit]
+ 4.6. mt.mem_test_stop id
+ 4.7. mt.mem_test_destroy id
+ 4.8. mt.mem_test_destroy_all id
+ 4.9. mt.mem_test_list [id] [unit]
-1.4.1. mt.mem_alloc size [unit]
+4.1. mt.mem_alloc size [unit]
Allocates the specified number of bytes. unit is optional and can be
one of:
@@ -103,7 +110,7 @@ mem_free();
Example 5. mt.mem_alloc usage
$ sercmd mt.mem_alloc 10 k
-1.4.2. mt.mem_free [size] [unit]
+4.2. mt.mem_free [size] [unit]
Frees at least size bytes from the memory allocated by other
malloc_test functions (e.g. mt.mem_alloc).
@@ -119,7 +126,7 @@ mem_free();
Example 6. mt.mem_free usage
$ sercmd mt.mem_free 1 m
-1.4.3. mt.mem_used [unit]
+4.3. mt.mem_used [unit]
Returns/displays how many bytes are allocated. The default unit is
bytes (for all the possible units see above).
@@ -134,7 +141,7 @@ mem_free();
$ sercmd mt.mem_used
9221460
-1.4.4. mt.mem_rnd_alloc min max total [unit]
+4.4. mt.mem_rnd_alloc min max total [unit]
Allocates total_size memory, in pieces of random size between min ..
max (inclusive). unit is optional and represents the unit for all the
@@ -143,7 +150,7 @@ mem_free();
Example 8. mt.mem_rnd_alloc usage
$ sercmd mt.mem_rnd_alloc 1 64 10240 k
-1.4.5. mt.mem_test_start min max total min_int max_int total_time [unit]
+4.5. mt.mem_test_start min max total min_int max_int total_time [unit]
Starts a malloc test that will take total_time to execute. Memory
allocations will be performed at intervals randomly chosen between
@@ -161,14 +168,14 @@ mem_free();
$ sercmd mt.mem_test_start 15 64 25000 128 1500 3600000 k
1
-1.4.6. mt.mem_test_stop id
+4.6. mt.mem_test_stop id
Stops the test indentified by id.
Example 10. mt.mem_test_stop usage
$ sercmd mt.mem_test_stop 1
-1.4.7. mt.mem_test_destroy id
+4.7. mt.mem_test_destroy id
Destroys the test indentified by id (besides stopping it, it also frees
all the data, including the statistics).
@@ -176,14 +183,14 @@ mem_free();
Example 11. mt.mem_test_destroy usage
$ sercmd mt.mem_test_destroy 1
-1.4.8. mt.mem_test_destroy_all id
+4.8. mt.mem_test_destroy_all id
Destroys all the running or stopped tests.
Example 12. mt.mem_test_destroy_all usage
$ sercmd mt.mem_test_destroy_all
-1.4.9. mt.mem_test_list [id] [unit]
+4.9. mt.mem_test_list [id] [unit]
Returns/displays data about the test identified by id, or if no id is
specified, it lists all the tests (running or stopped).
diff --git a/modules/malloc_test/doc/malloc_test.xml b/modules/malloc_test/doc/malloc_test.xml
index de0a2ea..7df2b72 100644
--- a/modules/malloc_test/doc/malloc_test.xml
+++ b/modules/malloc_test/doc/malloc_test.xml
@@ -9,8 +9,9 @@
]
>
-<section id="malloc_test" xmlns:xi="http://www.w3.org/2001/XInclude">
- <sectioninfo>
+<book id="malloc_test" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <bookinfo>
+ <title>The malloc_test Module</title>
<authorgroup>
<author>
<firstname>Andrei</firstname>
@@ -25,9 +26,8 @@
<year>2010</year>
<holder>iptelorg GmbH</holder>
</copyright>
- </sectioninfo>
+ </bookinfo>
- <title>malloc_test Module</title>
<section id="malloc_test.overview">
<title>Overview</title>
@@ -40,7 +40,7 @@
This module should never be used in a production environment.
</para></warning>
</section>
- <xi:include href="params.xml"/>
- <xi:include href="functions.xml"/>
- <xi:include href="rpc.xml"/>
-</section>
+ <xi:include href="malloc_test_params.xml"/>
+ <xi:include href="malloc_test_functions.xml"/>
+ <xi:include href="malloc_test_rpc.xml"/>
+</book>
diff --git a/modules/malloc_test/doc/functions.xml b/modules/malloc_test/doc/malloc_test_functions.xml
similarity index 100%
rename from modules/malloc_test/doc/functions.xml
rename to modules/malloc_test/doc/malloc_test_functions.xml
diff --git a/modules/malloc_test/doc/params.xml b/modules/malloc_test/doc/malloc_test_params.xml
similarity index 100%
rename from modules/malloc_test/doc/params.xml
rename to modules/malloc_test/doc/malloc_test_params.xml
diff --git a/modules/malloc_test/doc/rpc.xml b/modules/malloc_test/doc/malloc_test_rpc.xml
similarity index 100%
rename from modules/malloc_test/doc/rpc.xml
rename to modules/malloc_test/doc/malloc_test_rpc.xml
[View Less]
Module: sip-router
Branch: master
Commit: 326772a1524e3ad6e7c5927cf6edee1f85bc5a5b
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=326772a…
Author: Olle E. Johansson <oej(a)edvina.net>
Committer: Olle E. Johansson <oej(a)edvina.net>
Date: Thu Dec 20 20:37:09 2012 +0100
db_flatstore Minor README edits
---
modules/db_flatstore/README | 26 ++++++++-----------
modules/db_flatstore/doc/db_flatstore.xml | 14 +++++-----…
[View More]
.../{functions.xml => db_flatstore_functions.xml} | 0
.../doc/{params.xml => db_flatstore_params.xml} | 0
4 files changed, 18 insertions(+), 22 deletions(-)
diff --git a/modules/db_flatstore/README b/modules/db_flatstore/README
index 52fbcb1..99314cc 100644
--- a/modules/db_flatstore/README
+++ b/modules/db_flatstore/README
@@ -1,4 +1,4 @@
-1. Db_flatstore Module
+Db_flatstore Module
Jan Janak
@@ -8,19 +8,13 @@ Jan Janak
Copyright � 2004, 2005 FhG FOKUS
__________________________________________________________________
- 1.1. Overview
+1. Overview
- 1.1.1. Rotating Log Files
+ 1.1. Rotating Log Files
- 1.2. Parameters
-
- 1.2.1. flush (integer)
-
-1.1. Overview
-
- Db_flatstore is one of so-called SIP Router database modules. It does
- not export any functions executable from the configuration scripts, but
- it exports a subset of functions from the database API and thus other
+ Db_flatstore is one of the SIP Router database modules. It does not
+ export any functions executable from the configuration scripts, but it
+ exports a subset of functions from the database API and thus other
modules can use it as a database driver, instead of, for example, the
Mysql module.
@@ -60,7 +54,7 @@ modparam("acc", "db_url", "flatstore:/var/log/acc")
simply concatenate the contents of files with the same table name but
different process id.
-1.1.1. Rotating Log Files
+1.1. Rotating Log Files
The module implements a SIP Router management interface command called
flatstore.rotate. When SIP Router receives the command it will close
@@ -86,9 +80,11 @@ sercmd flatstore.rotate
traffic on the SIP server.
* Move the renamed files somewhere else and process them.
-1.2. Parameters
+2. Parameters
+
+ 2.1. flush (integer)
-1.2.1. flush (integer)
+2.1. flush (integer)
Enable or disable flushing after each write.
diff --git a/modules/db_flatstore/doc/db_flatstore.xml b/modules/db_flatstore/doc/db_flatstore.xml
index 13db1a2..bdeb0f3 100644
--- a/modules/db_flatstore/doc/db_flatstore.xml
+++ b/modules/db_flatstore/doc/db_flatstore.xml
@@ -8,8 +8,9 @@
]>
-<section id="flatstore" xmlns:xi="http://www.w3.org/2001/XInclude">
- <sectioninfo>
+<book id="flatstore" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <bookinfo>
+ <title>Db_flatstore Module</title>
<authorgroup>
<author>
<firstname>Jan</firstname>
@@ -23,14 +24,13 @@
<year>2005</year>
<holder>FhG FOKUS</holder>
</copyright>
- </sectioninfo>
+ </bookinfo>
- <title>Db_flatstore Module</title>
<section id="flatstore.overview">
<title>Overview</title>
<para>
- Db_flatstore is one of so-called &siprouter; database modules. It does
+ Db_flatstore is one of the &siprouter; database modules. It does
not export any functions executable from the configuration scripts,
but it exports a subset of functions from the database API and thus
other modules can use it as a database driver, instead of, for
@@ -131,6 +131,6 @@ mv acc_4.log acc_3.log.20050605
</section>
</section>
- <xi:include href="params.xml"/>
+ <xi:include href="db_flatstore_params.xml"/>
-</section>
+</book>
diff --git a/modules/db_flatstore/doc/functions.xml b/modules/db_flatstore/doc/db_flatstore_functions.xml
similarity index 100%
rename from modules/db_flatstore/doc/functions.xml
rename to modules/db_flatstore/doc/db_flatstore_functions.xml
diff --git a/modules/db_flatstore/doc/params.xml b/modules/db_flatstore/doc/db_flatstore_params.xml
similarity index 100%
rename from modules/db_flatstore/doc/params.xml
rename to modules/db_flatstore/doc/db_flatstore_params.xml
[View Less]
Module: sip-router
Branch: master
Commit: 78e1f3667d8fa553abde60d9078f395b9c4dcb9a
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=78e1f36…
Author: Olle E. Johansson <oej(a)edvina.net>
Committer: Olle E. Johansson <oej(a)edvina.net>
Date: Thu Dec 20 20:18:34 2012 +0100
cfg_db README edits
---
modules/cfg_db/README | 49 ++++++++++----------
modules/cfg_db/doc/cfg_db.xml | 16 +++---
.../cfg_db/…
[View More]doc/{params.xml => cfg_db_params.xml} | 0
3 files changed, 32 insertions(+), 33 deletions(-)
diff --git a/modules/cfg_db/README b/modules/cfg_db/README
index 48763f1..69108d1 100644
--- a/modules/cfg_db/README
+++ b/modules/cfg_db/README
@@ -1,4 +1,4 @@
-1. cfg_db module
+The configuration database module - cfg_db
Tomas Mandys
@@ -7,33 +7,28 @@ Tomas Mandys
Copyright � 2008 Tomas Mandys
__________________________________________________________________
- 1.1. Overview
- 1.2. Dependencies
- 1.3. Parameters
+ List of Examples
- 1.3.1. db_url (string)
- 1.3.2. transl_tbl (string) := "cfg_transl"
- 1.3.3. custom_tbl (string) := "cfg_custom"
+ 1. Example db_url
+ 2. Content of tables
- 1.4. Examples
-
-1.1. Overview
+1. Overview
The module implements a database driver for the configuration
parameters API. When configuration parameters are being declared
(typically when starting) API then driver is notified and has chance to
set value (of any parameter) based on value taken from database. It's
primarily targeted for interfacing with 3rd party software which is
- aware of configuration.
+ aware of the Kamailio configuration.
- Parameter is uniquely identified by group_name plus name, which is used
- by the driver to check if a value can be found. Because configuration
- parameters may be spread in many tables, a translation table is used to
- indicate where to start searching. Multiple look-up tables may be
- defined for single parameter, tables are searched in the first round by
- exact match until parameter is found, all tables listed with wildcard
- (asterisk) in group name are searched in the second round. If a
- parameter is not found then its value is left unchanged.
+ A parameter is uniquely identified by a group_name plus a name, which
+ is used by the driver to check if a value can be found. Because
+ configuration parameters may be spread in many tables, a translation
+ table is used to indicate where to start searching. Multiple look-up
+ tables may be defined for single parameter, tables are searched in the
+ first round by exact match until parameter is found, all tables listed
+ with wildcard (asterisk) in group name are searched in the second
+ round. If a parameter is not found then its value is left unchanged.
Configuration parameters are normally declared in C code and this
module additionally supports also declaring custom parameters in extra
@@ -46,13 +41,17 @@ Tomas Mandys
running. It just declares variables and assigns values when SER is
starting. That's all.
-1.2. Dependencies
+2. Dependencies
A loaded database module.
-1.3. Parameters
+3. Parameters
+
+ 3.1. db_url (string)
+ 3.2. transl_tbl (string) := "cfg_transl"
+ 3.3. custom_tbl (string) := "cfg_custom"
-1.3.1. db_url (string)
+3.1. db_url (string)
Default database URL.
@@ -66,7 +65,7 @@ loadmodule("cfg_db.so");
modparam("cfg_db", "db_url", "mysql://SER:123@127.0.0.1:12345/SER");
...
-1.3.2. transl_tbl (string) := "cfg_transl"
+3.2. transl_tbl (string) := "cfg_transl"
Name of table used for pointing group_name+name into configuration
table. If empty/null field values are found then default values will be
@@ -76,12 +75,12 @@ modparam("cfg_db", "db_url", "mysql://SER:123@127.0.0.1:12345/SER");
matches all parameters and will be used if parameter is not explicitely
mentioned.
-1.3.3. custom_tbl (string) := "cfg_custom"
+3.3. custom_tbl (string) := "cfg_custom"
Name of table used for extra param declaration (group_name, name, type,
min/max value, description).
-1.4. Examples
+4. Examples
Example 2. Content of tables
cfg_transl table:
diff --git a/modules/cfg_db/doc/cfg_db.xml b/modules/cfg_db/doc/cfg_db.xml
index d6e655c..6b618bb 100644
--- a/modules/cfg_db/doc/cfg_db.xml
+++ b/modules/cfg_db/doc/cfg_db.xml
@@ -7,8 +7,9 @@
]>
-<section id="cfg_db" xmlns:xi="http://www.w3.org/2001/XInclude">
- <sectioninfo>
+<book id="cfg_db" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <bookinfo>
+ <title>The configuration database module - cfg_db</title>
<authorgroup>
<author>
<firstname>Tomas</firstname>
@@ -24,9 +25,8 @@
<holder>Tomas Mandys</holder>
</copyright>
- </sectioninfo>
+ </bookinfo>
- <title>cfg_db module</title>
<section id="cfg_db.overview">
<title>Overview</title>
<para>
@@ -35,10 +35,10 @@
API then driver is notified and has chance to set value (of any
parameter) based on value taken from database. It's primarily
targeted for interfacing with 3rd party software which is aware
- of configuration.
+ of the Kamailio configuration.
</para>
<para>
- Parameter is uniquely identified by <emphasis>group_name</emphasis> plus
+ A parameter is uniquely identified by a <emphasis>group_name</emphasis> plus a
<emphasis>name</emphasis>, which is used by the driver to check if a value can be found.
Because configuration parameters may be spread in many tables, a translation table
is used to indicate where to start searching. Multiple look-up tables may be
@@ -67,7 +67,7 @@
</para>
</section>
- <xi:include href="params.xml"/>
+ <xi:include href="cfg_db_params.xml"/>
<section id="cfg_db.examples">
<title>Examples</title>
@@ -108,5 +108,5 @@
</example>
</section>
-</section>
+</book>
diff --git a/modules/cfg_db/doc/params.xml b/modules/cfg_db/doc/cfg_db_params.xml
similarity index 100%
rename from modules/cfg_db/doc/params.xml
rename to modules/cfg_db/doc/cfg_db_params.xml
[View Less]