[Devel] Re: [Users] How to get statistics from the dialog module.

Bogdan-Andrei Iancu bogdan at voice-system.ro
Tue Dec 19 10:25:46 CET 2006


Hi Leonid,

I moved the thread on devel list as it more appropriate.

note that the statistic name does not include the module name, so do:
   

strcpy( szStatisticName, "active_dialogs");


regards,
bogdan

Leonid Fainshtein wrote:

>Hi,
>I can't get dialog:active_dialogs statistic in my custom module.
>
>There is a fragment of my code:
>
>    stat_var *psvActive_dlg_stat;
>    str     sActive_dlg;
>    long    lCurrentNumActiveDlg =0;
>    char    szStatisticName[ 25];
>
>    strcpy( szStatisticName, "dialog:active_dialogs");
>    sActive_dlg.s = szStatisticName;
>    sActive_dlg.len = strlen( szStatisticName);
>    psvActive_dlg_stat = get_stat( &sActive_dlg );
>    if (psvActive_dlg_stat)
>        lCurrentNumActiveDlg = get_stat_val( psvActive_dlg_stat );
>....
>
>The problem is that get_stat() always returns 0. 
>
>Also I get error when I try to get the statistic by using openserctl:
>
># openserctl fifo get_statistics dialog:active_dialogs
>404 Statistic not found
>
>But the following works ok:
>ClaroSIS22:/usr/local/sbin# openserctl fifo get_statistics dialog:
>200 OK
>Module name = dialog; statistics=3
>dialog:active_dialogs = 0
>dialog:processed_dialogs = 0
>dialog:expired_dialogs = 0
>
>What could be the problem?
>
>Thank you in advance,
>Leonid Fainshtein
> 
> 
>
>
>********************************************
>This outgoing mail message was scanned by McAfee GroupShield Engine
>%tn%
>
>_______________________________________________
>Users mailing list
>Users at openser.org
>http://openser.org/cgi-bin/mailman/listinfo/users
>
>  
>




More information about the Devel mailing list