Linux Resource Monitoring Tool

Source: Internet
Author: User
Tags network function

For process and thread awareness, see the previous blog post

http://yunweigou.blog.51cto.com/6299641/1634867


There are many process management tools under Linux, and the following highlights the use of htop/glances/dstat Tools



    • The Htop of process management

      • The htop needs to be installed on its own, and the installation process is not described here. Compared with the top tool, there are too many advantages, do not believe that they see

      • Htop Operation Effect AS

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/6B/96/wKioL1UyGqGg3DR6AAQLsYyXJC0149.jpg "title=" Htop.png "alt=" Wkiol1uygqgg3dr6aaqlsyyxjc0149.jpg "/>


      • 650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/6B/9B/wKiom1UyGwzSbnvAAAQF56N-bWY320.jpg "title = "Htop.png" alt= "wkiom1uygwzsbnvaaaqf56n-bwy320.jpg"/>

      • Click the up and down arrows or move the cursor to select the specified process to track collaboration between the process and the system

      • u: Filtering only the processes of the selected user

      • l: Displays files opened by the process, Related files opened for the Init process

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/6B/9B/wKiom1UyHJby9JDTAAPtrHfUl2s011.jpg "title=" Htop.png "alt=" Wkiom1uyhjby9jdtaaptrhful2s011.jpg "/>



T: Show process Hierarchy A: Set CPU affinity for a process

    • Premise: Multi-processor

    • Flag which CPUs a process is allowed to use

There are also the following common options:

    • -d|--delay=delay: Set the delay update time in seconds

    • -U USERNAME: Displays only the processes of the specified user

    • -S COLUMN: Sort by specified field

    • -P--pid=pid1,pid2 .... Displays only the specified PIDs

    • ...

The following are the functions of F1-F10 and the shortcut keys for corresponding letters:

H? F1 View Htop Usage Instructions
S F2 Htop settings
/ F3 Search process
\ F4 Incremental process Filter
T F5 Show tree structure
<,> F6 Select the Sort method
[ F7 Reduced nice value, run priority setting
] F8 Widening the nice value, with reducing the opposite
K F9 To pass a signal to a process
Q or CTRL + C F10 End Htop


The glances of process management

  • With Htop, the tool should be installed on its own, the installation process no longer one by one repeat

  • Glances is another abuse of system resource management monitoring tools, including CPU, load, memory, disk I/O, network traffic, file system, system temperature and other information

  • Glances can monitor the machine or monitor other machines through the client server mode, glances provides XML/RPC-based APIs for other program calls, programmable, glances can save the data output to CSV or HTML-formatted files for easy processing by other programs (report or draw a graphic)

  • The options are as follows:

    • -B: Display the network card exchange rate in BYTE/S units

    • -B @IP |host: Bind server-side IP address or host name

    • -D: Turn off disk I/O functionality

    • -f/path/to/file: Device output file

    • -O {html| CSV}: Specify the output file format (in CSV or HTMLformat)

    • -M: Close mounted disk module

    • -N: Turn off network function module

    • -r: Close Process List Function module

    • -T #: Set screen refresh interval, default 3 seconds (there is a post write 2 seconds, after long comments, indeed 3 seconds =.=!)


  • Support Remote mode: that is, working in C/S mode

    • -C: The IP address of the server used for the connection


    • Glances-s-B ipaddr

    • Glances-c ipaddr

    • Server side: Start glances in listening mode

    • Client: Start glances in remote mode, remotely link to the specified server, and display dependency performance data on the server

    • Service mode:

Process management dstat650) this.width=650; "Src=" http://s3.51cto.com/wyfs02/M00/6B/9B/wKiom1UyKFjwx_gfAAJ07IAy3vg220.jpg " Title= "Htop.png" alt= "wkiom1uykfjwx_gfaaj07iay3vg220.jpg"/> installation process omitted ... Properties:

    • integration of Vmstat,iostat,netstat and Ifstat tools (sounds like a big drawback)

    • Real-time statistics


    • developed in Python, Easy to extend existing work tasks



    • very accurate time accuracy, Several times the system load is high and does not delay display


    • Different colors display different units


    • In analysis and troubleshooting is possible by enabling monitoring entries and sorting


    • And so on very powerful bar 650) this.width=650; "Src=" http://img.baidu.com/ Hi/jx2/j_0003.gif "alt=" J_0003.gif "/>

Dstat [-AFV] [OPTIONS ...] [Delay[count]] Options:

  • -A: Collection cdngy these options

  • -C: Display statistics related to CPU performance metrics

  • -D: Show disk-related rate data

  • -G: Show page-related rate data

  • -I: Show interrupt-related rate data

  • -L: Show statistics related to load average

  • -M: Show memory-related statistics

  • -N: Displaying network-related statistics

  • -P: Show process-related statistics

  • -R: Show I/O request rate

  • -S: displays statistics related to swap

  • -Y: Displays system-related data, including interrupts and process transitions

  • --TOP-CPU: Shows the process that accounts for the most CPU

  • --top-bio: Shows the process that consumes block IO most

  • --top-io: Shows the process that most consumes I/O

  • --top-mem: Show the most memory-intensive processes

  • --IPC: Show rate data related to interprocess communication

  • --raw: Displaying data about raw (bare) sockets

  • --TCP: Displaying data related to TCP sockets

  • --UDP: displaying UDP socket-related data

  • --unix: Displaying statistics related to UNIX sock interfaces

Common combinations:

    • Dstat-cndymlp-n total-d Total 525 statistics Cpu,io, Network,system load

    • Dstat-cdnsil-d hda-n eth1 Statistics nic 1 information

    • Dstat–vmstat Memory Usage

Note: There are so many options, but most of the options can still be remembered =.=~

This article is from the "Ops Dog" blog, make sure to keep this source http://yunweigou.blog.51cto.com/6299641/1634892

Linux Resource Monitoring Tool

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.