[SR-Users] Strange behavior with $shtinc

Daniel-Constantin Mierla miconda at gmail.com
Thu May 31 21:52:05 CEST 2018


Did you monitor the values of those statistics over the time? If yes,
was there a moment when the value evolved unexpected?

Cheers,
Daniel


On 31.05.18 19:30, Brooks Bridges wrote:
>
> Let me preface this with the statement that as best I can tell from
> docs and code, this function is supposed to be 100% atomic and this
> shouldn’t be able to happen.  I also have not found anything in the
> module’s github commit logs that would indicate this behavior has
> changed from previous versions.
>
>  
>
> That being said, I appear to have run into an oddity where
> intermittently I’m getting 2 slots being put in the same entry, which
> results in trying to parse the output for graphing and reporting not
> working quite right.  The mechanism I’m using is a very simple counter
> mechanism to record statistics about calls.  As an example, I am using
> the following mechanism:
>
>  
>
> $var(z) = $shtinc(callstats=>$avp(realm),cps_exceeded);
>
> or
>
> $var(z) = $shtinc(callstats=>$avp(realm),sessions_exceeded);
>
>  
>
> This typically results in something like this:
>
>  
>
> {
>
>         entry: 4335
>
>         size: 1
>
>         slot: {
>
>                 {
>
>                         name: realm1,total_requests
>
>                         value: 2365034
>
>                         type: int
>
>                 }
>
>         }
>
> }
>
> {
>
>         entry: 4532
>
>         size: 1
>
>         slot: {
>
>                 {
>
>                         name: realm2,cps_exceeded
>
>                         value: 30
>
>                         type: int
>
>                 }
>
>         }
>
> }
>
> And so on…  However, one or more of them sometimes end up like this:
>
>  
>
> {
>
>         entry: 4646
>
>         size: 2
>
>         slot: {
>
>                 {
>
>                         name: realm1,total_requests
>
>                         value: 15958026
>
>                         type: int
>
>                 }
>
>                 {
>
>                         name: realm2,cps_exceeded
>
>                         value: 6432103
>
>                         type: int
>
>                 }
>
>         }
>
> }
>
>  
>
> Thanks in advance for your help and/or suggestions!
>
>  
>
> *Brooks Bridges | *Engineering Manager
>
> *O^1 Communications*
>
> 4359 Town Center Boulevard, Suite 217
>
> El Dorado Hills, California 95762
>
> *office:*916.235.2097 |*main:*888.444.1111, Option 2
>
> *email:*bbridges at o1.com <mailto:bbridges at o1.com> | *web:*www.o1.com
> <http://www.o1.com/>
>
>  
>
>
>
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users at lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio World Conference -- www.kamailioworld.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20180531/d944cde2/attachment.html>


More information about the sr-users mailing list