Filter the open message for a port number
NETSTAT-ANPL | grep 9010
Filter information for a service process that is open by a query
Ps-ef | grep node
To force a kill off a process
Killall-9 Service Process Name
KILL-9 Process PID Number
View the number of links open on a port 1) Count 80 port connections
Netstat-nat | Grep-i "80" | Wc-l------------------------primarily viewed with service ports
2) Count httpd protocol connections
Ps-ef | grep httpd | Wc-l-----------------primarily viewed with the service name
3) View the current number of concurrent accesses to Apache:
Netstat-an | grep established | Wc-l
Compare the number of maxclients in httpd.conf
Linux commands:
Netstat-n | awk '/^tcp/{++s[$NF]} END {for (a in S) print A, s[a]} '
Examples of returned results:
Last_ack 5
SYN_RECV 30
Established 1597
Fin_wait1 51
Fin_wait2 504
Time_wait 1057
One of the
SYN_RECV indicates the number of requests waiting to be processed;
Established indicates the normal data transmission status;
Time_wait indicates the number of requests that have finished processing and waiting for the timeout to expire.
Some common and important commands under Linux