The truth is that I do not much care for netstat because I feel that it is to much functionality crammed into one little command. I've always felt that this is a poor way to manage complexity.

Example of complexity cut from the much vaunted man pages:

SYNOPSIS
       netstat  [address_family_options]  [--tcp|-t]   [--udp|-u]   [--raw|-w]
       [--listening|-l] [--all|-a] [--numeric|-n] [--numeric-hosts][--numeric-
       ports][--numeric-ports]   [--symbolic|-N]    [--extend|-e[--extend|-e]]
       [--timers|-o] [--program|-p] [--verbose|-v] [--continuous|-c]

       netstat              {--route|-r}              [address_family_options]
       [--extend|-e[--extend|-e]]  [--verbose|-v]  [--numeric|-n]  [--numeric-
       hosts][--numeric-ports][--numeric-ports] [--continuous|-c]

       netstat {--interfaces|-i} [iface] [--all|-a] [--extend|-e[--extend|-e]]
       [--verbose|-v]      [--program|-p]      [--numeric|-n]      [--numeric-
       hosts][--numeric-ports][--numeric-ports] [--continuous|-c]

       netstat   {--groups|-g}   [--numeric|-n]   [--numeric-hosts][--numeric-
       ports][--numeric-ports] [--continuous|-c]

       netstat  {--masquerade|-M}  [--extend|-e]  [--numeric|-n]   [--numeric-
       hosts][--numeric-ports][--numeric-ports] [--continuous|-c]

netstat {--statistics|-s} [--tcp|-t] [--udp|-u] [--raw|-w]

netstat {--version|-V}

netstat {--help|-h}

address_family_options:

       [--protocol={inet,unix,ipx,ax25,netrom,ddp}[,...]]          [--unix|-x]
       [--inet|--ip] [--ax25] [--ipx] [--netrom] [--ddp]

Now seriously, if you had seen this for the first (or even the fifth) time would you know exactly how to use it? How long might it take someone to figure it out? Doesn't it seem likely that the person in question might have something better to do? This is where folks who get frustrated with answering questions should focus their ire.


I had earlier tried :

[EMAIL PROTECTED] root]# netstat -l | grep netbios
tcp 0 0 *:netbios-ssn *:* LISTEN


udp 0 0 208.152.4.20:netbios-ns *:*

udp 0 0 enigma.micro:netbios-ns *:*

udp 0 0 *:netbios-ns *:*

udp 0 0 208.152.4.2:netbios-dgm *:*

udp 0 0 enigma.micr:netbios-dgm *:*

udp 0 0 *:netbios-dgm *:*

This output could mean any number of things. It could mean that I have active connections from 208.152.4.207 (eth0) as well as all three netbios ports open. Probably that is what it means but frankly LISTEN on one line doesn't tell me much. How am I to interpret it? This is not expained in the much vaunted man pages. Why is LISTEN on only one of the *:netbios lines?

Now here is an example of simple and easy to use:

port 137 open
port 138 open
port 139 open


Vox wrote:
This time Todd Lyons <[EMAIL PROTECTED]> becomes daring and writes:


Vox wrote on Wed, Mar 05, 2003 at 06:45:03PM -0600 :

Did I mention simple?

uhm...nothing is simpler than: netstat -ntpl It'll give you a list of ports that are open in LISTEN or CONNECTED state, and what program is keeping the port open...what simpler do you want?

I think he just wanted someone to tell him what to do. Here's some expansion on the suggestions of others. I suggest the original author 'man netstat' so he doesn't have to get indignant when the good answers he got were not what he expected.


Guess people still don't like to RTFM nor STFW <shakes head>

netstat -ltnp (Listening TCP, no resolving, program listening)
netstat -lunp (Listening UDP, no resolving, program listening)

netstat -ltunp (you get one guess, except Vincent Danen gets 3 ;)


Come on! be fair! Vincent needs *at least* 5 chances ;)

Vox





Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com

Reply via email to