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 install and use Glances on Ubuntu system

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

Share

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

This article mainly explains "how to install and use Glances on Ubuntu system". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to install and use Glances on Ubuntu systems.

Glances is an open source command line system monitoring tool for Linux and BSD. It is developed in Python language and can monitor information such as CPU, load, memory, disk ID O, network traffic, file system, system temperature and so on.

Glances provides Unix and Linux performance experts with the ability to monitor and analyze performance data, including:

CPU utilization rate

Memory usage

Kernel statistics and run queue information

Disk Icano speed, transfer and read / write ratio

Free space in the file system

Disk adapter

Network Icano speed, transmission and read / write ratio

Page space and page speed

Processes that consume the most resources

Computer information and system resources

The glances tool can display important system information on the user's terminal in real time and update it dynamically. This efficient tool can work on any terminal screen. In addition, it does not consume a lot of CPU resources, usually less than 2%. Glances displays the data on the screen and updates it every two seconds. You can also change this interval to a longer or shorter value yourself. The glances tool can also capture the same data to a file, making it easier to analyze and graph the report later. The output file can be in spreadsheet format (.csv) or html format.

Install Glances

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

The code is as follows:

Sudo apt-get install glances

(note: 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:

The code is as follows:

Glances

You will see output similar to the following:

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

By default, the interval 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:

The code is as follows:

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 keyboard shortcuts 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: sort processes by process name

C: sort processes by CPU occupancy

I: sort processes by Imax O frequency

A: automatic sorting process

D: show / hide disk Iamp 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: exit

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:

The code is as follows:

Glances-s

You will see output similar to the following:

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.

The code is as follows:

Glances-c-P 192.168.1.10

At this point, I believe you have a deeper understanding of "how to install and use Glances on the Ubuntu system". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

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