How to Use the Glances Monitoring System on Ubuntu

Source: Internet
Author: User

How to Use the Glances Monitoring System on Ubuntu
GuideGlances is a cross-platform, text-based command line tool for monitoring systems. It is written in Python and obtained from the system using the psutil library. You can use it to monitor CPU, average load, memory, network interfaces, disk I/O, file system space utilization, mounted devices, all active processes, and processes that consume the most resources. Glances has many interesting options. One of its main features is the ability to set thresholds in the configuration file (careful caution, warning, critical fatal), and then it displays information in different colors to indicate the bottleneck of the system.

Glances Functions

◆ Average CPU load

◆ Number of processes in different States (such as activity and sleep)

◆ All memory information, such as physical memory, swap space, and idle memory

◆ CPU Information

◆ Uplink/downlink speed of network connection

◆ Disk I/O read/write speed details

◆ Disk usage of the current mounted device

◆ Processes that consume the most resources and their CPU/memory usage

Install Glances

Glances is in the Ubuntu software repository, so the installation is simple. Run the following command to install Glances:

sudoapt-getinstallglances

If it cannot be used properly after installation, you can use pip to install/upgrade glances:

sudopipinstall--upgradeglances
Glances usage

After the installation is complete, run the following command to start Glances:

glances

You will see similar output:

Glances monitor system output

To exit the Glances terminal, Press ESC or Ctrl + C.

By default, the time interval (display the data refresh interval) is 1 second, but you can customize the time interval when you start Glances from the terminal.

To set the interval to 5 seconds, run the following command:

glances-t5
Meanings of different colors in Glances:

◆ Green: normal (OK)

◆ Blue: careful)

◆ Purple: warning)

◆ RED: critical)

By default, the Glances threshold is: careful = 50, warning = 70, and critical = 90. You can use the default configuration file glances. conf In the "/etc/glances/" directory to customize these thresholds.

Glances options

Glances provides many shortcut keys that can be used to find output information during its running.

Below are some common hotkeys:

◆ M: Process sorted by memory usage

◆ P: Process by process name

◆ C: Process sorted by CPU usage

◆ I: Process sorting by I/O frequency

◆ A: Automatic Sorting Process

◆ D: Display/hide disk I/O statistics

◆ F: displays/hides statistics of the file system.

◆ S: Display/hide sensor statistics

◆ Y: Display/hide hard disk temperature statistics

◆ L: Display/hide logs

◆ N: Display/hide network statistics

◆ X: delete warning and severe logs

◆ H: Display/hide the Help Page

◆ Q: Exit

◆ W: delete warning records

Use Glances to monitor remote systems

You can also use Glances to monitor remote systems. To use it on a remote system, run the following command:

glances-s

You will see the output similar to the following:

Glances monitor remote system server

As you can see, Glances runs on port 61209.

Now, run the following command on a remote machine to connect to the Glances server with the specified IP address. Suppose 192.168.1.10 is the IP address of your Glances server.

glances-c-P192.168.1.10

Conclusion

For every Linux system administrator, Glances is a very useful tool. Using it, you can easily and efficiently monitor Linux systems. If you have any questions, please comment freely!

From: http:// OS .51cto.com/art/201601/504029.htm

Address: http://www.linuxprobe.com/monitorin-system-ubuntu.html


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.