<p>Hi <a class="user-mention" data-hovercard-type="user" data-hovercard-url="/hovercards?user_id=184809" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/miconda">@miconda</a>, sorry for the delay, it's taken me a while until I have been able to test this..</p>
<p>I can confirm so far that <code>dlg.stats_active</code> works correctly, it's in sync between both nodes all the time, so any changes to the dialogs are reflected there instantly on both nodes.</p>
<p>But, something must be wrong with <code>stats.get_statistics</code>:</p>
<p>Active K node:</p>
<pre><code>root@sbc01:/etc/kamailio# kamcmd stats.get_statistics all | grep dialog
dialog:active_dialogs = 30
dialog:early_dialogs = 2
dialog:expired_dialogs = 14
dialog:failed_dialogs = 12176
dialog:processed_dialogs = 44907
root@sbc01:/etc/kamailio#
</code></pre>
<p>Backup K node (newly restarted):</p>
<pre><code>root@sbc02:/etc/kamailio# kamcmd stats.get_statistics all | grep dialog
dialog:active_dialogs = 27
dialog:early_dialogs = 0
dialog:expired_dialogs = 0
dialog:failed_dialogs = 0
dialog:processed_dialogs = 0
root@sbc02:/etc/kamailio#
</code></pre>
<p>that <code>27</code> seems to me like an "initial sync" from the peer node, but that number won't change after that (which makes sense as this node is a backup and doesnt' handle any traffic unless there is a failover).</p>
<p>Does this make sense?</p>
<p>Thanks!</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/1591#issuecomment-432767538">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AF36Zc4pdPtMIBuPLzpyp-YNsGCmDMocks5uoKwWgaJpZM4VLmd9">mute the thread</a>.<img src="https://github.com/notifications/beacon/AF36ZTCsMRd6rlSJIhf3vCqUqgb0K0f_ks5uoKwWgaJpZM4VLmd9.gif" height="1" width="1" alt="" /></p>
<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/kamailio/kamailio","title":"kamailio/kamailio","subtitle":"GitHub repository","main_image_url":"https://assets-cdn.github.com/images/email/message_cards/header.png","avatar_image_url":"https://assets-cdn.github.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/kamailio/kamailio"}},"updates":{"snippets":[{"icon":"PERSON","message":"@joelsdc in #1591: Hi @miconda, sorry for the delay, it's taken me a while until I have been able to test this..\r\n\r\nI can confirm so far that `dlg.stats_active` works correctly, it's in sync between both nodes all the time, so any changes to the dialogs are reflected there instantly on both nodes. \r\n\r\nBut, something must be wrong with `stats.get_statistics`:\r\n\r\nActive K node:\r\n\r\n```\r\nroot@sbc01:/etc/kamailio# kamcmd stats.get_statistics all | grep dialog\r\ndialog:active_dialogs = 30\r\ndialog:early_dialogs = 2\r\ndialog:expired_dialogs = 14\r\ndialog:failed_dialogs = 12176\r\ndialog:processed_dialogs = 44907\r\nroot@sbc01:/etc/kamailio#\r\n```\r\n\r\nBackup K node (newly restarted):\r\n\r\n```\r\nroot@sbc02:/etc/kamailio# kamcmd stats.get_statistics all | grep dialog\r\ndialog:active_dialogs = 27\r\ndialog:early_dialogs = 0\r\ndialog:expired_dialogs = 0\r\ndialog:failed_dialogs = 0\r\ndialog:processed_dialogs = 0\r\nroot@sbc02:/etc/kamailio#\r\n```\r\n\r\nthat `27` seems to me like an \"initial sync\" from the peer node, but that number won't change after that (which makes sense as this node is a backup and doesnt' handle any traffic unless there is a failover).\r\n\r\nDoes this make sense?\r\n\r\nThanks!\r\n\r\n"}],"action":{"name":"View Issue","url":"https://github.com/kamailio/kamailio/issues/1591#issuecomment-432767538"}}}</script>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/issues/1591#issuecomment-432767538",
"url": "https://github.com/kamailio/kamailio/issues/1591#issuecomment-432767538",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
},
{
"@type": "MessageCard",
"@context": "http://schema.org/extensions",
"hideOriginalBody": "false",
"originator": "AF6C5A86-E920-430C-9C59-A73278B5EFEB",
"title": "Re: [kamailio/kamailio] RPC command stats.get_statistics randomly reporting 9223372036854776000 for current active/early dialogs (#1591)",
"sections": [
{
"text": "",
"activityTitle": "**Joel Serrano**",
"activityImage": "https://assets-cdn.github.com/images/email/message_cards/avatar.png",
"activitySubtitle": "@joelsdc",
"facts": [

]
}
],
"potentialAction": [
{
"name": "Add a comment",
"@type": "ActionCard",
"inputs": [
{
"isMultiLine": true,
"@type": "TextInput",
"id": "IssueComment",
"isRequired": false
}
],
"actions": [
{
"name": "Comment",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"IssueComment\",\n\"repositoryFullName\": \"kamailio/kamailio\",\n\"issueId\": 1591,\n\"IssueComment\": \"{{IssueComment.value}}\"\n}"
}
]
},
{
"name": "Close issue",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"IssueClose\",\n\"repositoryFullName\": \"kamailio/kamailio\",\n\"issueId\": 1591\n}"
},
{
"targets": [
{
"os": "default",
"uri": "https://github.com/kamailio/kamailio/issues/1591#issuecomment-432767538"
}
],
"@type": "OpenUri",
"name": "View on GitHub"
},
{
"name": "Unsubscribe",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"MuteNotification\",\n\"threadId\": 355362685\n}"
}
],
"themeColor": "26292E"
}
]</script>