netstat command question what is 'netstat -tnpl' and what does it do?

i cannot find what this command does and have really slow internet

netstat -tnpl

thanks 111
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Kent WSr. Network / Systems AdminCommented:
It displays TCP (-t) connections numerically (-n) (IP:port) that are listening (-l), and lists the program name/pid (-p)
In a nutshell, all "listening" daemons on TCP, skipping the host name, and adding the PID/Program name.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
From the help command:
usage: netstat [-vWeenNcCF] [<Af>] -r         netstat {-V|--version|-h|--help}
       netstat [-vWnNcaeol] [<Socket> ...]
       netstat { [-vWeenNac] -i | [-cWnNe] -M | -s }

        -r, --route              display routing table
        -i, --interfaces         display interface table
        -g, --groups             display multicast group memberships
        -s, --statistics         display networking statistics (like SNMP)
        -M, --masquerade         display masqueraded connections

        -v, --verbose            be verbose
        -W, --wide               don't truncate IP addresses
        -n, --numeric            don't resolve names
        --numeric-hosts          don't resolve host names
        --numeric-ports          don't resolve port names
        --numeric-users          don't resolve user names
        -N, --symbolic           resolve hardware names
        -e, --extend             display other/more information
        -p, --programs           display PID/Program name for sockets
        -c, --continuous         continuous listing

        -l, --listening          display listening server sockets
        -a, --all, --listening   display all sockets (default: connected)
        -o, --timers             display timers
        -F, --fib                display Forwarding Information Base (default)
        -C, --cache              display routing cache instead of FIB

  <Socket>={-t|--tcp} {-u|--udp} {-w|--raw} {-x|--unix} --ax25 --ipx --netrom
  <AF>=Use '-6|-4' or '-A <af>' or '--<af>'; default: inet
  List of possible address families (which support routing):
    inet (DARPA Internet) inet6 (IPv6) ax25 (AMPR AX.25) 
    netrom (AMPR NET/ROM) ipx (Novell IPX) ddp (Appletalk DDP) 
    x25 (CCITT X.25)

Open in new window

Basically your command reads as, display for me all tcp socket connections (-t) identified numerically (-n) by their process id/program name (-p) that are actively listening (-l)

Scot HalvorsenCommented:
The "netstat" program is a Unix program that gives you network statistics. It is usually supplied by the "net-tools" package.

If you were using Ubuntu or Debian you could use the following;
$ sudo apt-get install net-tools

As for the flags, you can look them up from the programs man page.
$ man netstat

However it looks to be giving a list of ports that are listening for connections.
Need More Insight Into What’s Killing Your Network

Flow data analysis from SolarWinds NetFlow Traffic Analyzer (NTA), along with Network Performance Monitor (NPM), can give you deeper visibility into your network’s traffic.

Brian MurphyIT ArchitectCommented:
Is your question regarding slow Internet or how to use 'netstat'?

Netstat is a great command line tool but there are others as well.  Troubleshooting ISP or Internet issues requires much more than netstat can provide.

Internet issues or slowness can range from DNS resolution, latency, to attenuation.

Netstat will show you local system metrics.

Open command prompt and type "NET STATISTICS WORKSTATION"

See any CRC Errors?

You might actually get more information using "pathping.exe"

Here is an example output for Microsoft.  Notice how it shows the hops like trace route then a summary of the statistics.  

1. x.x.x.x
2. x.x.x.x
3. x.x.x.x
14. ***
Computing Statistics ***

Look for HOP and RTT

1. 0ms
2. 12ms
3. 13ms
4. 18ms
12. 400ms - doh, found your problem maybe?

The quickest way to rule out local computer / DUPLEX / LAN problems is Wireshark.  Free.

Download the latest version, install.  Uses color coding system.  Online documentation.  Filters.

You need to rule out local issues like your computer NIC being set to AUTO and plugged to an older Hub.

For whatever reason, you need to set it to 100/FULL (assuming not using 1 GB - rare now but happens).

If it happens all the time, most likely not the Internet connection unless you have equipment issues or very remote location.
Gerwin Jansen, EE MVETopic Advisor Commented:
What changed why you have slow internet now, or did you have slow internet all along?
"netstat command question what is 'netstat -tnpl' and what does it do?"

you asking about "netstat" command or your internet is slow using netstat. both are different thing. netstat is not related with ISP or your domain.
Netstat gives you information about the networking subsystem.  The type of information printed is controlled by the argument. netstat displays a list of open sockets and displays summary statistics for each protocol.

Now about your internet speed -> It is Not your Connection, It's  Wi-Fi.
You have a fast connection, but Wi-Fi can degrade that speed in all sorts of ways.
Are you using cable internet? if its peak usage time that will slow down your connection.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.