Computer Hope

Other Pages

Home
Site map
Computer help

Dictionary
News
Q&A
What's new

Tools

E-mail this page
Print Preview
Edit this page




 

Microsoft DOS netstat command

Quick links

About netstat
Availability
Syntax
Examples

About netstat

The netstat command is used to display the TCP/IP network protocol statistics and information.

 

Availability

The netstat.exe command is an external command available in the below Microsoft operating systems.

Windows 95
Windows 98
Windows NT
Windows ME
Windows 2000
Windows XP
Windows Vista
Windows 7

Index

Category:
MS-DOS

Companies:
Microsoft

Related Pages:
CH000444

Resolved

Were you able to locate the answer to your questions?

Syntax

NETSTAT [-a] [-e] [-n] [-s] [-p proto] [-r] [interval]

 

-aDisplays all connections and listening ports.
-eDisplays Ethernet statistics. This may be combined with the -s option.
-nDisplays addresses and port numbers in numerical form.
-pproto Shows connections for the protocol specified by proto; proto may be TCP or UDP. If used with the -s option to display per-protocol statistics, proto may be TCP, UDP, or IP.
-rDisplays the routing table.
-sDisplays per-protocol statistics. By default, statistics are shown for TCP, UDP and IP; the -p option may be used to specify a subset of the default.
intervalRedisplays selected statistics, pausing interval seconds between each display. Press CTRL+C to stop redisplaying statistics. If omitted, netstat will print the current configuration information once.

Examples

netstat

Displays all local network information. Below is an example of what may be displayed.

ProtoLocal AddressForeign AddressState
 TCPhope:4409www.computerhope.com:telnetESTABLISHED
 TCPhope:3708multicity.com:80CLOSE_WAIT
 TCPhope:4750www.google.com:80CLOSE_WAIT

netstat 5

Running netstat with a number after the command will continue to run the command until stopped. In this case netstat would be refreshed ever five seconds. To cancel press CTRL + C.

Notice: Keep in mind that if you have network applications open, such as the browser you're using to view this page, additional items will be listed when you run "netstat" and/or the "netstat -a" command. So you may see items from Computer Hope in your list; if you want a true listing of what is running in the background, close all programs and run the command.

Home - Computer help - Contact - Site Map - About Us
Link to Computer Hope - Bookmark Computer Hope