diff options
author | thiagoftsm <thiagoftsm@gmail.com> | 2022-03-29 18:21:42 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-29 18:21:42 +0000 |
commit | 68684b59f704cdd1b4190f4be8b3bce95d60da75 (patch) | |
tree | 6c9cc03a116eac1ccd388136300c4a5b5f7ee4cf /collectors/ebpf.plugin/ebpf.c | |
parent | 0746b58e7abe6a63c8c07c626eef3cb8c0217a43 (diff) |
Socket connections (eBPF) and bug fix (#12532)
Diffstat (limited to 'collectors/ebpf.plugin/ebpf.c')
-rw-r--r-- | collectors/ebpf.plugin/ebpf.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/collectors/ebpf.plugin/ebpf.c b/collectors/ebpf.plugin/ebpf.c index 778c2bd96e..f73e99fdc3 100644 --- a/collectors/ebpf.plugin/ebpf.c +++ b/collectors/ebpf.plugin/ebpf.c @@ -51,7 +51,7 @@ ebpf_module_t ebpf_modules[] = { .pid_map_size = ND_EBPF_DEFAULT_PID_SIZE, .names = NULL, .cfg = &socket_config, .config_file = NETDATA_NETWORK_CONFIG_FILE, .kernels = NETDATA_V3_10 | NETDATA_V4_14 | NETDATA_V4_16 | NETDATA_V4_18 | NETDATA_V5_4, - .load = EBPF_LOAD_LEGACY, .targets = NULL}, + .load = EBPF_LOAD_LEGACY, .targets = socket_targets}, { .thread_name = "cachestat", .config_name = "cachestat", .enabled = 0, .start_routine = ebpf_cachestat_thread, .update_every = EBPF_DEFAULT_UPDATE_EVERY, .global_charts = 1, .apps_charts = CONFIG_BOOLEAN_NO, .cgroup_charts = CONFIG_BOOLEAN_NO, .mode = MODE_ENTRY, .optional = 0, @@ -972,6 +972,7 @@ static void read_local_ports(char *filename, uint8_t proto) return; size_t lines = procfile_lines(ff), l; + netdata_passive_connection_t values = {.counter = 0, .tgid = 0, .pid = 0}; for(l = 0; l < lines ;l++) { size_t words = procfile_linewords(ff, l); // This is header or end of file @@ -985,7 +986,7 @@ static void read_local_ports(char *filename, uint8_t proto) // Read local port uint16_t port = (uint16_t)strtol(procfile_lineword(ff, l, 2), NULL, 16); - update_listen_table(htons(port), proto); + update_listen_table(htons(port), proto, &values); } procfile_close(ff); |