ss: Include -E option for socket destroy events
Subsystems (3)
PATCH v2 1/1 ss: Include -E option for socket destroy events
Use the IPv4/IPv6/TCP/UDP multicast groups of NETLINK_SOCK_DIAG to filter and display socket statistics as they are destroyed.
Kernel support patch series: 24029a3603cfa633e8bc2b3fb3e48e76c497831d
Signed-off-by Craig Gallek <[email protected]>
--- include/linux/inet_diag.h | 3 +- include/linux/sock_diag.h | 10 +++++++ misc/ss.c | 74 +++++++++++++++++++++++++++++++++++++++++++++-- 3 files changed, 84 insertions(+), 3 deletions(-)
include/linux/inet_diag.h +2 -1
@@ -111,9 +111,10 @@ enum {INET_DIAG_SKMEMINFO ,INET_DIAG_SHUTDOWN ,INET_DIAG_DCTCPINFO , + INET_DIAG_PROTOCOL, /* response attribute only */ }; -#define INET_DIAG_MAX INET_DIAG_DCTCPINFO +#define INET_DIAG_MAX INET_DIAG_PROTOCOL/* INET_DIAG_MEM */
include/linux/sock_diag.h +10 -0
@@ -23,4 +23,14 @@ enum { SK_MEMINFO_VARS, }; +enum sknetlink_groups { +SKNLGRP_NONE , +SKNLGRP_INET_TCP_DESTROY , +SKNLGRP_INET_UDP_DESTROY , +SKNLGRP_INET6_TCP_DESTROY , +SKNLGRP_INET6_UDP_DESTROY , + __SKNLGRP_MAX, +}; +#define SKNLGRP_MAX (__SKNLGRP_MAX - 1) +#endif /* __SOCK_DIAG_H__ */
misc/ss.c +72 -2
128 lines not on this page · raw message
Signature · 1 line
2.2.0.rc0.207.ga3a616c
Quoted 6 lines · On Wed, 17 Jun 2015 11:14:48 -0400 Craig Gallek <[email protected]> wrote:
Use the IPv4/IPv6/TCP/UDP multicast groups of
NETLINK_SOCK_DIAGto filter and display socket statistics as they are destroyed.Kernel support patch series:
24029a3603cfa633e8bc2b3fb3e48e76c497831dSigned-off-by Craig Gallek <[email protected]>
Accepted. Currently sitting on local net-next branch until after merge.