diff --git a/includes/netdata_socket.h b/includes/netdata_socket.h index 0c12a639..5972577e 100644 --- a/includes/netdata_socket.h +++ b/includes/netdata_socket.h @@ -173,6 +173,7 @@ typedef struct netdata_nv_data { int state; __u32 pid; + __u32 tgid; __u32 uid; __u64 ts; diff --git a/kernel/network_viewer_kern.c b/kernel/network_viewer_kern.c index cda56aa7..59f8a86b 100644 --- a/kernel/network_viewer_kern.c +++ b/kernel/network_viewer_kern.c @@ -192,6 +192,7 @@ static __always_inline void set_common_tcp_nv_data(netdata_nv_data_t *data, __u32 tgid = 0; data->pid = netdata_get_pid(&nv_ctrl, &tgid); + data->tgid = tgid; data->uid = bpf_get_current_uid_gid(); // Only update this data when it is a new value if (!data->ts) @@ -214,6 +215,7 @@ static __always_inline void set_common_udp_nv_data(netdata_nv_data_t *data, NETDATA_SOCKET_DIRECTION direction) { __u32 tgid = 0; data->pid = netdata_get_pid(&nv_ctrl, &tgid); + data->tgid = tgid; data->uid = bpf_get_current_uid_gid(); // Only update this data when it is a new value if (!data->ts)