[Kea-users] stat-lease4-get not returning current lease statistics

Emile Swarts emile at madetech.com
Mon Jan 18 15:59:33 UTC 2021


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.
Switching it off seems to publish the correct statistics. Is this a known
issue, and is multi-threading production ready on KEA 1.8?

Thanks,
Emile

On Thu, Jan 14, 2021 at 1:37 PM Emile Swarts <emile at madetech.com> wrote:

> Hi,
>
> I'm calling stat-lease4-get but this doesn't seem to be updating when new
> leases are issued.
> I have about 800 subnets configured, but omitted these from the sql
> results below.
>
> I can confirm that the leases are in the lease4 db table and not reclaimed
> yet:
>
> mysql> select * from lease4;
>
>
> +-----------+----------------+----------------------+----------------+---------------------+-----------+----------+----------+----------+-------+--------------+
> | address   | hwaddr         | client_id            | valid_lifetime |
> expire              | subnet_id | fqdn_fwd | fqdn_rev | hostname | state |
> user_context |
>
> +-----------+----------------+----------------------+----------------+---------------------+-----------+----------+----------+----------+-------+--------------+
> | 179437569 | 0x000C01020304 | 0x01000C01020304     |           4000 |
> 2021-01-14 13:51:03 |      4327 |        0 |        0 |          |     0 |
> NULL         |
> | 179437570 | 0x000C01020305 | 0x01000C01020305     |           4000 |
> 2021-01-14 13:51:03 |      4327 |        0 |        0 |          |     0 |
> NULL         |
>
> ...
>
> I can also see that lease4_stat contains the following:
>
> mysql> select * from lease4_stat;
> +-----------+-------+--------+
> | subnet_id | state | leases |
> +-----------+-------+--------+
> |      4327 |     0 |    254 |
> +-----------+-------+--------+
> 2 rows in set (0.00 sec)
>
> The result of the API call "stat-lease4-get" returns the following:
> "rows"=>[[4327, 253, 0, 0, 0]]
>
> I'd expect the 3rd column "assigned-addresses" to match what's in the db
> tables.
>
> I've tried running "statistic-reset-all" to see if this makes a difference
> but it's not recalculated the new statistics.
>
> Are these statistics only kept in memory? Do you have any resources that
> could help me debug this issue?
>
> Thanks,
> Emile
>


-- 
Emile Swarts
Software Engineer

<https://www.madetech.com?utm_source=signaturesatori&utm_medium=email&utm_campaign=general_signature>

www.madetech.com
<https://www.madetech.com?utm_source=signaturesatori&utm_medium=email&utm_campaign=general_signature>

twitter.com/madetech
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20210118/2bcc363e/attachment.htm>


More information about the Kea-users mailing list