[sr-dev] [kamailio/kamailio] TMX module statistics reset not working (#820)

atilamtm notifications at github.com
Tue Oct 11 21:45:55 CEST 2016


I'm currently using version 4.4.2 and am having trouble trying to reset the statistics in the TMX module. According to its documentation, all statistics except “inuse_transactions” can be reset.

Checking the tmx_mod.c files for the statistics definition, I saw that the STAT_NO_RESET flag wasn't used for any statistic listed there (which seems odd because I think it should have been set for the inuse_transactions statistic):

`static stat_export_t mod_stats[] = {
        {"UAS_transactions",    STAT_IS_FUNC, (stat_var**)tmx_stats_uas_trans   },
        {"UAC_transactions",    STAT_IS_FUNC, (stat_var**)tmx_stats_uac_trans   },
        {"2xx_transactions",    STAT_IS_FUNC, (stat_var**)tmx_stats_trans_2xx   },
        {"3xx_transactions",    STAT_IS_FUNC, (stat_var**)tmx_stats_trans_3xx   },
        {"4xx_transactions",    STAT_IS_FUNC, (stat_var**)tmx_stats_trans_4xx   },
        {"5xx_transactions",    STAT_IS_FUNC, (stat_var**)tmx_stats_trans_5xx   },
        {"6xx_transactions",    STAT_IS_FUNC, (stat_var**)tmx_stats_trans_6xx   },
        {"inuse_transactions",  STAT_IS_FUNC, (stat_var**)tmx_stats_trans_inuse },
        {"active_transactions", STAT_IS_FUNC, (stat_var**)tmx_stats_trans_active},
        {"rpl_received",        STAT_IS_FUNC, (stat_var**)tmx_stats_rcv_rpls    },
        {"rpl_absorbed",        STAT_IS_FUNC, (stat_var**)tmx_stats_abs_rpls    },
        {"rpl_generated",       STAT_IS_FUNC, (stat_var**)tmx_stats_rld_loc_rpls},
        {"rpl_relayed",         STAT_IS_FUNC, (stat_var**)tmx_stats_rld_rcv_rpls},
        {"rpl_sent",            STAT_IS_FUNC, (stat_var**)tmx_stats_rld_tot_rpls},
        {0, 0, 0}
};`

 
All seems ok, but when I try to reset the stats, the command simply doesn't work. The values remain unaltered. The clear command doesn't work either, it just returns the current values.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/820
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20161011/8a384778/attachment.html>


More information about the sr-dev mailing list