Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use Glances Monitoring system on Ubuntu

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article is about how to use the Glances monitoring system on Ubuntu. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

Glances is a cross-platform, text-based command line tool for monitoring systems. It is written in Python and uses the psutil library to get information from the system. You can use it to monitor CPU, average load, memory, network interface, disk ID 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 that it can set thresholds in the configuration file (careful caution, warning warning, critical fatal), and then it will display information in different colors to indicate the bottleneck of the system.

The function of Glances

Average load of ◆ CPU

Number of ◆ processes in different states (such as active, dormant)

◆ all memory information, such as physical memory, swap space, free memory

◆ CPU Information

Uplink / downlink speed of ◆ network connection

◆ disk I / O read / write speed details

Disk usage of ◆ current mount devices

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

Install Glances

Glances is in Ubuntu's software repository, so installation is easy. Execute the following command to install Glances:

Sudo apt-get install glances

If it cannot be used properly after installation, consider using pip to install / upgrade glances:

Sudo pip install-upgrade glances

How to use Glances

After the installation is complete, you can start Glances by executing the following command:

Glances

You will see output similar to the following:

Glances monitor system output

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

By default, the interval (the interval between displaying data refreshes) is 1 second, but you can customize the interval when you start Glances from the terminal.

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

Glances-t 5

Different color meanings in Glances

The meaning of different colors in Glances:

◆ green: normal (OK)

◆ blue: be careful (careful)

◆ purple: warning (warning)

◆ red: fatal (critical)

By default, the threshold setting for Glances is careful=50,warning=70,critical=90. You can customize these thresholds through the default configuration file glances.conf in the "/ etc/glances/" directory.

Options for Glances

Glances provides a number of shortcut keys that can be used to find output information while it is running.

Here is a list of some common hotkeys:

◆ m: sort processes by memory footprint

◆ p: sorts processes by process name

◆ c: sort processes by CPU occupancy

◆ I: sorts processes by frequency of iThanks

◆ a: automatic sorting process

◆ d: shows / hides disk iAccord O statistics

◆ f: show / hide file system statistics

◆ s: show / hide sensor statistics

◆ y: show / hide hard disk temperature statistics

◆ l: show / hide logs

◆ n: show / hide network statistics

◆ x: delete warnings and critical logs

◆ h: show / hide the help interface

◆ Q: quit

◆ w: delete warning record

Using Glances to monitor remote system

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

Glances-s

You will see output similar to the following:

Glances monitor remote system server

As you can see, Glances runs on port 61209.

Now, execute the following command on the remote machine to connect to the Glances server at the specified IP address. Suppose 192.168.1.10 is your Glances server IP address.

Glances-c-P 192.168.1.10 Thank you for reading! This is the end of the article on "how to use the Glances monitoring system on Ubuntu". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report