20 command-line tools to monitor the performance of Linux Systems (reprint)

Source: Internet
Author: User
Tags ack cpu usage disk usage

1. top-Linux System process monitoring

The top command is a performance monitor that can be used in many Linux/unix versions, and it is also a tool for monitoring system performance often used by Linux system administrators. The TOP command periodically displays all running and running and updates to the list, showing CPU usage, memory usage, swap memory, cache size, buffer size, process control, users, and more commands. It also shows running processes with high memory and CPU usage. The top command is very useful for system administrators when we need to monitor and take the right action on a Linux system. Let's take a look at the actual operation of the top command.

# top

2. vmstat-Virtual Memory Statistics

The Vmstat command is used to display more information such as virtual memory, kernel threads, disks, system processes, I/O modules, interrupts, CPU active states, and more. In the default case, the Linux system is not vmstat this command, if you want to use it, you must install a package called Sysstat. The common usage of command format is as follows:

# Vmstatprocs-----------memory-------------Swap-------io------System-------CPU-----r  B   swpd   free  inact active   si   so    bi    bo   in   CS US sy ID WA St 1  0      0 810420  97380  70628    0    0   ,     4   ,  1  6,  3  0
3. lsof-Open File List

The lsof command is available for many Linux/unix systems, and displays open files and processes primarily as a list.

Open files mainly include disk files, network sockets, pipelines, devices, and processes. The main reason for using this command is that a disk cannot be uninstalled and displays the error message that the file is being used or opened. This command makes it easy to see which files are being used. The most common format for this command:

# lsof COMMAND     PID      USER   FD      TYPE     DEVICE     SIZE       NODE nameinit          1      root  cwd       DIR      104,2     4096          2/init          1      root  rtd       DIR      104,2     4096          2/init          1      root  txt       REG      104,2    38652   17710339/sbin/initinit          1      root  mem       Reg      104,2   129900     196453/lib/ld-2.5.soinit          1      root  mem       REG      104,2  1693812     196454/lib/libc-2.5.soinit          1      root  mem       REG      104,2    20668     196479/ Lib/libdl-2.5.soinit          1      root  mem       REG      104,2   245376     196419/lib/ Libsepol.so.1init          1      root  mem       REG      104,2    93508     196431/lib/libselinux.so.1init          1      root   10u     FIFO       0,17                 953/dev/initctl

4. tcpdump-Network Packet Analyzer

Tcpdump is one of the most widely used command line network packet analyzers or packet sniffing programs that are used primarily to capture and filter TCP/IP packets to receive or transfer specific pretext information on a network. It also provides an option parameter to save the captured package in a file for later analysis use, tcpdump is available in almost all Linux versions.

# tcpdump-i eth0tcpdump:verbose output suppressed, use-v OR-VV for full protocol decodelistening on Eth0, Lin K-type EN10MB (Ethernet), capture size bytes22:08:59.617628 IP tecmint.com.ssh > 115.113.134.3. Static-mumbai.vsnl.net.in.28472:p 2532133365:2532133481 ($) Ack 3561562349 win 964822:09:07.653466 IP Tecmint.com.ssh > 115.113.134.3.static-mumbai.vsnl.net.in.28472:p 116:232 ($) Ack 1 win 964822:08:59.617916 IP 115.113.134.3.static-mumbai.vsnl.net.in.28472 > Tecmint.com.ssh:. ACK-$ win 64347

5. netstat-Network Statistics

The netstat command is a command-line tool that monitors the incoming and outgoing statistical interfaces of a network packet. It is a very useful tool for many system administrators to monitor network performance and solve network-related issues.

# tcpdump-i eth0tcpdump:verbose output suppressed, use-v OR-VV for full protocol decodelistening on Eth0, Lin K-type EN10MB (Ethernet), capture size bytes22:08:59.617628 IP tecmint.com.ssh > 115.113.134.3. Static-mumbai.vsnl.net.in.28472:p 2532133365:2532133481 ($) Ack 3561562349 win 964822:09:07.653466 IP Tecmint.com.ssh > 115.113.134.3.static-mumbai.vsnl.net.in.28472:p 116:232 ($) Ack 1 win 964822:08:59.617916 IP 115.113.134.3.static-mumbai.vsnl.net.in.28472 > Tecmint.com.ssh:. ACK-$ win 64347

6. htop-Process Monitoring

Htop is a more advanced, interactive, real-time monitoring tool. Htop is very similar to the top command, but he has some very rich features, such as user-friendly interface management processes, shortcut keys, horizontal and vertical processes, and more. Htop is a third-party tool that is not included in a Linux system and you need to install it using the Package management tool.

# Htop

7. iotop-monitoring Linux disk I/O

Iotop is similar to the top and Htop commands, but it will have a reporting capability to monitor and display real-time disk I/O input and output and program processes. This tool is useful for finding accurate, high-disk read/write processes.

# Iotop

8. iostat-Input/output statistics

