Finding the PID given a TCP connection

From: Arnout Engelen (panner_at_bzzt.net)
Date: 02/25/04


Date: Wed, 25 Feb 2004 15:20:22 +0100

Hi,

For NetHogs (a kind of net-top, http://nethogs.bzzt.net), i'm looking for
a way to find the PID associated with a given TCP connection. Is there
a way to do this cross-platformly? I currently read /proc/net/tcp, but
that is obviously linux-specific.

Arnout