View the port status in netstat in CentOS
When using Linux, you need to know which ports are open in the current system, and check the specific processes and users that open these ports. You can use the netstat command to perform a simple query.
Parameters of the netstat command are described as follows:
-T: indicates that the TCP port is displayed.-U: indicat
correct.
In the command prompt line, type Ping 127.0.0.1.
2. Ping the local IP address to check whether the local IP address is set correctly.
3. Ping the default gateway address to check whether it can communicate with hosts outside the local subnet.
4. Ping the host on the remote subnet to check whether the vro can communicate remotely.
If the above ping command can receive a response, the TCP/IP configuration can support network communication.
Use netsta
The netstat command displays network connection, route table, and network interface information, allowing you to know which network connections are in operation. In our daily work, we usually use two parameters, netstat-an, as shown below:
[Root @ tiaobanji ~] # Netstat-
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address F
[O M engineer _ 02] 20 built-in Linux system monitoring tools: vmstat and netstat. This article is the second article and the first article of O M engineer on the road. See: [O M tips _ 01] 20 built-in monitoring tools for Linux systems: top gossip, reading and writing O ~ (2) If vmstat is written in front, here Rocky should be a bit cool, privately think that the best practices of vmstat should also be: "which part of the resource is most frequent
The usage is the same as that of netstat:
Fhns-na
Fhns-Rs
Modify the IP address and port to be hidden in batType netstat. tmp | % SystemRoot %/system32/findstr.exe/V "/
This is the demo made by allyesno of fake hide.
The execution result hides the IP address of 127.0.0.1 and port 3389.
Attachment: fhns.rar
Below is the modified version
@ Echo offRem this is fh's demoRem test in WINXP by allyesnoEcho % 1% 2%
Some statistical data on the server:
1) Statistics 80 port connection numberNetstat-nat|grep-i "|wc-l"
2) Statistics HTTPD Protocol connection numberPs-ef|grep httpd|wc-l
3), the statistics are connected, the status is "establishedNetstat-na|grep established|wc-l
4), find out which IP address is the most connected, it closed.Netstat-na|grep Established|awk {print $5}|awk-f: {print $1}|sort|uniq-c|sort-r +0n
Netstat-na|grep Syn|awk {print $5}|awk-
Ping, tracert, traceroute, and netstat command to view the ubuntu running status command 1. route to view and set the route information for Linux 2. ping: network connectivity check example: ping 192.168.0.1 parameter:-c is used to specify the number of ping responses. Example: ping-c 4 192.168.0.1 the specified number of responses is 4 3. traceroute is used to analyze the network topology format: traceroute Remote Host IP address or domain name 4.
Target: In a Windows environment, use the netstat command to see if a port number is occupied and which process is occupied.Action: The operation is divided into two steps: (1) Check that the port is occupied by that PID; method one: Targeted view port, using commandNetstat–ano|findstr "(a) FigureMethod Two: View all, and then find the corresponding port and PID.(b) FigureThe 5 columns in the first picture are the 5 columns corresponding to the above
In Linux to view the number of network connections or network status, I generally use netstat or lsof these two, netstat words have a time clock function, which involves a lot of knowledge of TCP/IP protocol, today to say I understand the netstat timing function.Netstat-altpno or NETSTAT-ALTPN--timers, look at the resu
Netstat is a command used to find information about network connections. It is an analytical command that stores all data under Proc. Netstat reads information from proc and then outputs the information.
If you do not know what proc is, referThe proc file system uses the netstat-NLP command as an example. N is displayed using numbers, L is the listener, p is the
Netstat-B-A can be used to check which process uses all ports.
At the very beginning, I found that the 4466port was in a wild box, and I tried ikuacc.exe. The program was not starting the process and service at startup, and I was so embarrassed that I manually killed the file.
For more information, see netstat help:
Netstat /?
Displays the Protocol statistics a
Netstat monitoring a large number of established connections and TIME_WAIT connectivity issuesProblem Description:Netstat monitors a large number of established connections and time_wait connections, regardless of system load, CPU, memory, and so on.# Netstat-n | awk '/^tcp/{++y[$NF]} END {for (w in y) Print W, y[w]} ' close_wait 348ESTABLISHED 1240time_wait 5621Monitor the link port
I. Monitoring IO performanceIostat-x Focus on%utilIotop to see which process is reading and writingIi. free command (view memory usage)-M-H-GBuff buffer (CPU processed data > memory (Buff) > Disk)Cache caching (Disk > Memory (cache) >CPU processing data)Formula: Total= used + Free +buff/cacheAvaliable contains free and buffer/cache remaining partsHow my swap is all 0.PS Command (view system process)PS aux all the processes in the system are listed in snapshot formPS aux |grep process name (view
The netstat is used to display statistics related to IP, TCP, UDP, and ICMP protocols, and is typically used to verify the network connectivity of each port on the machine. use the NETSTAT directive to let you know the network situation of the entire Linux system. parameters :-A or –all shows all sockets in the connection. -a-C or –continuous continues to list network status. -C or –cache displays the cach
In Linux to view the number of network connections or network status, I generally use netstat or lsof these two, netstat words have a time clock function, which involves a lot of knowledge of TCP/IP protocol, today to say I understand the netstat timing function.Netstat-altpno or NETSTAT-ALTPN--timers, look at the resu
Netstat and port shutdown Methods
NetstatDisplays protocol statistics and current TCP/IP network connections. This command can be used only after the TCP/IP protocol is installed.View portTo view the port in Windows 2000/XP/Server 2003, run the netstat command:Click Start> Run, type cmd, and press enter to open the Command Prompt window. Type "netstat-a-
Command for viewing Ubuntu running status
1. route to view and set the route information for Linux 2. ping: network connectivity check example: Ping 192.168.0.1 parameter:-C is used to specify the number of Ping responses. Example: Ping-C 4 192.168.0.1 the specified number of responses is 4 3. traceroute is used to analyze the network topology format: Traceroute Remote Host IP address or domain name 4. netstat is used to view the network connection s
Often, when we start an application, we find that the ports required by the system are occupied by other programs. How do we know who owns the ports we need?
1. Windows PlatformRun the following command in the Windows command line window:
E: \ oracle \ ora92 \ bin> netstat-Ano | find ": 80"TCP172.18.2.56: 3311172.18.40.3: 80Established 3704TCP172.18.2.56: 3319172.18.65.7: 80Established 3704TCP172.18.2.56: 4641172.18.40.3: 80Established 3704TCP172.18.2
To view the ports in Windows 2000/xp/server 2003, you can use the netstat command:Tap Start → run, type "cmd" and enter to open a command prompt window. Type "Netstat-a-n" at the command prompt and press ENTER to see the port number and status of the TCP and UDP connections that are displayed digitally.Tip: Netstat command usageCommand format:
Preface to learn a command in Linux, run the netstat command to display network-related information, such as network connection, route table, interface status (interface statistics), and masquerade connection, multicast members (multicase memberships. Netstat information: the output result of netstat is as follows:
One is to activate an Internet connection, c
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.