Iostat is a simple tool for collecting and displaying system input and output storage device statistics. This tool is typically used to look for storage device performance issues, including devices, local disks, such as remote NFS disks.

# Iostat Linux 2.6.18-238.9.1.el5 (tecmint.com)         09/13/2012avg-cpu:  %user   %nice%system%iowait  %steal   %idle           2.60    3.65    1.04    4.29    0.00   88.42Device:            TPs   blk_read/s   Blk_ WRTN/S   blk_read   blk_wrtncciss/c0d0       17.79       545.80       256.52  855159769  401914750CCISS/C0D0P1      0.00         0.00         0.00       5459       3518cciss/c0d0p2     16.45       533.97       245.18  836631746  384153384cciss/c0d0p3      0.63         5.58         3.97    8737650    6215544CCISS/C0D0P4      0.00         0.00         0.00          8          0cciss/c0d0p5      0.63         3.79         5.03    5936778    7882528cciss/c0d0p6      0.08         2.46         2.34    3847771    3659776
9. iptraf-real-time IP LAN monitoring

Iptraf is a real-time network (IP Network) monitoring tool for Linux systems based on open source. It collects a wide variety of information, such as network-to-IP traffic monitoring, including TCP flag information, ICMP details, tcp/udp traffic failures, TCP-connected packets, and the Bayern count. It also collects interface statistics for general and detailed information such as TCP,UDP,ICMP,IP, non-IP,IP checksum errors, interface activity, and more.

Psacct or acct-monitoring user activity

Psacct or ACCT is a very useful tool for monitoring the active state of each user to the system. In the background there are two daemons running, one is keeping an eye on the overall activity of each user on the system, and the other process is concerned about what resources are consumed by them.

This tool is useful for system administrators to track each user's activity, to know what the user is doing, what commands are being issued, how much resources are being consumed, and how long it takes to be active on the system.

monit-Procedures and Services monitoring

This is a free open source Web-based program that automatically monitors and manages system processes, programs, files, directories, permissions, and checksum file systems. The services it monitors include Apache, MYSQL, Mail, FTP, Nginx, and more. The system state can be viewed from the command line or from its own network interface.

nethogs-monitoring the network bandwidth of each process

Nethogs is an open source nifty applet (similar to the top command above Linux) that maintains the network activity status of each process on your system. It also maintains a program or application for real-time network traffic bandwidth usage.

iftop-Network Bandwidth Monitoring

Iftop is another terminal-based, open-source system monitoring tool that displays a list of frequently updated network bandwidth utilization (i.e. source and destination hosts) through the network interface on your own system. Iftop monitors the use of the network, and top monitors the use of the CPU. The Iftop monitors a selected interface and displays the current bandwidth usage between the two hosts.

monitorix-System and Network monitoring

Monitorix is one of the most lightweight monitoring tools in Linux/unix, and the main design is to monitor running systems and network resources. It has a built-in HTTP Web service to periodically collect system and network information and display it as a picture. It can monitor the average load usage of the system, the allocation of memory, disk drives, system services, network ports, message statistics (Sendmail, Postfix, Dovecot, etc.), MYSQL database, and more. Its main purpose is to monitor the performance of the whole system, and help to monitor the failure, bottlenecks, abnormal activities and other conditions.

arpwatch-Ethernet Activity Monitor

Arpwatch is a program used to monitor the network traffic of Ethernet networks for Linux networks with address resolution (network address translation). It has been monitoring Ethernet traffic and generating logs for IP and MAC address pairs as the network timestamp changes. When an IP address or MAC address pair changes, it sends an email notification to the administrator.

And it is very useful in detecting ARP attacks.

suricata-Network Security Monitoring

Suricata is a high-performance open source network security and intrusion detection and prevention monitoring tool for Linux, FreeBSD, Windows and other operating systems. It is owned by a non-profit fund OISF (Open Information Security Foundation).

Vnstat php-Monitoring network bandwidth

Vnstat PHP is one of the most popular social tools for Web front-end applications called "Vnstat". Vnstat PHP uses a good graphics mode to monitor network traffic usage. It shows the usage of network traffic in the summary report for each time, day, and month.

nagios-Network/server monitoring

Nagios is a leading open source, powerful monitoring system where network/system administrators identify and resolve server-related issues before they affect major business processes. Nagios can monitor remote Linux, Windows, switches, single-window routers, and printers. It can show your network and server critical alarms and help you solve problems before they are reversed.

nmon-Monitoring Linux system performance

All the resources that the Nmon (i.e. Nigel Performance Monitor) tool uses to monitor Linux systems include: CPU, memory, disk usage, processes on the network, NFS, Kernels, and so on. This tool has two modes: Online mode and capture mode. The online mode is suitable for real-time monitoring, and the capture mode is used to store the processing after the output is in CSV format.

collectl-Integrated Performance Testing Tool

Collectl is another powerful command-line-based monitoring tool that collects information about system resources, including CPU usage, memory, networks, nodes, processes, NFS, TCP sockets, and more.

20 command-line tools to monitor the performance of Linux Systems (reprint)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.