Some common and important commands under Linux

Source: Internet
Author: User

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

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.