[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241210020057.26127-1-kuniyu@amazon.com>
Date: Tue, 10 Dec 2024 11:00:57 +0900
From: Kuniyuki Iwashima <kuniyu@...zon.com>
To: <dave.seddon.ca@...il.com>
CC: <netdev@...r.kernel.org>, <kuniyu@...zon.com>
Subject: Re: tcp_diag for all network namespaces?
From: dave seddon <dave.seddon.ca@...il.com>
Date: Mon, 9 Dec 2024 11:24:18 -0800
> G'day,
>
> Short
> Is there a way to extract tcp_diag socket data for all sockets from
> all network name spaces please?
I think there's no such interface.
I remember there was a similar request for TCP BPF iterator,
but now it's difficult because each netns could have its own
TCP hash table for established connections.
>
> Background
> I've been using tcp_diag to dump out TCP socket performance every
> minute and then stream the data via Kafka and then into a Clickhouse
> database. This is awesome for socket performance monitoring.
>
> Kubernetes
> I'd like to adapt this solution to <somehow> allow monitoring of
> kubernetes clusters, so that it would be possible to monitor the
> socket performance of all pods. Ideally, a single process could open
> a netlink socket into each network namespace, but currently that isn't
> possible.
>
> Would it be crazy to add a new feature to the kernel to allow dumping
> all sockets from all name spaces?
Iterating netns in userspace is much simpler than in kernel that needs
iterating net_namespace_list under net_rwsem and remembering the last
netns with the refcount bumped.
>
> Maybe I'm missing some other better option(s)?
>
> Thanks in advance
Powered by blists - more mailing lists