Browse code

-first version of a global Statistics Manager (core and modules exports statistics variables to the Manager which is centralized collector and access point for fetching statististics. -module interfaces updated to export statistics (none so far) -some basic statistics exported by core - how many replies/request were received, how many were dropped by script/callbacks and how many were bogus. -new compilation define STATISTICS - if the statistics manaer and collection should be compiled or not (default no) WARNING - this is still under developement, so it may not be so stable ;)

git-svn-id: https://openser.svn.sourceforge.net/svnroot/openser/trunk@551 689a6050-402a-0410-94f2-e92a70836424

Bogdan-Andrei Iancu authored on 24/01/2006 19:15:09
Showing 49 changed files
... ...
@@ -281,6 +281,7 @@ struct module_exports exports= {
281 281
 	"acc",
282 282
 	cmds,       /* exported functions */
283 283
 	params,     /* exported params */
284
+	0,          /* exported statistics */
284 285
 	mod_init,   /* initialization module */
285 286
 	0,          /* response function */
286 287
 	destroy,    /* destroy function */
... ...
@@ -103,6 +103,7 @@ struct module_exports exports = {
103 103
 	"alias_db", 
104 104
 	cmds,       /* Exported functions */
105 105
 	params,     /* Exported parameters */
106
+	0,          /* exported statistics */
106 107
 	mod_init,   /* module initialization function */
107 108
 	0,          /* response function */
108 109
 	destroy,    /* destroy function */
... ...
@@ -149,6 +149,7 @@ struct module_exports exports = {
149 149
 	"auth", 
150 150
 	cmds,
151 151
 	params,
152
+	0,          /* exported statistics */
152 153
 	mod_init,   /* module initialization function */
153 154
 	0,          /* response function */
154 155
 	destroy,    /* destroy function */
... ...
@@ -143,6 +143,7 @@ struct module_exports exports = {
143 143
 	"auth_db", 
144 144
 	cmds,       /* Exported functions */
145 145
 	params,     /* Exported parameters */
146
+	0,          /* exported statistics */
146 147
 	mod_init,   /* module initialization function */
147 148
 	0,          /* response function */
148 149
 	destroy,    /* destroy function */
... ...
@@ -103,6 +103,7 @@ struct module_exports exports = {
103 103
 	"auth_diameter", 
104 104
 	cmds,       	/* Exported functions */
105 105
 	params,     	/* Exported parameters */
106
+	0,          	/* exported statistics */
106 107
 	mod_init,   	/* module initialization function */
107 108
 	0,          	/* response function */
108 109
 	0,          	/* destroy function */
... ...
@@ -89,6 +89,7 @@ struct module_exports exports = {
89 89
 	"auth_radius", 
90 90
 	cmds,       /* Exported functions */
91 91
 	params,     /* Exported parameters */
92
+	0,          /* exported statistics */
92 93
 	mod_init,   /* module initialization function */
93 94
 	0,          /* response function */
94 95
 	0,          /* destroy function */
... ...
@@ -97,6 +97,7 @@ struct module_exports exports = {
97 97
 	"avp_radius", 
98 98
 	cmds,      /* Exported commands */
99 99
 	params,    /* Exported parameters */
100
+	0,         /* exported statistics */
100 101
 	mod_init,  /* module initialization function */
101 102
 	0,         /* response function*/
102 103
 	0,         /* destroy function */
... ...
@@ -151,6 +151,7 @@ struct module_exports exports = {
151 151
 	"avpops",
152 152
 	cmds,     /* Exported functions */
153 153
 	params,   /* Exported parameters */
154
+	0,          /* exported statistics */
154 155
 	avpops_init, /* Module initialization function */
155 156
 	(response_function) 0,
156 157
 	(destroy_function) 0,
... ...
@@ -144,6 +144,7 @@ struct module_exports exports = {
144 144
 	"cpl-c",
145 145
 	cmds,     /* Exported functions */
146 146
 	params,   /* Exported parameters */
147
+	0,        /* exported statistics */
147 148
 	cpl_init, /* Module initialization function */
148 149
 	(response_function) 0,
149 150
 	(destroy_function) cpl_exit,
... ...
@@ -71,6 +71,7 @@ struct module_exports exports = {
71 71
 	"dbtext",
72 72
 	cmds,     /* Exported functions */
73 73
 	params,   /* Exported parameters */
74
+	0,          /* exported statistics */
74 75
 	mod_init, /* module initialization function */
75 76
 	0,        /* response function*/
76 77
 	destroy,  /* destroy function */
... ...
@@ -100,7 +100,7 @@ struct module_exports exports= {
100 100
 	"dispatcher",
101 101
 	cmds,
102 102
 	params,
103
-	
103
+	0,          /* exported statistics */
104 104
 	mod_init,   /* module initialization function */
105 105
 	(response_function) 0,
106 106
 	(destroy_function) destroy,
... ...
@@ -82,6 +82,7 @@ struct module_exports exports = {
82 82
 	"diversion", 
83 83
 	cmds,       /* Exported functions */
84 84
 	params,     /* Exported parameters */
85
+	0,          /* exported statistics */
85 86
 	mod_init,   /* module initialization function */
86 87
 	0,          /* response function */
87 88
 	0,          /* destroy function */
... ...
@@ -112,6 +112,7 @@ struct module_exports exports = {
112 112
 	"domain", 
113 113
 	cmds,      /* Exported functions */
114 114
 	params,    /* Exported parameters */
115
+	0,         /* exported statistics */
115 116
 	mod_init,  /* module initialization function */
116 117
 	0,         /* response function*/
117 118
 	destroy,   /* destroy function */
... ...
@@ -82,8 +82,8 @@ static cmd_export_t cmds[] = {
82 82
  * Exported parameters
83 83
  */
84 84
 static param_export_t params[] = {
85
-        {"domain_suffix", STR_PARAM, &domain_suffix},
86
-        {"tel_uri_params", STR_PARAM, &tel_uri_params},
85
+	{"domain_suffix", STR_PARAM, &domain_suffix},
86
+	{"tel_uri_params", STR_PARAM, &tel_uri_params},
87 87
 	{0, 0, 0}
88 88
 };
89 89
 
... ...
@@ -95,6 +95,7 @@ struct module_exports exports = {
95 95
 	"enum", 
96 96
 	cmds,     /* Exported functions */
97 97
 	params,   /* Exported parameters */
98
+	0,        /* exported statistics */
98 99
 	mod_init, /* module initialization function */
99 100
 	0,        /* response function*/
100 101
 	0,        /* destroy function */
... ...
@@ -82,6 +82,7 @@ struct module_exports exports= {
82 82
 	"exec",
83 83
 	cmds,           /* Exported functions */
84 84
 	params,         /* Exported parameters */
85
+	0,              /* exported statistics */
85 86
 	mod_init, 	/* initialization module */
86 87
 	0,		/* response function */
87 88
 	exec_shutdown,	/* destroy function */
... ...
@@ -92,6 +92,7 @@ struct module_exports exports = {
92 92
 	"flatstore",
93 93
 	cmds,
94 94
 	params,      /*  module parameters */
95
+	0,           /* exported statistics */
95 96
 	mod_init,    /* module initialization function */
96 97
 	0,           /* response function*/
97 98
 	mod_destroy, /* destroy function */
... ...
@@ -93,7 +93,7 @@ struct module_exports exports = {
93 93
 	"gflags", 
94 94
 	cmds,
95 95
 	params,
96
-	
96
+	0,        /* exported statistics */
97 97
 	mod_init, /* module initialization function */
98 98
 	0,        /* response function*/
99 99
 	0,        /* destroy function */
... ...
@@ -156,6 +156,7 @@ struct module_exports exports = {
156 156
 	"group", 
157 157
 	cmds,       /* Exported functions */
158 158
 	params,     /* Exported parameters */
159
+	0,          /* exported statistics */
159 160
 	mod_init,   /* module initialization function */
160 161
 	0,          /* response function */
161 162
 	destroy,    /* destroy function */
... ...
@@ -83,6 +83,7 @@ struct module_exports exports = {
83 83
 	"group_radius", 
84 84
 	cmds,       /* Exported functions */
85 85
 	params,     /* Exported parameters */
86
+	0,          /* exported statistics */
86 87
 	mod_init,   /* module initialization function */
87 88
 	0,          /* response function */
88 89
 	0,          /* destroy function */
... ...
@@ -170,6 +170,7 @@ struct module_exports exports= {
170 170
 	"jabber",
171 171
 	cmds,       /* Exported functions */
172 172
 	params,     /* Exported parameters */
173
+	0,          /* exported statistics */
173 174
 	mod_init,   /* module initialization function */
174 175
 	(response_function) 0,
175 176
 	(destroy_function) destroy,
... ...
@@ -278,6 +278,7 @@ struct module_exports exports = {
278 278
 	"lcr", 
279 279
 	cmds,      /* Exported functions */
280 280
 	params,    /* Exported parameters */
281
+	0,          /* exported statistics */
281 282
 	mod_init,  /* module initialization function */
282 283
 	0,         /* response function */
283 284
 	destroy,   /* destroy function */
... ...
@@ -110,6 +110,7 @@ struct module_exports exports = {
110 110
 	"mangler",
111 111
 	cmds,			/* Exported functions */
112 112
 	params,			/* Exported parameters */
113
+	0,				/* exported statistics */
113 114
 	mod_init,		/* module initialization function */
114 115
 	0,			/* response function */
115 116
 	destroy,		/* destroy function */
... ...
@@ -80,6 +80,7 @@ struct module_exports exports= {
80 80
 	"maxfwd",
81 81
 	cmds,
82 82
 	params,
83
+	0,          /* exported statistics */
83 84
 	mod_init,
84 85
 	(response_function) 0,
85 86
 	(destroy_function) 0,
... ...
@@ -206,6 +206,7 @@ struct module_exports exports = {
206 206
     "mediaproxy", // module name
207 207
     commands,     // module exported functions
208 208
     parameters,   // module exported parameters
209
+	0,            /* exported statistics */
209 210
     mod_init,     // module init (before any kid is created. kids will inherit)
210 211
     NULL,         // reply processing
211 212
     NULL,         // destroy function
... ...
@@ -184,7 +184,7 @@ struct module_exports exports= {
184 184
 	"msilo",    /* module id */
185 185
 	cmds,       /* module's exported functions */
186 186
 	params,     /* module's exported parameters */
187
-	
187
+	0,          /* exported statistics */
188 188
 	mod_init,   /* module initialization function */
189 189
 	(response_function) 0,       /* response handler */
190 190
 	(destroy_function) destroy,  /* module destroy function */
... ...
@@ -74,6 +74,7 @@ struct module_exports exports = {
74 74
 	"mysql",
75 75
 	cmds,
76 76
 	params,          /*  module parameters */
77
+	0,               /* exported statistics */
77 78
 	mysql_mod_init,  /* module initialization function */
78 79
 	0,               /* response function*/
79 80
 	0,               /* destroy function */
... ...
@@ -329,6 +329,7 @@ struct module_exports exports = {
329 329
 	"nathelper",
330 330
 	cmds,
331 331
 	params,
332
+	0, /* exported statistics */
332 333
 	mod_init,
333 334
 	0, /* reply processing */
334 335
 	0, /* destroy function */
... ...
@@ -74,6 +74,7 @@ struct module_exports exports = {
74 74
 	"options",       /* Module name */
75 75
 	cmds,            /* Exported functions */
76 76
 	params,          /* Exported parameters */
77
+	0,               /* exported statistics */
77 78
 	mod_init,        /* Initialization function */
78 79
 	0,               /* Response function */
79 80
 	0,               /* Destroy function */
... ...
@@ -121,7 +121,7 @@ struct module_exports exports = {
121 121
 	"osp", 
122 122
 	cmds,
123 123
 	params,
124
-	
124
+	0,          /* exported statistics */
125 125
 	mod_init,   /* module initialization function */
126 126
 	0,          /* response function*/
127 127
 	mod_destroy,/* destroy function */
... ...
@@ -129,6 +129,7 @@ struct module_exports exports = {
129 129
 	"pa", 
130 130
 	cmds,        /* Exported functions */
131 131
 	params,      /* Exported parameters */
132
+	0,           /* exported statistics */
132 133
 	pa_mod_init, /* module initialization function */
133 134
 	0,           /* response function*/
134 135
 	pa_destroy,  /* destroy function */
... ...
@@ -123,7 +123,7 @@ struct module_exports exports = {
123 123
 	"pdt",
124 124
 	cmds,
125 125
 	params,
126
-	
126
+	0,				/* exported statistics */
127 127
 	mod_init,		/* module initialization function */
128 128
 	0,				/* response function */
129 129
 	mod_destroy,	/* destroy function */
... ...
@@ -123,14 +123,15 @@ static param_export_t params[] = {
123 123
 
124 124
 /* Module interface */
125 125
 struct module_exports exports = {
126
-        "permissions",
127
-        cmds,      /* Exported functions */
128
-        params,    /* Exported parameters */
129
-        mod_init,  /* module initialization function */
130
-        0,         /* response function */
131
-        mod_exit,  /* destroy function */
132
-        0,         /* oncancel function */
133
-        child_init /* child initialization function */
126
+	"permissions",
127
+	cmds,      /* Exported functions */
128
+	params,    /* Exported parameters */
129
+	0,         /* exported statistics */
130
+	mod_init,  /* module initialization function */
131
+	0,         /* response function */
132
+	mod_exit,  /* destroy function */
133
+	0,         /* oncancel function */
134
+	child_init /* child initialization function */
134 135
 };
135 136
 
136 137
 
... ...
@@ -85,7 +85,7 @@ struct module_exports exports= {
85 85
 	"pike",
86 86
 	cmds,
87 87
 	params,
88
-	
88
+	0,           /* exported statistics */
89 89
 	pike_init,   /* module initialization function */
90 90
 	(response_function) 0,
91 91
 	(destroy_function) pike_exit,   /* module exit function */
... ...
@@ -61,7 +61,7 @@ struct module_exports exports = {
61 61
 	"postgres",
62 62
 	cmds,
63 63
 	0,   /*  module parameters */
64
-
64
+	0,   /* exported statistics */
65 65
 	mod_init, /* module initialization function */
66 66
 	0,        /* response function*/
67 67
 	0,        /* destroy function */
... ...
@@ -159,6 +159,7 @@ struct module_exports exports = {
159 159
 	"registrar", 
160 160
 	cmds,        /* Exported functions */
161 161
 	params,      /* Exported parameters */
162
+	0,           /* exported statistics */
162 163
 	mod_init,    /* module initialization function */
163 164
 	0,
164 165
 	mod_destroy, /* destroy function */
... ...
@@ -121,6 +121,7 @@ struct module_exports exports = {
121 121
 	"rr",
122 122
 	cmds,        /* Exported functions */
123 123
 	params,      /* Exported parameters */
124
+	0,           /* exported statistics */
124 125
 	mod_init,    /* initialize module */
125 126
 	0,           /* response function*/
126 127
 	mod_destroy, /* destroy function */
... ...
@@ -69,7 +69,7 @@ struct module_exports exports= {
69 69
 	"sl_module",
70 70
 	cmds,
71 71
 	0, /* param exports */
72
-	
72
+	0,          /* exported statistics */
73 73
 	mod_init,   /* module initialization function */
74 74
 	(response_function) 0,
75 75
 	mod_destroy,
... ...
@@ -105,7 +105,7 @@ struct module_exports exports= {
105 105
 	"sms",
106 106
 	cmds,
107 107
 	params,
108
-	
108
+	0,          /* exported statistics */
109 109
 	sms_init,   /* module initialization function */
110 110
 	(response_function) 0,
111 111
 	(destroy_function) sms_exit,   /* module exit function */
... ...
@@ -103,6 +103,7 @@ struct module_exports exports = {
103 103
 	"speeddial", 
104 104
 	cmds,       /* Exported functions */
105 105
 	params,     /* Exported parameters */
106
+	0,          /* exported statistics */
106 107
 	mod_init,   /* module initialization function */
107 108
 	0,          /* response function */
108 109
 	destroy,    /* destroy function */
... ...
@@ -156,6 +156,7 @@ struct module_exports exports= {
156 156
 	"textops",
157 157
 	cmds,
158 158
 	params,
159
+	0,        /* exported statistics */
159 160
 	mod_init, /* module initialization function */
160 161
 	0, /* response function */
161 162
 	0,  /* destroy function */
... ...
@@ -299,7 +299,7 @@ struct module_exports exports= {
299 299
 	cmds,
300 300
 	/* ------------ exported variables ---------- */
301 301
 	params,
302
-	
302
+	0,        /* exported statistics */
303 303
 	mod_init, /* module initialization function */
304 304
 	(response_function) reply_received,
305 305
 	(destroy_function) tm_shutdown,
... ...
@@ -96,6 +96,7 @@ struct module_exports exports= {
96 96
 	"uac",
97 97
 	cmds,       /* exported functions */
98 98
 	params,     /* param exports */
99
+	0,          /* exported statistics */
99 100
 	mod_init,   /* module initialization function */
100 101
 	(response_function) 0,
101 102
 	mod_destroy,
... ...
@@ -93,6 +93,7 @@ struct module_exports exports = {
93 93
 	"uac_redirect",
94 94
 	cmds,     /* Exported functions */
95 95
 	params,   /* Exported parameters */
96
+	0,        /* exported statistics */
96 97
 	redirect_init, /* Module initialization function */
97 98
 	(response_function) 0,
98 99
 	(destroy_function) 0,
... ...
@@ -68,11 +68,12 @@ static param_export_t params[] = {
68 68
 struct module_exports exports = {	
69 69
 	"unixodbc",
70 70
 	cmds,
71
-	params,          /*  module parameters */
72
-	0,               /* module initialization function */
73
-	0,               /* response function*/
74
-	0,               /* destroy function */
75
-	0,               /* oncancel function */
76
-	0                /* per-child init function */
71
+	params,     /*  module parameters */
72
+	0,          /* exported statistics */
73
+	0,          /* module initialization function */
74
+	0,          /* response function*/
75
+	0,          /* destroy function */
76
+	0,          /* oncancel function */
77
+	0           /* per-child init function */
77 78
 };
78 79
 
... ...
@@ -80,9 +80,10 @@ struct module_exports exports = {
80 80
 	"uri", 
81 81
 	cmds,      /* Exported functions */
82 82
 	params,    /* Exported parameters */
83
+	0,         /* exported statistics */
83 84
 	0,         /* module initialization function */
84 85
 	0,         /* response function */
85
-        0,         /* destroy function */
86
+	0,         /* destroy function */
86 87
 	0,         /* oncancel function */
87 88
 	0          /* child initialization function */
88 89
 };
... ...
@@ -126,6 +126,7 @@ struct module_exports exports = {
126 126
 	"uri_db", 
127 127
 	cmds,      /* Exported functions */
128 128
 	params,    /* Exported parameters */
129
+	0,          /* exported statistics */
129 130
 	mod_init,  /* module initialization function */
130 131
 	0,         /* response function */
131 132
 	destroy,   /* destroy function */
... ...
@@ -77,6 +77,7 @@ struct module_exports exports = {
77 77
 	"uri_radius", 
78 78
 	cmds,       /* Exported functions */
79 79
 	params,     /* Exported parameters */
80
+	0,          /* exported statistics */
80 81
 	mod_init,   /* module initialization function */
81 82
 	0,          /* response function */
82 83
 	0,          /* destroy function */
... ...
@@ -175,6 +175,7 @@ struct module_exports exports = {
175 175
 	"usrloc",
176 176
 	cmds,       /* Exported functions */
177 177
 	params,     /* Export parameters */
178
+	0,          /* exported statistics */
178 179
 	mod_init,   /* Module initialization function */
179 180
 	0,          /* Response function */
180 181
 	destroy,    /* Destroy function */
... ...
@@ -81,7 +81,7 @@ struct module_exports exports= {
81 81
 	"xlog",
82 82
 	cmds,
83 83
 	params,
84
-	
84
+	0,          /* exported statistics */
85 85
 	mod_init,   /* module initialization function */
86 86
 	(response_function) 0,
87 87
 	(destroy_function) destroy,