Browse code

modules: readme files regenerated - misctest ... [skip ci]

Kamailio Dev authored on 07/09/2021 09:01:26
Showing 1 changed files
... ...
@@ -14,8 +14,11 @@ Andrei Pelinescu-Onciul
14 14
         1. Overview
15 15
         2. Parameters
16 16
 
17
-              2.1. memory
18
-              2.2. mem_check_content
17
+              2.1. memory (int)
18
+              2.2. mem_check_content (int)
19
+              2.3. message (int)
20
+              2.4. message_data (str)
21
+              2.5. message_file (str)
19 22
 
20 23
         3. Functions
21 24
 
... ...
@@ -41,17 +44,20 @@ Andrei Pelinescu-Onciul
41 44
    1.1. Set memory in the config file
42 45
    1.2. Set mem_check_content in the config file
43 46
    1.3. Set mem_check_content at runtime via kamcmd
44
-   1.4. men_alloc usage
45
-   1.5. mem_free usage
46
-   1.6. mt.mem_alloc usage
47
-   1.7. mt.mem_free usage
48
-   1.8. mt.mem_used usage
49
-   1.9. mt.mem_rnd_alloc usage
50
-   1.10. mt.mem_test_start usage
51
-   1.11. mt.mem_test_stop usage
52
-   1.12. mt.mem_test_destroy usage
53
-   1.13. mt.mem_test_destroy_all usage
54
-   1.14. mt.mem_test_list usage
47
+   1.4. Set message in the config file
48
+   1.5. Set message_data in the config file
49
+   1.6. Set message_file in the config file
50
+   1.7. men_alloc usage
51
+   1.8. mem_free usage
52
+   1.9. mt.mem_alloc usage
53
+   1.10. mt.mem_free usage
54
+   1.11. mt.mem_used usage
55
+   1.12. mt.mem_rnd_alloc usage
56
+   1.13. mt.mem_test_start usage
57
+   1.14. mt.mem_test_stop usage
58
+   1.15. mt.mem_test_destroy usage
59
+   1.16. mt.mem_test_destroy_all usage
60
+   1.17. mt.mem_test_list usage
55 61
 
56 62
 Chapter 1. Admin Guide
57 63
 
... ...
@@ -60,8 +66,11 @@ Chapter 1. Admin Guide
60 66
    1. Overview
61 67
    2. Parameters
62 68
 
63
-        2.1. memory
64
-        2.2. mem_check_content
69
+        2.1. memory (int)
70
+        2.2. mem_check_content (int)
71
+        2.3. message (int)
72
+        2.4. message_data (str)
73
+        2.5. message_file (str)
65 74
 
66 75
    3. Functions
67 76
 
... ...
@@ -94,10 +103,13 @@ Warning
94 103
 
95 104
 2. Parameters
96 105
 
97
-   2.1. memory
98
-   2.2. mem_check_content
106
+   2.1. memory (int)
107
+   2.2. mem_check_content (int)
108
+   2.3. message (int)
109
+   2.4. message_data (str)
110
+   2.5. message_file (str)
99 111
 
100
-2.1. memory
112
+2.1. memory (int)
101 113
 
102 114
    Initialize for memory testing. Set it to 1 to prepare the memory
103 115
    testing.
... ...
@@ -105,9 +117,11 @@ Warning
105 117
    Default: 0 (off).
106 118
 
107 119
    Example 1.1.  Set memory in the config file
120
+...
108 121
 modparam("misctest", "memory", 1)
122
+...
109 123
 
110
-2.2. mem_check_content
124
+2.2. mem_check_content (int)
111 125
 
112 126
    When doing the tests, check also for the possibility of the memory
113 127
    being overwritten. When activated, the allocated memory will be filled
... ...
@@ -118,10 +132,47 @@ modparam("misctest", "memory", 1)
118 132
    It can be changed also at runtime, via the rpc interface.
119 133
 
120 134
    Example 1.2.  Set mem_check_content in the config file
135
+...
121 136
 modparam("misctest", "mem_check_content", 1)
137
+...
122 138
 
123 139
    Example 1.3.  Set mem_check_content at runtime via kamcmd
140
+...
124 141
 $ kamcmd cfg.seti misctest mem_check_content 1
142
+...
143
+
144
+2.3. message (int)
145
+
146
+   Initialize and perform message testing.
147
+
148
+   Default: 0 (off).
149
+
150
+   Example 1.4.  Set message in the config file
151
+...
152
+modparam("misctest", "message", 1)
153
+...
154
+
155
+2.4. message_data (str)
156
+
157
+   Set SIP message data for testing.
158
+
159
+   Default: NULL (not set).
160
+
161
+   Example 1.5.  Set message_data in the config file
162
+...
163
+modparam("misctest", "message_data", "...")
164
+...
165
+
166
+2.5. message_file (str)
167
+
168
+   Set path to file from where to read SIP message data for testing.
169
+
170
+   Default: NULL (not set).
171
+
172
+   Example 1.6.  Set message_file in the config file
173
+...
174
+modparam("misctest", "message_file", "/tmp/sip-data.txt")
175
+...
125 176
 
