Application of Script Ten: I/O read/write process detection

Source: Internet
Author: User

test System version : CentOS 6.4

role: Statistical sequencing of frequent I/O Read and write operations

implementation: Open the logging function, wait for a period of time to do statistics


Demonstrate:

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/7F/0A/wKioL1cQwKayYs7-AAAbwt_Va-0044.png "style=" float: none; "title=" 1.png "alt=" Wkiol1cqwkayys7-aaabwt_va-0044.png "/>


650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/7F/0C/wKiom1cQv-2yKS9yAAA2JsKMWR0437.png "style=" float: none; "title=" 2.png "alt=" Wkiom1cqv-2yks9yaaa2jskmwr0437.png "/>



Code area:

#/bin/bash# ly#------------------# Copyright 2016.04.15 Lingyi ([email protected]) Qq:1519952564trap ' 2tput Civisech O-n Please wait 10s ... echo-ne ' \e[6n ' READ-SDR pospos=${pos#*[}pos= ($ (echo $pos | tr '; ' ")) for ((i=9; i>=0; i--)) do Echo-ne" \033[${pos[0]};$ ((pos[1]+1)) h[$i]\033[0m "Sleep 1done & dmesg-c &> /dev/nullecho 1 >/proc/sys/vm/block_dumpsleep 10ECHODMESG | awk '/(read| write|dirtied)/{process[$1]++} END {for (x in process) print x,process[x]} ' |sort-k 2-nr |head-n 10echo 0 >/proc/s Ys/vm/block_dumptput Cnorm







This article is from the "retrograde person" blog, please be sure to keep this source http://lingyi.blog.51cto.com/2837715/1764271

Application of Script Ten: I/O read/write process detection

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.