Use Glances on Linux

Source: Internet
Author: User

Use Glances on Linux
Use Glances on LinuxTable of Contents1. why use unzip install2.1. install on your watch version3. statistical unzip cpu3.1.1. unzip your switch3.2. load3.2.1. then upload your own faster than network3.6. your file has been downloaded before export4.1. referer1 why use glances

It cannot replace long-term monitoring system. But it's a useful tool to help us find the most important information ASAP.

2 install2.1 install on ubuntu
sudo apt-get install glances
2.2 install on Centos
yum install glances

If the vesion of glances installed by yum is too low, you can use this way to install newest.

curl -L http://bit.ly/glances | /bin/bash
2.3 watch version
glances --versionGlances v2.3 with psutil v2.2.1
3 statistical indicators3.1 cpu3.1.1 indicators
Table 1: cpu indicators
Indicator Description
User  
System  
Idle  
Nice  
Irq  
Iowait  
Steal  
3.1.2 warning
If user|system CPU is <50%, then status is set to "OK"If user|system CPU is >50%, then status is set to "CAREFUL"If user|system CPU is >70%, then status is set to "WARNING"If user|system CPU is >90%, then status is set to "CRITICAL"
3.1.3 switch

To switch to per-CPU stats, just hit the 1 key

3.2 load3.2.1 definition

On the No Sheep blog, Zachary Tirrell defines the load average: "In short it is the average sum of the number of processes waiting in the run-queue plus the number currently executing over 1, 5, and 15 minutes time periods."

3.2.2 warning
Glances gets the number of CPU core to adapt the alerts. Alerts on load average are only set on 15 minutes time period. The first line also displays the number of CPU core.If load average is <0.7*core, then status is set to "OK"If load average is >0.7*core, then status is set to "CAREFUL"If load average is >1*core, then status is set to "WARNING"If load average is >5*core, then status is set to "CRITICAL"Note: limit values can be overwritten in the configuration file under the [load] section.
3.3 mem3.4 swap3.5 network3.6 disk3.7 file system3.8 process3.8.1 indicators
CPU%    % of CPU used by the process If IRIX mode is off (aka Solaris mode), the value is divided by logical core numberMEM%    % of MEM used by the processVIRT    Total program size - Virtual Memory Size (VMS)RES    Resident Set Size (RSS)PID    Process IDUSER    User IDNI    Nice level of the process (niceness other than 0 is highlighted)S    Process status (running process is highlighted)TIME+    Cumulative CPU time usedIOR/s    Per process I/O read rate (in Byte/s)IOW/s    Per process I/O write rate (in Byte/s)COMMAND    Process command line User cans switch to the process name by pressing on the / key
3.8.2 switch
  1. A key
    By default, or if you hit the a key, the processes list is automatically sorted by:    CPU if there is no alert (default behavior)    CPU if a CPU or LOAD alert is detected    MEM if a memory alert is detected    Disk I/O if a CPU iowait alert is detected
    Enter

    Hit enter key, then fill in process filter pattern, e.g. fill in nginx, only nginx process is shown

    4 export4.1 to csv file

    Use argument-export-csv

    glances --export-csv a.csv
    5 referer

    Official documentation

    Author: Dean Chen

    Created:

    Validate

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.