[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z1fO0rT9MZs5D61z@pop-os.localdomain>
Date: Mon, 9 Dec 2024 21:17:06 -0800
From: Cong Wang <xiyou.wangcong@...il.com>
To: dave seddon <dave.seddon.ca@...il.com>
Cc: netdev@...r.kernel.org
Subject: Re: tcp_diag for all network namespaces?
On Mon, Dec 09, 2024 at 11:24:18AM -0800, dave seddon wrote:
> G'day,
>
> Short
> Is there a way to extract tcp_diag socket data for all sockets from
> all network name spaces please?
>
> 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?
You are already able to do so in user-space, something like:
for ns in $(ip netns list | cut -d' ' -f1); do
ip netns exec $ns ss -tapn
done
(If you use API, you can find equivalent API's)
Thanks.
Powered by blists - more mailing lists