Figuring out which process has posted a LSTN

Figuring out which process has posted a LSTN

Post by stanislav shaluno » Sat, 28 Aug 1999 04:00:00




> Is there some trick/utility for figuring out which process is
> attached to a Listen on Linux?

In Linux it's probably the easiest to use lsof.  Unfortunately, I
don't think it comes by default with any distribution, so you'll have
to install it.

BSD has fstat.

 
 
 

Figuring out which process has posted a LSTN

Post by Bernie Cose » Sun, 29 Aug 1999 04:00:00


Is there some trick/utility for figuring out which process is attached to a
Listen on Linux?  In older days you could do a fair bit of poking around
within the kernel structures [now accessed by things like /proc these days,
yes?] but I'm not sure how to tie a listen on a port to which process will
be woken-up when a request comes in.

  /Bernie\
--
Bernie Cosell                     Fantasy Farm Fibers

    -->  Too many people, too few sheep  <--          

 
 
 

Figuring out which process has posted a LSTN

Post by Ni » Tue, 31 Aug 1999 04:00:00




Quote:> Is there some trick/utility for figuring out which process is
> attached to a Listen on Linux?  In older days you could do a fair
> bit of poking around within the kernel structures [now accessed by
> things like /proc these days, yes?] but I'm not sure how to tie a
> listen on a port to which process will be woken-up when a request
> comes in.

Give fuser a shot, eg. "fuser -vn tcp 80". Fuser tends to be more
standard than lsof on Linux distributions.

Regards,
        Nic.

-- Nic B. -- email "sky" at "wibble dot net" --
-- UN*X Programmer, IHUG (NZ) Ltd. ------------
-- #include <stddisclaimer.h> -----------------

 
 
 

Figuring out which process has posted a LSTN

Post by ldoolit » Wed, 01 Sep 1999 04:00:00



: > Is there some trick/utility for figuring out which process is
: > attached to a Listen on Linux?

: In Linux it's probably the easiest to use lsof.  Unfortunately, I
: don't think it comes by default with any distribution, so you'll have
: to install it.

: BSD has fstat.

"socklist" - part of the procinfo suite on a modern Linux installation.
The information you want is scattered around in the /proc filesystem,
socklist only cross-indexes it nicely.


 
 
 

1. Please Help Me Figure Out How to Figure This Out

Here's my network setup.  DSL to router, router to linux box running
RH 7, serving as firewall.  Mixed windows and linux network behind the
firewall.  firewall is ipchains.

Late this afternoon, for no apparent reason, machines behind the
firewall can't access the web.  I can ping the internet and I can run
a windows news client behind the firewall with no problem.  Only thing
not going through seems to be www.

Here's where it's weird.  There is one web site I can reach from
behind the firewall.  Charles Schwab.  I don't know if this is because
it's a "secure" site or not.

I'm not a network guru and I don't have a clue where to start.  I run
tcpdump on the firewall and it looks like www traffic is not going
through because of some error in routing.  I see messages about udp
error host or port unreachable, tos 0xc0.  

Web access has been fine for months and this just started on it's own
late in the afternoon.  I can get other traffic past the firewall, not
web traffic, except the schwab site as mentioned.  Any suggestions on
how to troubleshoot this problem would really be appreciated.

Thanks.

2. Who is actually running Linux on IBM MOdel 80 PS2?

3. HOW DO I FIGURE OUT HOW MANY PROCESSES ARE RUNNING?

4. Looking for a good tape drive recomendation

5. How to figure out which process holds an open port

6. Determine Attached MAC Address

7. Figuring out what process has a file locked

8. bash binary with getopts command

9. Is there any way to figure out what process sent a signal

10. how to figure out which process is locking a file

11. sendail having problems resolving mx records? (2nd posting)

12. Anyone having trouble installing Linux on a drive using EZ Drive should read this post.

13. Q: Cprog running as a cgi having probles with post-method