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

What is the advanced real-time system monitoring tool for Linux

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

Share

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

This article will explain in detail how the advanced real-time system monitoring tools applicable to Linux are, and the content of the article is of high quality, so the editor will share it for you as a reference. I hope you will have some understanding of the relevant knowledge after reading this article.

Previously, we have written a number of Linux system monitoring tools that can be used to monitor Linux system performance, but we think that most users prefer the default tool (top command) that comes with the Linux distribution.

The top command is the real-time task manager in Linux and the most commonly used system monitoring tool in the GNU/Linux distribution to find performance-related bottlenecks in the system, which helps us to take corrective action. It has a good minimalist interface and provides some reasonable options so that we can quickly and better understand the overall system performance.

However, sometimes it is tricky to find an application / process that consumes a lot of system resources, which is difficult to achieve in top. Because the top command cannot highlight programs that consume a lot of CPU,RAM and other resources.

To implement this approach, we introduced a powerful system monitor called Glances, which automatically highlights programs that are using the highest system resources and provide the most information about the Linux/Unix server.

What is Glances?

Glances is a system monitoring tool written in Python language based on cross-platform command line curses, which uses the psutil library to obtain information from the system. With Glance, we can monitor CPU, average load, memory, network interface, disk Imax O, process and file system space utilization.

Glances is a free tool that monitors GNU/Linux and FreeBSD operating systems under the GPL license. Many interesting options are also available in Glances. One of the main features seen in Glances is that we can set thresholds (caution, warning, and severity) in the configuration file, and the information will be displayed in color, indicating bottlenecks in the system.

Glances function

CPU information (user-related applications, system core programs and idle programs).

Total memory information, including RAM, swap, available memory, etc.

Average CPU load for the past 1 minute, 5 minutes and 15 minutes.

The network download / upload rate of the network connection.

Total number of processes, active processes, sleep processes, etc.

Disk Icano related (read or write) speed details

Disk usage of currently installed devices.

The top processes and their CPU / memory usage, name and application location.

Displays the current date and time at the bottom.

Highlight the processes that consume the highest system resources in red.

The following is a sample screenshot of Glances.

Install Glances in a Linux / Unix system

Although it is a relatively new utility, you can install "Glances" on Red Hat-based systems by opening the EPEL repository and running the following command on the terminal.

On RHEL/CentOS/Fedora

Yum install-y glances

On Debian/Ubuntu/Linux Mint

Sudo apt-add-repository ppa:arnaud-hartmann/glances-stable sudo apt-get update sudo apt-get install glances

Glances usage

First, start glances on the terminal.

Press "Q" or ("ESC" or "Ctrl&C" is also possible) to exit from the Glances terminal.

By default, the interval is set to "1" seconds. However, you can define custom intervals when you run glances from a terminal.

Glances-T2

Glances color code

The meaning of Glances color code:

Green: OK (everything is fine)

Blue: CAREFUL be careful (need to be careful)

Purple: WARNING warning (alarm)

Red: CRITICAL serious (dangerous)

We can set the threshold in the configuration file. By default, the threshold is set to (careful=50, warning=70 and critical=90), which we can customize as needed. The default profile is located in "/ etc/glances/glances.conf".

Glances option

In addition to several command-line options, scan provides more hotkeys to find output information while scanning. The following is a list of several hotkeys.

A-automatically sort processes

C-sort processes by CPU%

M-sort procedure by MEM%

P-sorts processes by name

I-sort processes by Imax O rate

D-Show / hide disk I / O statistics

F-Show / hide file system

N-Show / hide network statistics

S-Show / hide sensor statistics

Y-Show / hide hddtemp statistics

L-Show / hide logs

B-Bytes or bits of the network I/Oools

W-Delete warning log

X-Delete warnings and important logs

1-Statistics for global CPU or per CPU

H-Show / hide this help screen

T-View the combination of the network IBG O

U-View accumulated network IBO

Q-exit (Esc and Ctrl-C are also available)

Using Glances on a remote system

With Glances, you can even monitor remote systems. To use "glances" on a remote system, run the "glances-s" (- s enables server / client mode) command on the server.

# glances-s Define the password for the Glances server Password: Password (confirm): Glances server is running on 0.0.0.0 Password 61209

Note: after issuing the "glances" command, it will prompt you to define the password for the Glances server. Define the password and press Enter, and you will see what is running on port 61209.

Now, go to the remote host and execute the following command to connect to the Glances server by specifying the IP address or hostname, as shown below. This is my glances server IP address "172.16.27.56".

# glances-c-P 172.16.27.56

Here are some key points that users must know when using Glances in server / client mode.

* in server mode, you can set the binding address-B ADDRESS and the listening TCP port-p PORT.

* in client mode, you can set the server's TCP port-p PORT.

* the default binding address is 0.0.0.0, but it listens on all network interfaces on port 61209.

* in server / client mode, the limit is set by the server side.

* you can also define a password to access the server-P password.

Glance is a resource-friendly tool for most users. However, if you are a system administrator and want to quickly understand the overall "ideas" of the system by browsing the command line, then this tool will be a tool that the system administrator must have.

On how the advanced real-time system monitoring tools for Linux is shared here, I hope the above content can be of some help to 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