Dstat Usage Details

Source: Internet
Author: User
Tags usleep

There is a performance monitor in Windows, and it is certainly not weak in Linux. I am still using vmstat, iostat, nfsstat, netstat, ifstat... to check the system performance status? Then you will be weak. Today, we will give you an artifact. You only need one of them to get the comprehensive functions of these tools.

Enter the topic after chatting.

Dstat
If the system does not have the yum-y install dstat tool, the software is small and exquisite. The package size is only 144 KB, and the installation size is 660 kb.
By default, this tool dynamically displays the CPU, disk, net, page, and system load conditions, as shown in the following figure. Of course, there will be different colors, which is relatively intuitive, for the moment, we will directly copy and integrate the product. We also hope that you will see Guan haihan, and you will never take a brick.

[Root @ localhost shell] # dstat
---- Total-cpu-usage -----dsk/total--net/total---- paging -- --- system --
Usr sys idl wai hiq siq | read writ | recv send | in out | int csw
1 1 97 1 0 0 | 20 k 8421B | 0 0 | 0 0 | 46 40
6 5 86 0 1 2 | 0 0 | 328B 958B | 0 0 | 111 43
0 0 100 0 0 0 | 0 0 | 60B 1_ B | 0 0 | 18 21
0 1 98 0 0 1 | 0 0 | 60B 1_ B | 0 0 | 39 36
0 0 100 0 0 | 0 0 | 268B running B | 0 0 | 25 16
1 1 98 0 0 0 | 0 0 | 60B 1_ B | 0 0 | 49 39
1 0 99 0 0 0 | 0 0 | 60B 1_ B | 0 0 | 23 15
2 2 95 0 0 1 | 0 0 | 268B 452B | 0 0 | 69 54
2 0 97 0 0 1 | 0 0 | 240B 560B | 0 0 | 54 26
2 2 95 0 1 0 | 0 0 | 60B 1_ B | 0 0 | 60 41

Of course, custom display projects are also required. Let me hear one by one:

Common parameters:

-C cpu: displays CPU system usage, user usage, idle, waiting, interrupted, software interruption, and other information.

-C when multiple CPUs exist, this parameter can display the CPU status as needed.

E. g-C displays CPU 0 and CPU 1 Information

-D disk: displays the size of read/write data on the disk.

-D hda and total

-N net: displays the network status

-When N net has multiple NICs, specify the NIC to be displayed

-L load average: displays the system load

-M memory: displays memory usage

-G page: page usage

-P process: displays the process status

-S swap displays swap partition usage

-S is similar to D/N.

-R I/O requests

-Y system status

-- Ipc displays ipc message queues, signals, and other information.

-- Socket is used to display the tcp udp port status

-A all this is the default option equivalent to-cdngy

-V vmstat is equivalent to-pmgdsc-D total

-- Output file this option is also useful. You can redirect the status information to the specified file in csv format for future viewing. E. g dstat -- output/root/dstat.csv & now let the program run silently in the background and output the results to the/root/dstat.csv File

Of course, there are many more advanced usage of dstat, common basic options, more advanced usage can be combined with man documentation...

End

Recommended reading:

Use and difference of sleep () and usleep () in Linux

Usleep function in Linux

Linux Command-sleep-delay specified time

In Linux, the thread calls sleep and the process is suspended.

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.