The netstat command in the Windows system can know the port and process occupancy, so how to operate under the netstat command! Let’s take a look now!
Objective: In the Windows environment, use the netstat command to check a certain Whether the port number is occupied and which process is occupied.
Operation: The operation is divided into two steps: (1) Check which PID the port is occupied; Method 1: View the port in a targeted manner, use the command
Netstat - ano|findstr "
Method 2: View all, and then find the corresponding port and PID.
The 5 columns in the first picture are the 5 columns corresponding to the picture in (a) above
(2) Check the process name corresponding to the PID.
Method 1: Always use the command to search, tasklist|findstr ""
As can be seen from Figure (c), the name of the process corresponding to PID 3840 is msnmsgr.exe.
Method 2: Use Task Manager to view it.
Bring up the task manager and select the column, as shown in Figure d.
View the process name corresponding to the PID. As shown in (e) msnmsgr.exe
Appendix: Enter netstat /? on the command line to view netstat related information.
C:Documents and SettingsAdministrator>netstat /?
Displays protocol statistics and current TCP/IP network connections.
NETSTAT [-a] [-b] [-e] [-n] [-o] [-p proto] [-r] [-s] [-t] [-v] [interval]
- a Shows all connections and listening ports.
-b displays the
executable components included in the creation of each connection or listening port. In some cases an executable component
is known to have multiple independent components, and in these cases
a sequence of components
that is involved in creating a connection or listening port is shown. In this case, the executable component name is in [] at the bottom, the component it calls is at the top, and so on, down to the TCP/IP part. Note that this option
may take a long time and may fail if you do not have sufficient permissions
.
-e displays Ethernet statistics. This option can be combined with the -s
option.
-n displays the address and port number in numerical form.
-o Displays the owning process ID associated with each connection.
-p proto displays connections of the protocol specified by proto; proto can be
one of the following protocols: TCP, UDP, TCPv6 or UDPv6.
If used with the -s option to display per-protocol statistics, proto can be one of the following protocols:
IP, IPv6, ICMP, ICMPv6, TCP, TCPv6, UDP, or UDPv6.
-r displays the routing table.
-s displays per-protocol statistics. By default, statistics for IP, IPv6, ICMP, ICMPv6, TCP, TCPv6, UDP, and UDPv6 are displayed; the -p option is used to specify a subset of the default cases.
-t displays the current connection uninstallation status.
-v when used with the -b option will display the
components contained in
that create connection or listening ports for all executable components.
interval Redisplays selected statistics,
Pause interval (in seconds) between each display. Press CTRL+C to stop displaying statistics again. If omitted, netstat displays the current
configuration information (only displayed once)

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

Dreamweaver Mac version
Visual web development tools

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software