Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet/tcp_stats.c
Show All 12 Lines | |||||
static int tcp_stats_tpl_sr_cb(enum stats_tpl_sr_cb_action action, | static int tcp_stats_tpl_sr_cb(enum stats_tpl_sr_cb_action action, | ||||
struct stats_tpl_sample_rate **rates, int *nrates, void *ctx); | struct stats_tpl_sample_rate **rates, int *nrates, void *ctx); | ||||
SYSCTL_INT(_net_inet_tcp, OID_AUTO, perconn_stats_enable, | SYSCTL_INT(_net_inet_tcp, OID_AUTO, perconn_stats_enable, | ||||
CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(tcp_perconn_stats_enable), 0, | CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(tcp_perconn_stats_enable), 0, | ||||
"Enable per-connection TCP stats gathering; 1 enables for all connections, " | "Enable per-connection TCP stats gathering; 1 enables for all connections, " | ||||
"2 enables random sampling across log id connection groups"); | "2 enables random sampling across log id connection groups"); | ||||
SYSCTL_PROC(_net_inet_tcp, OID_AUTO, perconn_stats_sample_rates, | SYSCTL_PROC(_net_inet_tcp, OID_AUTO, perconn_stats_sample_rates, | ||||
CTLTYPE_STRING | CTLFLAG_RW, tcp_stats_tpl_sr_cb, | CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_NEEDGIANT, tcp_stats_tpl_sr_cb, | ||||
sizeof(struct rm_priotracker), stats_tpl_sample_rates, "A", | sizeof(struct rm_priotracker), stats_tpl_sample_rates, "A", | ||||
"TCP stats per template random sampling rates, in CSV tpl_spec=percent " | "TCP stats per template random sampling rates, in CSV tpl_spec=percent " | ||||
"key-value pairs (see stats(9) for template spec details)"); | "key-value pairs (see stats(9) for template spec details)"); | ||||
#endif /* _KERNEL */ | #endif /* _KERNEL */ | ||||
#ifdef _KERNEL | #ifdef _KERNEL | ||||
int | int | ||||
#else | #else | ||||
Show All 12 Lines |