<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Did you monitor the values of those statistics over the time? If
yes, was there a moment when the value evolved unexpected?</p>
<p>Cheers,<br>
Daniel<br>
</p>
<br>
<div class="moz-cite-prefix">On 31.05.18 19:30, Brooks Bridges
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:BAF1A46B998EBE4F91AA2E2B27C053F05135ADC8@o1-exch02.o1.com">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<meta name="Generator" content="Microsoft Word 14 (filtered
medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:"Century Gothic";
panose-1:2 11 5 2 2 2 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal">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.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">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:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">$var(z) =
$shtinc(callstats=>$avp(realm),cps_exceeded);<o:p></o:p></p>
<p class="MsoNormal">or<o:p></o:p></p>
<p class="MsoNormal">$var(z) =
$shtinc(callstats=>$avp(realm),sessions_exceeded);<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">This typically results in something like
this:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">{<o:p></o:p></p>
<p class="MsoNormal"> entry: 4335<o:p></o:p></p>
<p class="MsoNormal"> size: 1<o:p></o:p></p>
<p class="MsoNormal"> slot: {<o:p></o:p></p>
<p class="MsoNormal"> {<o:p></o:p></p>
<p class="MsoNormal"> name:
realm1,total_requests<o:p></o:p></p>
<p class="MsoNormal"> value: 2365034<o:p></o:p></p>
<p class="MsoNormal"> type: int<o:p></o:p></p>
<p class="MsoNormal"> }<o:p></o:p></p>
<p class="MsoNormal"> }<o:p></o:p></p>
<p class="MsoNormal">}<o:p></o:p></p>
<p class="MsoNormal">{<o:p></o:p></p>
<p class="MsoNormal"> entry: 4532<o:p></o:p></p>
<p class="MsoNormal"> size: 1<o:p></o:p></p>
<p class="MsoNormal"> slot: {<o:p></o:p></p>
<p class="MsoNormal"> {<o:p></o:p></p>
<p class="MsoNormal"> name:
realm2,cps_exceeded<o:p></o:p></p>
<p class="MsoNormal"> value: 30<o:p></o:p></p>
<p class="MsoNormal"> type: int<o:p></o:p></p>
<p class="MsoNormal"> }<o:p></o:p></p>
<p class="MsoNormal"> }<o:p></o:p></p>
<p class="MsoNormal">}<o:p></o:p></p>
<p class="MsoNormal">And so on… However, one or more of them
sometimes end up like this:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">{<o:p></o:p></p>
<p class="MsoNormal"> entry: 4646<o:p></o:p></p>
<p class="MsoNormal"> size: 2<o:p></o:p></p>
<p class="MsoNormal"> slot: {<o:p></o:p></p>
<p class="MsoNormal"> {<o:p></o:p></p>
<p class="MsoNormal"> name:
realm1,total_requests<o:p></o:p></p>
<p class="MsoNormal"> value: 15958026<o:p></o:p></p>
<p class="MsoNormal"> type: int<o:p></o:p></p>
<p class="MsoNormal"> }<o:p></o:p></p>
<p class="MsoNormal"> {<o:p></o:p></p>
<p class="MsoNormal"> name:
realm2,cps_exceeded<o:p></o:p></p>
<p class="MsoNormal"> value: 6432103<o:p></o:p></p>
<p class="MsoNormal"> type: int<o:p></o:p></p>
<p class="MsoNormal"> }<o:p></o:p></p>
<p class="MsoNormal"> }<o:p></o:p></p>
<p class="MsoNormal">}<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks in advance for your help and/or
suggestions!<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><b><span
style="font-size:8.0pt;font-family:"Century
Gothic","sans-serif";color:black">Brooks
Bridges |
</span></b><span
style="font-size:8.0pt;font-family:"Century
Gothic","sans-serif";color:black">Engineering
Manager<o:p></o:p></span></p>
<p class="MsoNormal"><b><span
style="font-size:8.0pt;font-family:"Century
Gothic","sans-serif";color:maroon">O<sup>1</sup>
Communications</span></b><span
style="font-size:8.0pt;font-family:"Century
Gothic","sans-serif";color:blue"><o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:7.0pt;font-family:"Century
Gothic","sans-serif";color:gray">4359 Town
Center Boulevard, Suite 217<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:7.0pt;font-family:"Century
Gothic","sans-serif";color:gray">El Dorado
Hills, California 95762<o:p></o:p></span></p>
<p class="MsoNormal"><b><span
style="font-size:7.0pt;font-family:"Century
Gothic","sans-serif";color:maroon">office:</span></b><span
style="font-size:7.0pt;font-family:"Century
Gothic","sans-serif";color:blue">
</span><span style="font-size:7.0pt;font-family:"Century
Gothic","sans-serif";color:black">916.235.2097
|</span><span
style="font-size:7.0pt;font-family:"Century
Gothic","sans-serif";color:blue">
</span><b><span
style="font-size:7.0pt;font-family:"Century
Gothic","sans-serif";color:maroon">main:</span></b><span
style="font-size:7.0pt;font-family:"Century
Gothic","sans-serif";color:black">
888.444.1111, Option 2</span><span
style="font-size:12.0pt;font-family:"Times New
Roman","serif";color:blue"><o:p></o:p></span></p>
<p class="MsoNormal"><b><span
style="font-size:7.0pt;font-family:"Century
Gothic","sans-serif";color:maroon">email:</span></b><span
style="font-size:7.0pt;font-family:"Century
Gothic","sans-serif";color:blue">
<a href="mailto:bbridges@o1.com" moz-do-not-send="true"><span
style="color:blue">bbridges@o1.com</span></a>
</span><span style="font-size:7.0pt;font-family:"Century
Gothic","sans-serif";color:black">| </span><b><span
style="font-size:7.0pt;font-family:"Century
Gothic","sans-serif";color:maroon">web:</span></b><span
style="font-size:7.0pt;font-family:"Century
Gothic","sans-serif";color:blue">
</span><span style="color:#1F497D"><a
href="http://www.o1.com/" moz-do-not-send="true"><span
style="font-size:7.0pt;font-family:"Century
Gothic","sans-serif";color:black">www.o1.com</span></a></span><span
style="color:blue"><o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<!--'"--><br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Kamailio (SER) - Users Mailing List
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a>
<a class="moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla -- <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a>
Kamailio World Conference -- <a class="moz-txt-link-abbreviated" href="http://www.kamailioworld.com">www.kamailioworld.com</a></pre>
</body>
</html>