Linux Server Performance Evaluation and Optimization and monitoring tools --- dstat

Source: Internet
Author: User

I. usage instructions

Most of the shoes engaged in O & M are still using sysstat. It provides iostat, mpstat, cifsiostat, sar, and other tools, dstat is a tool used to replace vmstat, iostat netstat, nfsstat, and ifstat commands. It is an all-around system information statistics Tool. it is written in Python. Compared with sysstat, dstat is dynamically displayed on a color interface, so that data is conspicuous, easy to observe, and clear at a glance. dstat supports instant refresh, you can use relevant parameters to specify what to display! .

The following introduces the mysterious world of dstat !!!!!!!!!!!!!!

Official station: http://dag.wieers.com/home-made/dstat/#download


PS: by default, dstat is installed in the RHEL series. For CentOS series, follow the steps below to install it easily!

[Root @ twexdb1 ~] # Cat/etc/issue

Red Hat kerberiselinux Server release 5.3 (Tikanga)

Kernel \ r on an \ m

[Root @ twexdb1 ~] # Rpm-qa | grep dstat

Dstat-0.6.6-3.el5


Upgrade to dstat-0.7.2-1 on RHEL 5.3 as follows:

[Root @ twexdb1 ~] # Rpm-Uvh dstat-0.7.2-1.el5.rfx.noarch.rpm

Warning: dstat-0.7.2-1.el5.rfx.noarch.rpm: Header V3 DSA signature: NOKEY, key ID 6b8d79e6

Preparing... ######################################## ### [100%]

1: dstat ####################################### #### [100%]

[Root @ twexdb1 ~] # Which dstat

/Usr/bin/dstat

[Root @ twexdb1 ~] # File/usr/bin/dstat

/Usr/bin/dstat: apython script text executable


Ii. dstat Installation

[Root @ MySQL56-s ~] # Wget http://pkgs.repoforge.org/dstat/dstat-0.7.2-1.el5.rfx.noarch.rpm

[Root @ MySQL56-s ~] # Rpm-ivh dstat-0.7.2-1.el5.rfx.noarch.rpm

Warning: dstat-0.7.2-1.el5.rfx.noarch.rpm: Header V3 DSA signature: NOKEY, key ID 6b8d79e6

Preparing... ######################################## ### [100%]

1: dstat ####################################### #### [100%]


Iii. Instructions for use

1. Use syntax

Dstat [-afv] [options...] [delay [count]

Simply execute the dstat command:

650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131227/1R4163407-0.jpg "title =" 0.jpg"/>

Without the task parameters, it only collects data such as collectlcpu, disk, net, paging, and system. The default value is 1 s. by default, dstat is the same as dstat-cdngy 1 or dstat-a 1.


2. dstat Parameters

-C,-cpu Display CPU status

-C 0, 3, totalinclude cpu0, cpu3 and total

-D and-disk display disk Information

-D total, hdainclude hda and total

-G,-page enable pagestats

-I,-int enableinterrupt stats

-I 5, eth2 includeint5 and interrupt used by eth2

-L,-load enable loadstats

-M,-mem Display memory Conditions

-N,-net displays network conditions

-N eth1, total can specify Network Interfaces

-P,-proc enableprocess stats

-S and-swap show swap status

-S swap1, total can specify multiple swap

-T,-time enable timecounter

-Y,-sys enablesystem stats

-Ipc reports the use of IPC message queues and semaphores

-Lock enable lockstats

-Raw enable raw stats

-Tcp enable tcp stats

-Udp enable udp stats

-Unix enable unixstats

-M stat1, stat2 enableexternal stats

-Mod stat1, stat2

-A,-all use-cdngy by default.

-F,-full use-C,-D,-I,-N and-S display

-V,-vmstat use-pmgdsc-D Display

-Integer show integervalues

-Nocolor disablecolors (implies-noupdate)

-Noheaders is not displayed after only one header is displayed. It is useful when you use redirection to write files.

-Noupdate disableintermediate updates

-Write the output file to the CVS file.

Most of the above parameters are easy to understand, all the comrades in English can understand ...........................


3. Instance

Instance 1: dstat sda-D3 5 # Only the information of the sda disk is displayed based on the default display content.

The value 3 5 here is the same as that of vmstat 5, meaning that it is updated every 3 seconds for a total of 5 times, but there is a small difference here that it should be displayed at the first time, not included!

650) this. width = 650; "src =" http://img1.51cto.com/attachment/201305/211822688.jpg "title =" 1.jpg"/>

Instance 2: dstat-cdlmnpsy # CPU, IO, load, memory, network, process, swap, system

650) this. width = 650; "src =" http://img1.51cto.com/attachment/201305/212035245.jpg "title =" 2.jpg"/>

Instance 3: date & dstat-tclmdny 10 # monitor once every 10 seconds

650) this. width = 650; "src =" http://img1.51cto.com/attachment/201305/212117939.jpg "style =" float: none; "title =" 3.jpg"/>

650) this. width = 650; "src =" http://img1.51cto.com/attachment/201305/212119578.jpg "style =" float: none; "title =" 3-2.jpg "/>

Example 4: dstat-cdlmnyp-N total-D total 3 5

650) this. width = 650; "src =" http://img1.51cto.com/attachment/201305/212137892.jpg "title =" 4.jpg"/>

The display content of related modules is the same as that of top, vmstat, iostat, and other tools. For example, cpu-related usr indicates the percentage of application space, that is, the percentage occupied by the application, sys indicates the percentage of space occupied by the system kernel, idl indicates the CPU is idle, wai indicates the number of IO waits, and hiq and sig indicate the service interruption information.

The rest will not be described one by one. They are relatively simple!

OK. Here is a brief introduction. This tool is simple to use and can be displayed intuitively. You need to practice and observe the tools at ordinary times to become familiar with them!


Reference Site: http://wiki.51osos.com/index.php? Title = Dstat & printable = yes

Http://dag.wieers.com/home-made/dstat




This article is from the "->" blog, please be sure to keep this source http://opsmysql.blog.51cto.com/2238445/1202135

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.