Linux Disk monitoring Tool description

Source: Internet
Author: User
Tags cpu usage disk usage

1.1 Iostat

The tools in the system Systat package are counted in kb/s, and 2 is counted as the frequency of 2 seconds:
Iostat–x–k 2 10000

rrqm/s: How much of this device-related read request per second is being merge (when the system call needs to read the data, VFS sends the request to each FS, If FS finds that a different read request reads the same block of data, FS merges the request into merge) and wrqm/s: How much of this device-related write request is merged per second.
RSEC/S: Number of sectors read per second;
wsec/: Number of sectors written per second.
Rkb/s:the Number of read requests that were issued to the device per second;
Wkb/s:the number of write requests tha T were issued to the device per second;
Avgrq-sz average request sector size
Avgqu-sz is the length of the average request queue. There is no doubt that the shorter the queue, the better.     
await:  The average time (in microseconds) of processing per IO request. This can be understood as the response time of IO, generally the system IO response time should be less than 5ms, if greater than 10ms is relatively large. This time includes the queue time and service time, that is, in general, await is greater than SVCTM, their difference is smaller, then the shorter the queue time, conversely, the greater the difference, the longer the queue time, indicating that the system has a problem. The
svctm    represents the average service time, in milliseconds, for each device I/O operation. If the value of SVCTM is close to await, indicating that there is little I/O waiting, disk performance is good, and if the value of await is much higher than the value of SVCTM, the I/O queue waits too long for the applications running on the system to become slower.
%util: All processing io time, divided by total statistic time, in the statistical time. For example, if the statistic interval is 1 seconds, the device has 0.8 seconds to process Io, and 0.2 seconds is idle, then the device's%util = 0.8/1 = 80%, so this parameter implies the device's busy level. Generally, if this parameter is 100% indicates that the device is already running close to full load (of course if it is a multi-disk, even if%util is 100% because of the concurrency of the disk, disk usage may not be the bottleneck).

1.2 Iotop

Need to install Yum install iotop separately
Usage: iotop-d 1-o

-O: Show only processes with IO operations
-B: Batch display, no interaction, mainly used for recording to file.
-N num: Displays NUM times, primarily for non-interactive mode.
-D Sec: Interval sec seconds display once.
-P PID: Monitor the process PID.
-u user: monitored process user.

Common shortcut keys:

1 arrows: Change the sorting method, by default it is sorted by IO.
2 R: Change the sort order.
3 o: Only the process with IO output is shown.
4 p: Toggle of how processes/threads are displayed.
5 A: Displays cumulative usage.
6 Q: Exit.

1.3 SAR

Sar–p–d 2 1000

Description
TPS: The number of requests per second for data to disk devices, including read and write requests, for Rtps and Wtps. For efficiency reasons, instead of processing the request immediately after the IO is issued, the request is merged (merge), where TPs refers to the request count after the request is merged.
Rtps: Number of Read requests to disk devices per second
Wtps: Number of write requests to disk devices per second
Bread: Number of bytes read from disk per second
Bwrtn: Number of bytes written to disk per second
or by: Sar–b 2 1000

or by: Sar–b 2 1000

1.4 Dstat

The Dstat command is a tool for replacing Vmstat, Iostat, Netstat, nfsstat, and Ifstat commands, and is an all-in-one System information statistic tool. Compared with Sysstat, Dstat has a color interface, when manually observing performance conditions, the data is more visible and easy to observe, and Dstat support instant refresh, such as input Dstat 3 is collected every three seconds, but the latest data will be refreshed every second display. As with Sysstat, Dstat can also collect specified performance resources, such as DSTAT-C, which shows CPU usage.


Common options

-C: Displays information such as CPU system occupancy, user occupancy, idle, waiting, interruption, software interruption, etc.
-C: When there are multiple CPUs, this parameter can display the CPU status on demand, for example:-C 0,1 is the information that displays cpu0 and CPU1.
-D: Displays the disk read and write data size.
-D hda,total:include hda and total.
-N: Displays the network status.
-N eth1,total: Specifies the network card to display when there are multiple NICs.
-L: Displays system load conditions.
-M: Displays memory usage.
-G: Displays the usage of the page.
-P: Displays the status of the process.
-S: Displays swap partition usage.
-S: similar to d/n.
-R:I/O request condition.
-Y: System state.
--IPC: Displays information such as IPC Message Queuing, signals, etc.
--socket: Used to display TCP UDP port status.
-A: This is the default option, equivalent to-cdngy.
-V: equivalent to-pmgdsc-d total.
--output files: This option is also useful for redirecting status information to the specified file in CSV format for later viewing. Example: Dstat--output/root/dstat.csv & Now let the program silently run in the background and output the results to the/root/dstat.csv file.

Second, monitoring tools

In fact, these tools are all-rounder, CPU, memory, disk space, network traffic can be monitored, not just to monitor the disk IOPS.

2.1 Nmon

Install under Linux:

[Email protected] ~]# wget http://sourceforge.net/projects/nmon/files/download/nmon_x86_12a.zip/download
[Email protected] ~]# unzip download
Archive:download
Inflating:nmon_x86_rhel45
Inflating:nmon_x86_rhel52
Inflating:nmon_x86_sles9
Inflating:nmon_x86_sles10
inflating:nmon_x86_ubuntu810
Inflating:nmon_x86_fedora10
Inflating:nmon_x86_opensuse10
[email protected] ~]# yum install ld-linux.so.2; Yum Install libncurses.so.5
[Email protected] ~]# chmod +x nmon_x86_rhel52
[Email protected] ~]# MV Nmon_x86_rhel52/usr/local/bin/nmon
#在后台自动以10秒为单位采集60次的样, i.e. 10 minutes
[Email protected] ~]# nmon-s10-c60-f-M.
#检查后台进程
[Email protected] ~]# ps-ef|grep-i Nmon
Root 16872 1 0 13:32 pts/0 00:00:00 nmon-s10-c60-f-M./

Analysis tool: Nmon_analyser
Reference:
Nmon Description:
Http://www.ibm.com/developerworks/cn/aix/library/analyze_aix/index.html
Description of Nmon_analyser:
Http://www.ibm.com/developerworks/cn/aix/library/nmon_analyser/index.html
Analysis is also more than single, enable Excel macros, open a generated Nmon file:

2.2 Zabbix

Zabbix now use more, its configuration ioPS monitoring template has ready-made, direct import can, the plot effect is as follows:

2.3 Cacti

This is not the introduction of CACTI,CACTI as an established tool, the deployment of documents online is more mature. Its ioPS template:
Http://forums.cacti.net/about8777.html
Installation steps See:
1. Unzip Cacti_net-snmp_devio_v3.1.zip (5 Files)
2. Copy Net-snmp_devio.xml to <path_cacti>/resource/snmp_queries/net-snmp_devio.xml
3. Import all *_tmpl.xml files via Cacti "Import Templates" Interface-these Templates should include all their dependanci Es
4. Import the Net-snmp_devio-data_query.xml file last
5. Add "Ucd/net-get Device I/o" Data Query to your SNMP Enabled host using the "Index Count Changed" Re-index Method.
6. Create Graphs for your desired Disk and/or Memory devices.
After completion:

Linux Disk monitoring Tool description

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.