Netstat
The syntax for the netstat command is:
netstat [options]
The common parameters of netstat are as follows:
-a displays all sockets including those that are listening
-C is displayed again every 1 seconds until the user interrupts it
-I displays the information format of all network interfaces with "Ifconfig–e"
-N Displays the network connection situation with the network IP address instead of the name
-R display core routing table with "Route–e"
-T shows TCP protocol connectivity
-U displays UDP protocol connections
-V Display work in progress
Example:
1 The netstat command is used in this machine, and its output is as follows
| The code is as follows |
Copy Code |
|
Active Internet connections (w/o servers)
Proto recv-q send-q Local address Foreign
TCP 0 256 10.153.89.66:SSH 10.153.21.168:1054 established
TCP 0 0 10.153.89.66:SSH 10.153.21.166:1222 established
TCP 0 0 10.153.89.66:1521 10.153.21.166:2625 established
TCP 0 0 10.153.89.66:1521 10.153.21.166:2623 established
......
Active UNIX domain sockets (w/o servers)
Proto refcnt Flags Type State I-node Path
UNIX 9 [] Dgram 919/dev/log
UNIX 2 [] STREAM CONNECTED 50246124
UNIX 3 [] STREAM CONNECTED 3914245
/tmp/. ice-unix/dcop18694-1074144356
UNIX 3 [] STREAM CONNECTED 3914244
UNIX 3 [] STREAM CONNECTED 3914127/tmp/. X11-unix/x0
..... |