A Glances Introduction
Glances is an open source command line system Monitoring tool for Linux and BSD, which is developed using the Python language to
Monitor CPU, load, memory, disk I/O, network traffic, file system, system temperature, and more. Glances can monitor this
Machine can also monitor other machines through the client server mode; glances provides XML/RPC-based APIs for other programs
Call, programmable; Glances can save data output to CSV or HTML-formatted files for other programs to process (report or
Draw graphics)
Two Installation of software
This article mainly introduces the installation on the Centos6.x series, can go to glances's Open source official website to download the installation, the URL is: https://github.com/nicolargo/glances, installation can use PIP to install, similar to Yum, note Centos
And after installing PYTHON-PIP under Fedora, the keyword is not pip but Pip-python.
#rpm-IVH Http://fr2.rpmfind.net/linux/epel/6/x86_64/epel-release-6-7.noarch.rpm#yum Install Python-pip Python-devel#pip-python Install glances
Three Use of the Software
After the installation is complete, the command line input glances can start the software, after the launch can see the following interface
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/57/95/wKiom1SemLjQkMOvAAHFdDtvOb4107.jpg "title=" 1.png " Width= "680" height= "242" border= "0" hspace= "0" vspace= "0" style= "width:680px;height:242px;" alt= " Wkiom1semljqkmovaahfddtvob4107.jpg "/>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/57/92/wKioL1SemZDTYA1GAACwnETpuQo201.jpg "title=" 2.png " Width= "680" height= "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:680px;height:85px; "alt=" Wkiol1semzdtya1gaacwnetpuqo201.jpg "/>
Usage of CPU, load, memory, swap (swap partition), respectively
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/57/95/wKiom1SemQfylFOgAAGuTTsx_JM536.jpg "title=" 3.png " Width= "680" height= "279" border= "0" hspace= "0" vspace= "0" style= "WIDTH:680PX;HEIGHT:279PX;" alt= " Wkiom1semqfylfogaaguttsx_jm536.jpg "/>
Left * * * Border inside the section, from top to bottom respectively, the network card eth0 receive and send, hard disk each partition read and write, here My computer is more idle, see all 0, the last is the root partition drive usage, there is no temperature module installed, you can install Lm_ Sensors software to monitor the motherboard, CPU operating voltage, fan speed, temperature and other data. It is convenient to check the temperature status of the love machine.
The upper right half, the green border is, the current System Task window, that is, there are now 106 processes, 180 threads, 1 are running, 106 hibernate, no zombie process.
The following red border is the details of the current process, which is only part of the following, mainly
VIRT |
Virtual Memory Size |
Res |
The physical memory value that the process occupies |
%cpu |
CPU usage consumed by this process |
%MEM |
The percentage of physical memory and total memory that the process occupies |
Pid |
PID number of the process |
USER |
User name of the process owner |
time+ |
Total CPU time elapsed after the process was started |
Io_r |
Read rate of the process |
Io_w |
The write rate of the process |
NAME |
The name of the process |
NI |
Priority of the process |
S |
Status of the process, s indicates hibernation, R is running, Z indicates zombie state |
Use the H key to get help information
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/57/95/wKiom1SembjCRETPAAGx9J7eeB8290.jpg "title=" 4.png " Width= "680" height= "194" border= "0" hspace= "0" vspace= "0" style= "width:680px;height:194px;" alt= " Wkiom1sembjcretpaagx9j7eeb8290.jpg "/>
The role of the various keys behind the introduction of the English, here do not list out, do not know the meaning of, you can check the Internet,
are relatively simple in English. Now let's introduce some of the advanced uses of glances.
Display in HTML format, you need to install the appropriate software to display the HTML-formatted file
#pip-python Install JINJA2
#glances –o html–f/var/www/index.html
When the installation is complete, open the Web service and enter the address to access
Enter the CSV format file and open it using the LibreOffice Calc Tool
#glances –o Csv–f/data/glances.csv
Glances how servers and clients work
Glances supports server and client mode of operation, can realize remote monitoring, need to ensure that both machines are installed
Glances Service
Start at server-side: glances–s–b 172.16.249.163 (IP address of client)
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/57/92/wKioL1SemujBFSbcAABflwgckGM059.jpg "title=" 5.png " Width= "680" height= "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:680px;height:58px; "alt=" Wkiol1semujbfsbcaabflwgckgm059.jpg "/>
You can see that the port number of the glances is 61209 to ensure that the server-side firewall allows the client to connect, for convenience, here I
Let a machine do both server and client. Here is the client connection
#glances –c 172.16.249.163, you can see the machine running on the server side.
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/57/92/wKioL1SemxnCu3b3AAEDDTsqj-o835.jpg "title=" 6.png " Width= "680" height= "113" border= "0" hspace= "0" vspace= "0" style= "width:680px;height:113px;" alt= " Wkiol1semxncu3b3aaeddtsqj-o835.jpg "/>
You can see that it is already connected to 172.16.249.163.
Four Summarize
The above is the basic use of glances, you can see it is relatively simple. Use it a few times more, and that's just a personal
Simple use of knowledge, there is nothing wrong to hope that you have a lot of readers advice, greatly appreciated.
This article is from the "Devil of Tears" blog, please be sure to keep this source http://sepizi.blog.51cto.com/9773154/1596638
Linux Glances Basic use