Linux Performance Monitoring: Those Awesome Command Line Tools

original:

http://mp.weixin.qq.com/s?__biz=MzA3NDcyMTQyNQ==&mid=2649254544&idx=1&sn=ad6ed049782217cd6aab40bbb85d4a6a&scene=23&srcid=06143EGyZ0CWpda3CVXJgfY2#rd

introduction

Monitoring and debugging performance issues on Linux systems is a heavy workload for system and network administrators on a daily basis. After working in IT for 5 years as a Linux system administrator, I've come to realize how difficult it is to monitor and keep systems up and running.

For this reason, we've compiled a list of the most commonly used command-line tools that will aid every Linux/Unixsystem administrator's work.

These command line tools can be used under various Linux systems and can be used to monitor and find the cause of performance problems.

This list of command line tools provides enough tools that you can pick and choose the right one for your monitoring scenario.

Editor's Note: Considering that some command-line tools are well known, here are a few of the less common ones. To learn more about the content and how to use the tool, please click the "Read the original text" link at the end of the article.

1. lsof - List open files

In many Linux or Unix-like systems there is the lsof command, which is commonly used to display all open files and processes in a list. Open files include disk files, network sockets, pipes, devices, and processes.

One of the main situations in which this command is used is when the disk cannot be mounted and an error message is displayed that a file is being used or opened.

With this command you can easily see which file is being used. The most common format of this command is as follows:

 

2. htop – Linux process monitoring

Htop is a very advanced interactive real-time linux process monitoring tool.

It is very similar to the top command, but it has richer features, such as user-friendly management of processes, shortcut keys, vertical and horizontal display of processes, and more.

Htop is a third-party tool, it is not included in the linux system, you need to use the YUM package management tool to install it.

# htop


Htop command example screenshot

3. iotop - Monitor Linux Disk I/O

The iotop command is also very similar to the top command and the Htop program, but it has the ability to monitor and display real-time disk I/O and process statistics.

This tool is very useful when looking for specific processes and processes that make heavy use of disk reads and writes.

# iotop


Screenshot of example Iotop command

4. IPTraf - Real-time LAN IP Monitoring

IPTraf is an open source real-time network (LAN) monitoring application that runs on a Linux console.

It collects a lot of information, such as monitoring of IP traffic through the network, including TCP flags, ICMP details, TCP/UDP traffic separation, TCP connection packets and byte counts. It also collects common and detailed information about interface status: TCP, UDP, IP, ICMP, non-IP, IP checksum errors, interface activity, etc.


IP Traffic Monitoring

For more information on IPTraf tool usage and more, please visit: IPTraf Network Monitoring Tool .

5. psacct - monitor user activity

The psacct or acct tool is used to monitor the activity of each user in the system.

These two service processes run in the background, they closely monitor all the activities of each user running on the system, and also monitor the resources used by these activities.

System administrators can use these two tools to track the activities of each user, such as what users are doing, what commands they submitted, how many resources they used, how long they were on the system, etc.

For installation and usage examples of these commands, see the article: Monitoring user activity with psacct or acct.

6. monit - Linux process and service monitoring tool

Monit is a free and open source software and a web-based process monitoring tool. It can automatically monitor and manage system processes, programs, files, folders, permissions, sum verification codes and file systems.

This software can monitor services like Apache, MySQL, Mail, FTP, ProFTP, Nginx, SSH. You can check the system status through the command line or the network interface provided by this software.


Monit Linux system monitoring

7. netHogs - Monitors the network bandwidth used by each process

NetHogs is a small open source program (similar to the top command in Linux) that closely monitors the network activity of every process on the system. It also tracks the real-time network bandwidth used by each program or application.


NetHogs: Bandwidth Monitoring under Linux

8. iftop - monitor network bandwidth

iftop is another open source system monitoring application that runs on the console. It displays a list of application network bandwidth usage (source host or destination host) on the system through the network interface. This list is updated regularly.

iftop is used to monitor network usage while 'top' is used to monitor CPU usage. iftop is a member of the 'top' family of tools that monitors selected interfaces and displays the current network bandwidth usage between two hosts.


iftop - Monitors network bandwidth.

9. monitorix - system and network monitoring

Monitorix is ​​a free lightweight application tool designed to run and monitor Linux/Unix server systems and resources.

It has an HTTP web server that regularly collects system and network information and displays it graphically.

It monitors system load averages and usage, memory allocation, disk health, system services, network ports, mail statistics (Sendmail, Postfix, Dovecot, etc.), MySQL statistics, and more. It is used to monitor the overall performance of the system to help identify errors, bottlenecks and unusual activity.

 

10. arpwatch – Ethernet Activity Monitor

Arpwatch is designed to monitor Ethernet address resolution (MAC and IP address changes) on Linux.

It continuously monitors Ethernet activity over a period of time and outputs a log of changes in IP and MAC address pairings.

It can also send email notifications to administrators, warning of changes to address pairings. This is useful for detecting ARP attacks on the network.

11. suricata – network security monitoring

Suricata is an open source high performance network security, intrusion detection and anti-monitoring tool that runs on Linux, FreeBSD and Windows. Developed and copyrighted by the non-profit OISF (Open Information Security Foundation).

12. vnStat PHP – Network Traffic Monitor

VnStat PHP is a web-based front-end rendering of the popular web tool "vnstat".

VnStat PHP presents network usage in a nice graphical interface. It can display upload and download traffic in hours, days, and months and output summary reports.

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326612507&siteId=291194637