[Devel] RE: [Users] How to get statistics from the dialog module.
Leonid Fainshtein
LFAIN at ipgear.net
Tue Dec 19 14:33:10 CET 2006
Bogdan,
Hi Bogdan,
You are rigth as usual.
Thank you very much,
Leonid
-----Original Message-----
From: Bogdan-Andrei Iancu [mailto:bogdan at voice-system.ro]
Sent: Tuesday, December 19, 2006 11:26 AM
To: Leonid Fainshtein
Cc: devel
Subject: Re: [Users] How to get statistics from the dialog module.
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
>
>
>
********************************************
This outgoing mail message was scanned by McAfee GroupShield Engine
%tn%
More information about the Devel
mailing list