9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Skip Tavakkolian <9nut@9netics.com>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] equivalent of fstat | grep $portnumber ?
Date: Tue, 19 Jun 2007 08:39:24 -0700	[thread overview]
Message-ID: <b8236d78be4464c22952d151831a5759@9netics.com> (raw)
In-Reply-To: <20070619152735.GB6960@pestilenz.org>

> Hi all,
> what would be the Plan9 way of finding the process that
> listens on a given port number? Grepping through /proc
> does not help afaics because only /net/tcp/clone is
> opened while listening (?).
>
> Thanks,
>
> Matthias

something like this?

cpu% netstat | grep https
tcp  25   none       Listen       https      0          ::
cpu% grep '/net/tcp/25' /proc/*/fd
/proc/8429/fd: 13 rw I    0 (000000000002040c     0 00)     0        2 /net/tcp/25/listen
cpu% ps -eaf|grep 8429
none           8429    0:00   0:00     1404K Pread    httpd ?
fst           17202    0:00   0:00      156K Pread    grep 8429
cpu%



  reply	other threads:[~2007-06-19 15:39 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-19 15:27 Matthias Bauer
2007-06-19 15:39 ` Skip Tavakkolian [this message]
2007-06-19 16:09   ` ron minnich
2007-06-19 16:13   ` Kris Maglione
2007-06-19 16:17     ` andrey mirtchovski
2007-06-19 16:49       ` Kris Maglione
2007-06-19 16:53         ` andrey mirtchovski
2007-06-19 16:57           ` Kris Maglione
2007-06-19 17:16             ` andrey mirtchovski
2007-06-19 17:38               ` Kris Maglione
2007-06-19 18:09                 ` Roman Shaposhnick
2007-06-19 18:08                   ` Kris Maglione
2007-06-19 18:53                     ` Kris Maglione
2007-06-19 18:13           ` jmk
2007-06-19 18:21             ` jmk
2007-06-19 18:28               ` Roman Shaposhnick
2007-06-20  0:46             ` Russ Cox
2007-06-20  5:48               ` Bruce Ellis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b8236d78be4464c22952d151831a5759@9netics.com \
    --to=9nut@9netics.com \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).