2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-30 21:45:37 +00:00

[#3231] Log SOCKET RECEIVED TIME support

src/hooks/dhcp/perfmon/perfmon_callouts.cc
    dhcp4_srv_configured()
    dhcp6_srv_configured()
    - added to log socket received time support

src/hooks/dhcp/perfmon/perfmon_messages.mes
    PERFMON_DHCP4_SOCKET_RECEIVED_TIME_SUPPORT
    PERFMON_DHCP6_SOCKET_RECEIVED_TIME_SUPPORT
    - new messages
This commit is contained in:
Thomas Markwalder
2024-02-16 15:17:20 -05:00
parent 3c444cc607
commit b977ad4fb2
4 changed files with 42 additions and 1 deletions

View File

@@ -24,6 +24,24 @@ using namespace isc::perfmon;
extern "C" {
int dhcp4_srv_configured(CalloutHandle& /* handle */) {
// We do this here rather than in load() to ensure we check after the
// filter has been determined.
LOG_DEBUG(perfmon_logger, DBGLVL_TRACE_BASIC,
PERFMON_DHCP4_SOCKET_RECEIVED_TIME_SUPPORT)
.arg(IfaceMgr::instance().isSocketReceivedTimeSupported() ? "Yes" : "No");
return (0);
}
int dhcp6_srv_configured(CalloutHandle& /* handle */) {
// We do this here rather than in load() to ensure we check after the
// filter has been determined.
LOG_DEBUG(perfmon_logger, DBGLVL_TRACE_BASIC,
PERFMON_DHCP6_SOCKET_RECEIVED_TIME_SUPPORT)
.arg(IfaceMgr::instance().isSocketReceivedTimeSupported() ? "Yes" : "No");
return (0);
}
/// @brief This callout is called at the "pkt4_send" hook.
///
/// @param handle CalloutHandle which provides access to context.

View File

@@ -7,7 +7,9 @@
extern const isc::log::MessageID PERFMON_DEINIT_FAILED = "PERFMON_DEINIT_FAILED";
extern const isc::log::MessageID PERFMON_DEINIT_OK = "PERFMON_DEINIT_OK";
extern const isc::log::MessageID PERFMON_DHCP4_PKT_EVENTS = "PERFMON_DHCP4_PKT_EVENTS";
extern const isc::log::MessageID PERFMON_DHCP4_SOCKET_RECEIVED_TIME_SUPPORT = "PERFMON_DHCP4_SOCKET_RECEIVED_TIME_SUPPORT";
extern const isc::log::MessageID PERFMON_DHCP6_PKT_EVENTS = "PERFMON_DHCP6_PKT_EVENTS";
extern const isc::log::MessageID PERFMON_DHCP6_SOCKET_RECEIVED_TIME_SUPPORT = "PERFMON_DHCP6_SOCKET_RECEIVED_TIME_SUPPORT";
extern const isc::log::MessageID PERFMON_INIT_FAILED = "PERFMON_INIT_FAILED";
extern const isc::log::MessageID PERFMON_INIT_OK = "PERFMON_INIT_OK";
@@ -17,7 +19,9 @@ const char* values[] = {
"PERFMON_DEINIT_FAILED", "unloading PerfMon hooks library failed: %1",
"PERFMON_DEINIT_OK", "unloading PerfMon hooks library successful",
"PERFMON_DHCP4_PKT_EVENTS", "query: %1 events=[%2]",
"PERFMON_DHCP4_SOCKET_RECEIVED_TIME_SUPPORT", "Kernel supports socket received time? %1",
"PERFMON_DHCP6_PKT_EVENTS", "query: %1 events=[%2]",
"PERFMON_DHCP6_SOCKET_RECEIVED_TIME_SUPPORT", "Kernel supports socket received time? %1",
"PERFMON_INIT_FAILED", "loading PerfMon hooks library failed: %1",
"PERFMON_INIT_OK", "loading PerfMon hooks library successful",
NULL

View File

@@ -8,7 +8,9 @@
extern const isc::log::MessageID PERFMON_DEINIT_FAILED;
extern const isc::log::MessageID PERFMON_DEINIT_OK;
extern const isc::log::MessageID PERFMON_DHCP4_PKT_EVENTS;
extern const isc::log::MessageID PERFMON_DHCP4_SOCKET_RECEIVED_TIME_SUPPORT;
extern const isc::log::MessageID PERFMON_DHCP6_PKT_EVENTS;
extern const isc::log::MessageID PERFMON_DHCP6_SOCKET_RECEIVED_TIME_SUPPORT;
extern const isc::log::MessageID PERFMON_INIT_FAILED;
extern const isc::log::MessageID PERFMON_INIT_OK;

View File

@@ -19,7 +19,24 @@ This info message indicates that the PerfMon hooks library has been
loaded successfully. Enjoy!
% PERFMON_DHCP4_PKT_EVENTS query: %1 events=[%2]
The debug message is emitted after an inbound DHCPv4 query has been
This debug message is emitted after an inbound DHCPv4 query has been
processed, the arguments are the query label and the dump of the
query's packet event stack.
% PERFMON_DHCP4_SOCKET_RECEIVED_TIME_SUPPORT Kernel supports socket received time? %1
This debug message is emitted after a (re)configuration and indicates
whether or not the packet filter being used by kea-dhcp4 can supply
the timestamp a packet was received by the kernel for recording
SOCKET_RECEIVED events. If it does not, perfmon will still function but
will not have data available to determine kernel buffer wait times.
% PERFMON_DHCP6_SOCKET_RECEIVED_TIME_SUPPORT Kernel supports socket received time? %1
This debug message is emitted after a (re)configuration and indicates
whether or not the packet filter being used by kea-dhcp6 can supply
the timestamp a packet was received by the kernel for recording
SOCKET_RECEIVED events. If it does not, perfmon will still function but
will not have data available to determine kernel buffer wait times.
processed, the arguments are the query label and the dump of the
query's packet event stack.