Skip navigation
This discussion is archived

netstat -b

709 Views 3 Replies Latest reply: Sep 8, 2006 11:23 AM by Nathan Pangburn RSS
jsanchez157 Calculating status...
Currently Being Moderated
Sep 8, 2006 9:24 AM
Is anyone aware of a way of getting the equivalent of "netstat -b" (Windows XP Pro) which lists the binaries associated with their respective ports?
Sample result:
C:\>netstat -b
TCP wxp10168:2786 eg-www.apple.com:http ESTABLISHED 1688
[FIREFOX.EXE]
C:\>

Thanks,
-Jav
Macbook Pro 17, Mac OS X (10.4.7)
  • Nathan Pangburn Level 4 Level 4 (3,920 points)
    Currently Being Moderated
    Sep 8, 2006 9:25 AM (in response to jsanchez157)
    There may be other ways to do this, but I always use:

    lsof -i

    MDD Dual 1.25 G4 | 2GB RAM | 23" ACD |, Mac OS X (10.4.7), | Logic Pro 7.22 | AMT8 | Unitor8 | MIO 2882 | SoundDiver 3.1 PB2 | MCU
  • Gary Kerbaugh Level 6 Level 6 (18,040 points)
    Currently Being Moderated
    Sep 8, 2006 10:56 AM (in response to jsanchez157)
    Hi Jav,
       There is a netstat command on OS X but it doesn't show the process monitoring the port. As Nathan says, lsof is the ticket. However, when invoked as a regular user, lsof only lists processes owned by that user. In order to check all ports, the command should be run as root via sudo.
    --
    Gary
    ~~~~
       Shift to the left,
       Shift to the right,
       Mask in, mask out,
       BYTE, BYTE, BYTE !!!
    G5, Mac OS X (10.4.7), 2x2.5 GHz, 2 Gig RAM
  • Nathan Pangburn Level 4 Level 4 (3,920 points)
    Currently Being Moderated
    Sep 8, 2006 11:23 AM (in response to Gary Kerbaugh)
    Thanks for the clarification, Gary. It may have been confusing to Jav if he did not realize that small, yet very important distinction!
    MDD Dual 1.25 G4 | 2GB RAM | 23" ACD |, Mac OS X (10.4.7), | Logic Pro 7.22 | AMT8 | Unitor8 | MIO 2882 | SoundDiver 3.1 PB2 | MCU

Actions

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.