126 177
 3. Functions
127 178
 
... ...
@@ -137,7 +188,7 @@ Note
137 188
    This is a debugging function for simulating memory leaks or stressing
138 189
    the memory allocator. It should not be used in production setups
139 190
 
140
-   Example 1.4. men_alloc usage
191
+   Example 1.7. men_alloc usage
141 192
 ...
142 193
 mem_alloc(1048576); # 1MB
143 194
 ...
... ...
@@ -151,7 +202,7 @@ Note
151 202
    This is a debugging function for simulating memory leaks or stressing
152 203
    the memory allocator. It should not be used in production setups
153 204
 
154
-   Example 1.5. mem_free usage
205
+   Example 1.8. mem_free usage
155 206
 ...
156 207
 mem_free();
157 208
 ...
... ...
@@ -177,7 +228,7 @@ mem_free();
177 228
      * m - MB
178 229
      * g - GB
179 230
 
180
-   Example 1.6. mt.mem_alloc usage
231
+   Example 1.9. mt.mem_alloc usage
181 232
  $ kamcmd mt.mem_alloc 10 k
182 233
 
183 234
 4.2.  mt.mem_free [size] [unit]
... ...
@@ -193,7 +244,7 @@ mem_free();
193 244
      * m - MB
194 245
      * g - GB
195 246
 
196
-   Example 1.7. mt.mem_free usage
247
+   Example 1.10. mt.mem_free usage
197 248
  $ kamcmd mt.mem_free 1 m
198 249
 
199 250
 4.3.  mt.mem_used [unit]
... ...
@@ -207,7 +258,7 @@ mem_free();
207 258
      * m - MB
208 259
      * g - GB
209 260
 
210
-   Example 1.8. mt.mem_used usage
261
+   Example 1.11. mt.mem_used usage
211 262
  $ kamcmd mt.mem_used
212 263
 9221460
213 264
 
... ...
@@ -217,7 +268,7 @@ mem_free();
217 268
    max (inclusive). unit is optional and represents the unit for all the
218 269
    given sizes (see above).
219 270
 
220
-   Example 1.9. mt.mem_rnd_alloc usage
271
+   Example 1.12. mt.mem_rnd_alloc usage
221 272
  $ kamcmd mt.mem_rnd_alloc 1 64 10240 k
222 273
 
223 274
 4.5.  mt.mem_test_start min max total min_int max_int total_time [unit]
... ...
@@ -234,7 +285,7 @@ mem_free();
234 285
 
235 286
    Returns the test id.
236 287
 
237
-   Example 1.10. mt.mem_test_start usage
288
+   Example 1.13. mt.mem_test_start usage
238 289
  $ kamcmd mt.mem_test_start 15 64 25000 128 1500 3600000 k
239 290
 1
240 291
 
... ...
@@ -242,7 +293,7 @@ mem_free();
242 293
 
243 294
    Stops the test identified by id.
244 295
 
245
-   Example 1.11. mt.mem_test_stop usage
296
+   Example 1.14. mt.mem_test_stop usage
246 297
  $ kamcmd mt.mem_test_stop 1
247 298
 
248 299
 4.7.  mt.mem_test_destroy id
... ...
@@ -250,14 +301,14 @@ mem_free();
250 301
    Destroys the test identified by id (besides stopping it, it also frees
251 302
    all the data, including the statistics).
252 303
 
253
-   Example 1.12. mt.mem_test_destroy usage
304
+   Example 1.15. mt.mem_test_destroy usage
254 305
  $ kamcmd mt.mem_test_destroy 1
255 306
 
256 307
 4.8.  mt.mem_test_destroy_all id
257 308
 
258 309
    Destroys all the running or stopped tests.
259 310
 
260
-   Example 1.13. mt.mem_test_destroy_all usage
311
+   Example 1.16. mt.mem_test_destroy_all usage
261 312
  $ kamcmd mt.mem_test_destroy_all
262 313
 
263 314
 4.9.  mt.mem_test_list [id] [unit]
... ...
@@ -268,7 +319,7 @@ mem_free();
268 319
    unit is optional. The default is is bytes (for all the possible units
269 320
    see above).
270 321
 
271
-   Example 1.14. mt.mem_test_list usage
322
+   Example 1.17. mt.mem_test_list usage
272 323
  $ kamcmd mt.mem_test_list
273 324
 {
274 325
         ID           : 2