2004-10-08 21:02:36

by Garrick Staples

[permalink] [raw]
Subject: identify fs using a particular port

Silly question that I can't find the answer to... is it possible to identify
which mounted filesystem is using a particular port?

$ netstat -an | grep :782
tcp 0 0 10.125.0.200:782 10.125.0.193:2049 ESTABLISHED
^^^ I need this port for another daemon

I have a 14 filesystems mounted from that machine, all busy with user
processes. So I'm trying to figure out which filesystem needs to be unmounted
to free port 782.

--
Garrick Staples, Linux/HPCC Administrator
University of Southern California


Attachments:
(No filename) (560.00 B)
(No filename) (189.00 B)
Download all attachments

2004-10-08 21:31:20

by Dan Stromberg

[permalink] [raw]
Subject: Re: identify fs using a particular port


If it's an rpc service, you can likely get what's using the port from
rpcinfo -p.

If it's not an rpc service, you may be able to get it from
/etc/services.

Also check out netstat -p.

On Fri, 2004-10-08 at 14:02, Garrick Staples wrote:
> Silly question that I can't find the answer to... is it possible to identify
> which mounted filesystem is using a particular port?
>
> $ netstat -an | grep :782
> tcp 0 0 10.125.0.200:782 10.125.0.193:2049 ESTABLISHED
> ^^^ I need this port for another daemon
>
> I have a 14 filesystems mounted from that machine, all busy with user
> processes. So I'm trying to figure out which filesystem needs to be unmounted
> to free port 782.
--
Dan Stromberg DCS/NACS/UCI <[email protected]>


Attachments:
signature.asc (189.00 B)
This is a digitally signed message part

2004-10-08 21:57:07

by Garrick Staples

[permalink] [raw]
Subject: Re: identify fs using a particular port

On Fri, Oct 08, 2004 at 02:31:15PM -0700, Dan Stromberg alleged:
>
> If it's an rpc service, you can likely get what's using the port from
> rpcinfo -p.

NFS clients don't register themselves as an RPC server in portmapper.


> If it's not an rpc service, you may be able to get it from
> /etc/services.
>
> Also check out netstat -p.

I already know it is a kernel nfs thread, but that doesn't tell me which
filesystem.


> On Fri, 2004-10-08 at 14:02, Garrick Staples wrote:
> > Silly question that I can't find the answer to... is it possible to identify
> > which mounted filesystem is using a particular port?
> >
> > $ netstat -an | grep :782
> > tcp 0 0 10.125.0.200:782 10.125.0.193:2049 ESTABLISHED
> > ^^^ I need this port for another daemon
> >
> > I have a 14 filesystems mounted from that machine, all busy with user
> > processes. So I'm trying to figure out which filesystem needs to be unmounted
> > to free port 782.
> --
> Dan Stromberg DCS/NACS/UCI <[email protected]>
>



--
Garrick Staples, Linux/HPCC Administrator
University of Southern California


Attachments:
(No filename) (1.12 kB)
(No filename) (189.00 B)
Download all attachments

2004-10-08 22:18:28

by Dan Stromberg

[permalink] [raw]
Subject: Re: identify fs using a particular port

On Fri, 2004-10-08 at 14:56, Garrick Staples wrote:
> On Fri, Oct 08, 2004 at 02:31:15PM -0700, Dan Stromberg alleged:
> >
> > If it's an rpc service, you can likely get what's using the port from
> > rpcinfo -p.
>
> NFS clients don't register themselves as an RPC server in portmapper.
>
>
> > If it's not an rpc service, you may be able to get it from
> > /etc/services.
> >
> > Also check out netstat -p.
>
> I already know it is a kernel nfs thread, but that doesn't tell me which
> filesystem.

OK. How about firing up a tethereal/ethereal on that port, and watching
for filenames going by?

>
> > On Fri, 2004-10-08 at 14:02, Garrick Staples wrote:
> > > Silly question that I can't find the answer to... is it possible to identify
> > > which mounted filesystem is using a particular port?
> > >
> > > $ netstat -an | grep :782
> > > tcp 0 0 10.125.0.200:782 10.125.0.193:2049 ESTABLISHED
> > > ^^^ I need this port for another daemon
> > >
> > > I have a 14 filesystems mounted from that machine, all busy with user
> > > processes. So I'm trying to figure out which filesystem needs to be unmounted
> > > to free port 782.
> > --
> > Dan Stromberg DCS/NACS/UCI <[email protected]>
> >
--
Dan Stromberg DCS/NACS/UCI <[email protected]>


Attachments:
signature.asc (189.00 B)
This is a digitally signed message part