Basic usage of htop, dstat, and glances monitoring tools in CentOS6.6

Source: Internet
Author: User

Environment Description: vmware11+centos6.6

First, Htop

Htop is an interactive process browser under Linux that can be used to replace the top command under Linux.

#htop直接启动htop命令, the start interface is as follows, where we can view information about the process running

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/6B/C6/wKiom1U2YA2isUyRAAu7vHw70F8175.jpg "title=" image 1. PNG "width=" "height=" 328 "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:750px;height:328px; "alt=" Wkiom1u2ya2isuyraau7vhw70f8175.jpg "/>

Description

1. In this image, the memory, swap partition, process count, load balancer information 650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M01/6B /c6/wkiom1u2yaailwt1aadcgz5ndgc782.jpg "title=" image 2.png "width=" height= "border=" 0 "hspace=" 0 "vspace=" 0 " Style= "WIDTH:750PX;HEIGHT:72PX;" alt= "Wkiom1u2yaailwt1aadcgz5ndgc782.jpg"/>1 and 2 indicate CPU usage per core

MEM indicates memory usage

SWP indicates the swap partition occupancy rate

Tasks represents the total number of processes, the number of currently running processes

Load average for every 5, 10, 15 minutes

Uptime indicates system run time

2 . in this figure, the PID, user, ni and other related information are shown

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/6B/C2/wKioL1U2ZWuifAJMAAF_jfmPWIg780.jpg "title=" Image 3. PNG "alt=" wkiol1u2zwuifajmaaf_jfmpwig780.jpg "/>

PID indicates the process flag number
user name that represents the process owner
PRI represents the priority level of a process
NI represents the priority level value of the process
VIRT represents the virtual memory value that the process consumes
RES represents the physical memory value that the process occupies
SHR represents the shared memory value used by the process
s represents the state of the process, where s indicates hibernation, R is running, Z represents a zombie state, n indicates that the process precedence value is negative
CPU% indicates the CPU usage consumed by the process
mem% Indicates the percentage of physical memory and total memory consumed by the process
time+ indicates The total CPU time that was consumed after the process was started
command indicates the start command name of the process startup

3. In this diagram, the various functions of F1-F10 are shown

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/6B/C9/wKiom1U2_6vhz-scAACNVkeIwe0862.jpg "title=" Image 4. PNG "width=" "height=" "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:750px;height:28px "alt=" wkiom1u2_ " 6vhz-scaacnvkeiwe0862.jpg "/>f1,h View Help information

F2,s Settings Preferences

f3,/Find

F4,i Reverse Sort

F5,t is displayed in a tree-like form

F6,> Selecting fields for sorting

f7,],-: Increase process priority;

f8,[,+: Reduce process priority

F9,k:kill process;

F10,q,q: Exit

4.htop Common interactive commands and options

Common Interactive Commands:

U: Filter only show processes for selected users

S: Tracks system calls initiated by the selected process

L: Displays the files opened by the selected process

T: Show hierarchy of processes

A: Sets the CPU affinity of the process (binds a particular process to the specified CPU)

Options:

-D #: Delay duration

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

-S COLUMN: Sort according to the specified field

Second, glances

The glances tool can display important system information in real time on the user's terminal and update it dynamically. This efficient tool can work on any terminal screen. In addition, it does not consume a lot of CPU resources, usually less than 2%. The glances displays the data on the screen and updates it every two seconds. You can also change this time interval to a value that is longer or shorter. The Glances tool can also capture the same data to a file for later analysis and drawing of the report. The output file can be in the form of a spreadsheet (. csv) or HTML format.

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/6B/C6/wKioL1U3BPPC4fXbAAdUQx-PUI0937.jpg "title=" image 5. PNG "width=" "height=" 325 "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:750px;height:325px; "alt=" Wkiol1u3bppc4fxbaaduqx-pui0937.jpg "/>

Description

  1. Glances common options

    -B: Show Network connection speed byte/sec

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

    -C @IP |host: Connect glances server Side

    -C File: Set profile default is/etc/glances/glances.conf

    -D: Turn off the disk I/O module

    -E: Display sensor temperature

    -F file: Set output files (in HTML or CSV format)

    -M: Close mounted disk module

    -N: Shut down the network module

    -P Port: Set the Run port by default is 61209

    -p Password: setting client/server password

    -S: Set glances run mode to server

    -T sec: Sets the time interval for the screen refresh, in seconds, and the default value of 2 seconds, value License range: 1~32767

    -H: Display Help information

    -V: Display version information

2. Use h for help information

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/6B/C6/wKioL1U3Bo-T3Or8AAQcnv3GPMo519.jpg "title=" image 6. PNG "alt=" wkiol1u3bo-t3or8aaqcnv3gpmo519.jpg "/> three, Dstat

Dstat integrates the functions of vmstat, Iostat, Netstat, ifstat and other tools.

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/6B/CA/wKiom1U3ByCjrWmzAAPW2qhzGug583.jpg "title=" image 7png.png "alt=" wkiom1u3bycjrwmzaapw2qhzgug583.jpg "/> description

1. Common options

-C: Display statistics related to CPU performance metrics

-D: Show disk-related statistics

-G: Show page-related rate data

-I: Show interrupt related rate data

-L: Displays statistics related to load average (average load)

-M: Show memory-related statistics

-N: Shows the rate of data sent to and from the network

-P: Show process-related statistics

Rate of-R:I/O requests

-S: Show data about swap

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

2. Other options

--TOP-CPU: Show CPU-intensive processes

--top-bio: Displays the process of the most consumed block device block IO

--top-io: Show processes that occupy I/O

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


--IPC: Show rate data related to interprocess communication

--raw: Displaying data related to raw sockets

--TCP: Displaying data related to TCP sockets

--UDP: Displaying data related to UDP sockets

--unix: Displaying statistics related to UNIX sock interfaces

Other information about Dstat can be found using the man manual.


This paper mainly explains the basic usage of htop, dstat and glances monitoring tools in CentOS6.6.


This article from the "Linux Learning" blog, declined reprint!

Basic usage of htop, dstat, and glances monitoring tools in CentOS6.6

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.