<div dir="ltr">I think I've found that the issue here has to do with multi-threading. The stats don't seem to update with this turned on.<div>Switching it off seems to publish the correct statistics. Is this a known issue, and is multi-threading production ready on KEA 1.8?<br><br><div>Thanks,</div></div><div>Emile</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jan 14, 2021 at 1:37 PM Emile Swarts <<a href="mailto:emile@madetech.com">emile@madetech.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>I'm calling stat-lease4-get but this doesn't seem to be updating when new leases are issued.</div><div>I have about 800 subnets configured, but omitted these from the sql results below.<br><br></div><div>I can confirm that the leases are in the lease4 db table and not reclaimed yet:<br><br>mysql> select * from lease4;<br><br>+-----------+----------------+----------------------+----------------+---------------------+-----------+----------+----------+----------+-------+--------------+<br>| address   | hwaddr         | client_id            | valid_lifetime | expire              | subnet_id | fqdn_fwd | fqdn_rev | hostname | state | user_context |<br>+-----------+----------------+----------------------+----------------+---------------------+-----------+----------+----------+----------+-------+--------------+<br>| 179437569 | 0x000C01020304 | 0x01000C01020304     |           4000 | 2021-01-14 13:51:03 |      4327 |        0 |        0 |          |     0 | NULL         |<br>| 179437570 | 0x000C01020305 | 0x01000C01020305     |           4000 | 2021-01-14 13:51:03 |      4327 |        0 |        0 |          |     0 | NULL         |<br><br>...<br><br>I can also see that lease4_stat contains the following: <br><br></div><div>mysql> select * from lease4_stat;<br>+-----------+-------+--------+<br>| subnet_id | state | leases |<br>+-----------+-------+--------+<br>|      4327 |     0 |    254 |<br>+-----------+-------+--------+<br>2 rows in set (0.00 sec)<br><br>The result of the API call "stat-lease4-get" returns the following: <br>"rows"=>[[4327, 253, 0, 0, 0]]<br><br>I'd expect the 3rd column "assigned-addresses" to match what's in the db tables.<br><br>I've tried running "statistic-reset-all" to see if this makes a difference but it's not recalculated the new statistics. <br><br>Are these statistics only kept in memory? Do you have any resources that could help me debug this issue?<br><br>Thanks,<br>Emile</div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="font-weight:bold">Emile Swarts</td></tr><tr><td style="color:rgb(136,136,136);line-height:1">Software Engineer </td></tr><tr><td style="font-size:0px;height:12px"> </td></tr><tr><td valign="top"><a href="https://www.madetech.com?utm_source=signaturesatori&utm_medium=email&utm_campaign=general_signature" rel="nofollow" target="_blank"><img alt="" height="19" src="https://s3-eu-west-1.amazonaws.com/made-assets/logo-small.png" width="155"></a></td></tr><tr><td style="font-size:0px;height:10px"> </td></tr><tr><td><a href="https://www.madetech.com?utm_source=signaturesatori&utm_medium=email&utm_campaign=general_signature" style="color:rgb(67,154,99)" rel="nofollow" target="_blank">www.madetech.com</a></td></tr><tr><td style="font-size:0px;height:2px"> </td></tr><tr><td><a href="https://twitter.com/madetech" style="color:rgb(67,154,99)" rel="nofollow" target="_blank">twitter.com/madetech</a></td></tr><tr><td>
                <img src="https://pixel-geo.prfct.co/sseg?add=9818841&source=js_tag&a_id=75017" width="1" height="1" border="0">
            </td></tr></tbody></table>
</div>