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 are the common monitoring tools of Linux 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 introduces what the common monitoring tools of Linux system are, which can be used for reference by interested friends. I hope you can get a lot after reading this article. Let's take a look at it.

Top command

I think we are all familiar with the top command! the top command under Linux is somewhat similar to the task manager under Windows, which can monitor and display the resource consumption of various processes in the system in real time and dynamically. It is a commonly used performance monitoring and analysis tool under Linux.

The execution view of a common top command is as follows:

Below, let's mark the meaning of each indicator in the chart in detail. Take a closer look at the picture and compare it with each other (save the chart for reference if necessary):

Well, it's intuitive enough to understand. As for some other parametric uses of the top command, it's too much to dwell on it!

Htop command

Htop is an interactive process browser under Linux, which can completely replace the top command described in the previous section. Compared with the top command, the htop command has the following advantages:

Directly support mouse click operation (just ask you 6 or not 6!)

The picture can scroll horizontally and vertically, more like a window

You can track the process and display the files opened by the process

The tree view that supports the process shows

Support to find processes by name

All in all, 66% of the visualization has been done, let's experience it:

As far as the picture is concerned, it is divided into three parts:

At the top is an overview of resource usage, and this progress bar looks cool.

In the middle is the schedule, similar to the top command

Here are the instructions and keyboard shortcuts.

Let's take a look at some graphical operations:

Process tree view

Click on various indicators to sort

Tracking process function

Iotop command

Iotop is used to monitor the use of hard disk IO. The UI interface is similar to top, including PID, user, IPID O, process and other related information.

Most of the IO statistical tools included in the system under Linux, such as iostat,nmon, can only count the reading and writing of per devices. If you want to know how each process uses IO, it is more troublesome to use the iotop command to view it.

Iftop command

Iftop is a Linux system traffic and bandwidth monitoring tool, can be used to view real-time network traffic, monitor TCP/IP connections, etc., is also very useful!

Let's do an experiment. The effect of the command is as follows:

The parameters commonly used in the iftop command are as follows. Here is a small summary:

-I set the network card for monitoring, such as # iftop-I eth2

-B displays traffic in bytes (default is bits), such as # iftop-B

-n causes host information to display IP directly by default, such as # iftop-n

-N causes port information to display port number directly by default, such as # iftop-N

-F shows the inbound and outbound traffic of a specific network segment, such as # iftop-F 10.10.1.0 Universe 24 or # iftop-F 10.10.1.0 Universe 255.255.255.0

-h (display this message), help, display parameter information

-p after using this parameter, the list in the middle shows the local host information and IP information other than the local host appears.

-b to make the traffic graph bar display by default

To sum up, some operation commands after entering the iftop view screen (pay attention to case):

Press h to toggle whether to display help

Press n to toggle to display the IP or hostname of this machine

Press s to switch whether to display the host information of this computer.

Press d to toggle whether to display the host information of the remote target host

Toggle the display format by t to 2 lines / 1 lines / only send traffic / only received traffic

Press N to toggle to display the port number or port service name

Press S to toggle whether to display the port information of this machine.

Press D to toggle whether to display the port information of the remote target host

Press p to toggle whether to display port information

Press P to toggle pause / resume display

Press b to toggle whether to display the average flow graph bar

Press T to toggle whether to display the total traffic for each connection

Press l to open the screen filtering function, and enter the characters to be filtered, such as ip. After pressing enter, the screen will only display the traffic information related to this IP.

Press L to switch the scale on the display screen; if the scale is different, the flow graph bar will change

Press j or k to scroll up or down the connection record displayed on the screen

Press 1 or 2 or 3 to sort according to the three columns of traffic data displayed on the right

Sort by hostname or IP of the remote destination host

Press o to toggle whether to display only the current connection

Thank you for reading this article carefully. I hope the article "what are the common monitoring tools of Linux system shared by the editor will be helpful to everyone?" at the same time, I also hope that you will support and pay attention to the industry information channel, and more related knowledge is waiting for you 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