Use glances on Linux

Source: Internet
Author: User

Use glances on linuxtable of Contents
    • 1. Why use Glances
    • 2. Install
      • 2.1. Install on Ubuntu
      • 2.2. Install on Centos
      • 2.3. Watch version
    • 3. Statistical indicators
      • 3.1. CPU
        • 3.1.1. Indicators
        • 3.1.2. Warning
        • 3.1.3. switch
      • 3.2. Load
        • 3.2.1. Definition
        • 3.2.2. Warning
      • 3.3. Mem
      • 3.4. Swap
      • 3.5. Network
      • 3.6. Disk
      • 3.7. File system
      • 3.8. Process
        • 3.8.1. Indicators
        • 3.8.2. Switch
    • 4. Export
      • 4.1. To CSV file
    • 5. Referer
1Why use Glances

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

2Install2.1Install on Ubuntu
sudo apt-get install glances
2.2Install on Centos
Yum Install glances

If the vesion of glances installed by Yum are too low, you could use this-to install newest.

Curl-l Http://bit.ly/glances | /bin/bash
2.3Watch version
Glances--versionglances v2.3 with Psutil v2.2.1
3Statistical indicators3.1Cpu3.1.1Indicators
Table 1: CPU Indicators
indicator Description
User
System
Idle
Nice
Irq
Iowait
Steal
3.1.2Warning
If the User|system CPU is <50% and then the status is set to "OK" if the User|system CPU is >50% and then the status is the set to "careful" if User|system CPU is >70% and then status is set to "WARNING" If User|system CPU is >90% and then status is set to "CRITICAL"
3.1.3Switch

To switch to PER-CPU stats, just hits the 1 key

3.2Load3.2.1Definition

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 minutes time periods. "

3.2.2Warning
Glances gets the number of CPU core to adapt the alerts. Alerts on load average is only set on minutes time period. The first line also displays the number of CPU core. If load average is <0.7*core and then status is set to "OK" if the load average is >0.7*core and then the status is set to "careful "If load average is >1*core and then status is set to" WARNING "if the load average is >5*core and then status was set to" Criti CAL "Note:limit values can be overwritten in the configuration file under the [Load] section.
3.3Mem3.4Swap3.5Network3.6Disk3.7File system3.8Process3.8.1Indicators
CPU%    % of CPU used by the process If IRIX mode is off (aka Solaris mode), the value was divided by logical core Numberm em%    % 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 and than 0 is highlighted) S    process STA Tus (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 pre Ssing on The/key
3.8.2Switch
    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 al ERT is detected
    2. Enter

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

4Export4.1to CSV file

Use Argument–export-csv

Glances--export-csv A.csv
5Referer

Official documentation

Author:dean Chen

CREATED:2016-02-02 two 10:37

Validate

Use glances on Linux

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.