Linux Shell network layer monitoring script (monitoring includes: Number of connections, number of handles, and analysis based on monitoring feedback)

Source: Internet
Author: User

Script monitoring:

Process for obtaining the maximum number of handles:

Link Analysis:

Script snippet:

Case "$ handle" in 2) echo "The handle of the process: "echo" "handle | awk '{print $3" \ n "$5" \ n "$7" \ n "$9" \ n "$11" \ n"} '> temp for I in 'cat temp' do ps-ef | grep $ I | awk' {print "{" $2 "}"": "" {"$8"} ":" "{" $15 "}"} '| grep $ I done rm-rf temp echo "five seconds later, automatically adjusts the previous page. To exit, press ctrl + c: "sleep 5; 1) echo" analysis "echo" "if [$ closewait-ge" 20 "] then echo" CLOSE_WAIT: $ closewait "echo" for a long time there are a large number of CLOSE_WAIT is not released, will lead to slow system response, it is recommended to modify the Linux Kernel Parameter http://cnblogs.com/javame "fi

Script download:

Http://download.csdn.net/detail/yiyu1/7369159

 

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.