Linux common face question 4

Source: Internet
Author: User

1, user brush interface, resulting in high machine load, how to deal with it?

Workaround 1:

Limit the maximum number of links for a single IP to access 80 ports via Iptables


Iptables-a input-p TCP--dport 80-s 192.168.1.1-m connlimit-conlimit-above 5-j REJECT

Reference Blog: http://blog.uinion.com/?p=272

Workaround 2:

With Nginx_waf control, you can also


2. Select Nginx Access.log within 10 minutes to get the following data

10 most visited IPs, ascending output

ng_log= '/usr/local/nginx/logs/access.log '

Find ${ng_log}-mmin-10 | awk ' {print $7} ' | Sort-rn | uniq-c | Head-10


3. View server network Connection Status

Netstat-ant | awk '/^tcp/{++s[$NF]}end{for (A in S) print A,s[a]} '


4. View the number of server network connections

Netstat-ant | grep established | Wc-l

This article is from "YHT's operations Notes" blog, please make sure to keep this source http://yht2017.blog.51cto.com/9014030/1903303

Linux common face question 4

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.