Skip to content

dropwatch ​

dropwatch 组件名称为 dropwatch, 需要开启的内核选项为

ini
# Networking support
# -> Networking options
# -> Network testing
# -> Network packet drop alerting service
CONFIG_NET_DROP_MONITOR=y

检查工具为

bash
#!/bin/bash

source ./kernel_config_utils.sh

dropwatch_check() {
    if ! kernel_config_check CONFIG_NET_DROP_MONITOR drop_monitor; then
        return 1
    fi
}

NET_DM_CMD_CONFIG 支持的 attr 对应的标识符格式为 NET_DM_ATTR_*, 对应的 C 类型是 include/uapi/linux/net_dropmon.h 文件中的 enum net_dm_attr 类型. 引入的 attr 的版本和提交号如下表所示:

attr版本提交号
NET_DM_ATTR_ALERT_MODEv5.4ca30707dee2bc8bc81cfd8b4277fe90f7ca6df1f
NET_DM_ATTR_QUEUE_LENv5.430328d46af593dcf24582f2a431d84ea0cf4bdef
NET_DM_ATTR_TRUNC_LENv5.457986617a736aec2980c1c78a9dd8dcdf477ee6e

移植问题 ​