18 command-line tools to monitor Linux performance

Source: Internet
Author: User
Tags ack

Http://www.oschina.net/translate/command-line-tools-to-monitor-linux-performance1.Top-Linux Process Monitoring

The top command under Linux is a performance Monitor that many system administrators often use to monitor Linux performance, and this command is available in many Linux or Unix-like operating systems. The top command is used to display all live processes that are running and active in a certain order, and the display results are updated periodically. This command shows CPU usage, memory usage, swap memory usage size, cache usage size, buffer usage size, process PID, commands used , and more. It can also show the memory and CPU usage of the running process. For system administrators, the top command is a very useful one that can be used to monitor the system and take the correct processing action when needed. Let's take a look at the top command in action.

# Top

Top Command Example
For more examples of top commands, read The following 12 examples of using the top command in Linux.

Several people
Translated over 2 years ago

1 Person top

Top translation of good Oh!

2. vmstat– Virtual Memory Statistics

Linux   VmStat   commands for displaying virtual memory , kernel thread , disk Statistics for , system process , I/O block , interrupt , CPU activity  , and more. By default, the Vmstat command is not available under the Linux system, and you need to install a   that contains the Vmstat program, sysstat   packages. A common use of the command format is:

# 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 115 4 89 79 1 6 90 3 0

for more vmstat examples, please read: 6 vmstat command instances under Linux

Yxrykds
Translated over 2 years ago

2 Person top

Top translation of good Oh!

3.lsof-to list open files

The

has lsof commands in many Linux or Unix-like systems, and it is often used to display all open files and processes as a list. Open files include disk files, network sockets, pipelines, devices, and processes . One of the main scenarios for using this command is when you cannot mount a disk and display an error message that you are using or opening a file. With this command, you can easily see which file is in use. The most common format for this command is as follows:

# lsofcommand     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

for more information on the use and examples of LSOF commands, refer to the following 10 examples of using the lsof command in Linux.

Several people
Translated over 2 years ago

1 Person top

Top translation of good Oh!

4.tcpdump-Network Packet Analyzer

Tcpdump is one of the most widely used network packet analyzers or packet monitoring programs that capture or filter TCP/IP packets that are received or transmitted on a specified interface on a network. It also has an option to save the captured package to a file for later analysis. In almost all major Linux releases, tcpdump can be used.

# tcpdump-i Eth0tcpdump:verbose output suppressed, use-v OR-VV for full protocol decodelistening on eth0, Link-type EN 10MB (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

For more information about tcpdump usage, see The following 12 examples of using the Tcpdump command in Linux.

Several people
Translated over 2 years ago

2 Person top

Top translation of good Oh!

5.netstat-Network Status statistics

Netstat is a command-line tool for monitoring packet and network interface statistics for incoming and outgoing networks . It is a very useful tool that system administrators can use to monitor network performance, locate and troubleshoot network-related issues.

# netstat -a | moreactive internet connections  (servers and  Established) proto recv-q send-q local address                Foreign Address              Statetcp        0       0 *:mysql                      *:*                            Listentcp        0      0 *:sunrpc                      *:*                           LISTENtcp        0       0 *:realm-rusd                 *:*                           LISTENtcp         0      0 *:ftp                        *:*                            LISTENtcp        0       0 localhost.localdomain:ipp   *:*                           LISTENtcp         0      0 localhost.localdomain:smtp  *:*                           LISTENtcp        0       0 localhost.localdomain:smtp  localhost.localdomain:42709  time_waittcp        0      0  localhost.localdomain:smtp  localhost.localdomain:42710 time_waittcp         0      0 *:http                       *:*                            Listentcp        0      0 *:ssh                         *:*                           LISTENtcp         0      0 *:https                      *:*                           LISTEN 

for more examples of Netstat, see : Linux Under 20 examples using the netstat command.

Several people
Translated over 2 years ago

2 Person top

Top translation of good Oh!

6. 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 so on. Htop is a third-party tool that is not included in a Linux system and you need to use the Yum Package management tool to install it. For more information on installation, please read below.

# Htop

Htop Command Example

For htop installation, read: Install Htop on Linux (Linux process monitoring)

Route 66th
Translated over 2 years ago

2 Person top

Top translation of good Oh!

7.iotop-Monitoring 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 useful when you are looking for specific processes and lots of disk read and write processes.

# Iotop

Examples of IOTOP commands
for information on how to install and use Iotop, please read : Install Iotop under Linux.

8.iostat-Input/Output statistics

Iostat is a simple tool for collecting statistics on the input and output status of display system storage devices. This tool is often used to track performance issues with storage devices, including devices, local disks, and remote disks , such as using NFS.

# iostatlinux 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

for more information on iostat usage and examples, please visit the following 6 examples of Linux using the Iostat command.

Several people
Translated over 2 years ago

1 Person top

Top translation of good Oh!

9.iptraf-real-time LAN IP monitoring

Iptraf is an open source real-time network ( LAN ) monitoring application running on the Linux console. It collects a lot of information, such as IP traffic monitoring over the network, including TCP tokens, ICMP details, TCP/UDP traffic separation, TCP connection packets, and bytes. It also collects common information and details about the state of the interface: TCP, UDP, IP, ICMP, non-IP,IP checksum error, interface activity, and so on.

IP Traffic Monitoring
For more information about Iptraf tool usage and more, please visit: Iptraf Network monitoring tools.

Several people
Translated over 2 years ago

1 Person top

Top translation of good Oh!

PSACCT or Acct-Monitor user Activity

PSACCT or Acct tools are used to monitor the activity status of each user in the system. These two service processes run in the background, and they are closely monitored for all activities of each user running on the system, while also monitoring the resources used by these activities.

The system administrator can use these two tools to track each user's activity, such as what the user is doing, how many resources they are using, how much time they have spent on the system, and so on.

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

Several people
Translated over 2 years ago

1 Person top

Top translation of good Oh!

11.monit-linux process and service monitoring tools

Monit is a free 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, and so on. You can use the command line or the network excuse provided by this software to view the status of the system.

Monit Linux System Monitoring

For more information, see: Monitoring Linux processes with Monit

Dinfer
Translated over 2 years ago

2 Person top

Top translation of good Oh!

12.nethogs-Monitor the network bandwidth used by each process

nethogs is a very small program of Open source code (similar to the top command under Linux), which closely monitors the network activity of each process on the system. It also tracks the real-time network bandwidth used by each program or application. Bandwidth monitoring   under

Nethogs:linux;
For more information see:   using nethogs to monitor network bandwidth usage for Linux.

several people
translated 2 years ago

1 human top

 

top   translation is good!

13.iftop-monitoring network bandwidth

Iftop is another open source system monitoring application running in the console, It shows a list of application network bandwidth usage (source host or destination host) on the system over the network interface, and this list is updated regularly. The iftop is used to monitor network usage, and ' top ' is used to monitor CPU usage. Iftop is a member of the top tool family that monitors the selected interface and displays the current network bandwidth usage among the two hosts. The

iftop-monitors network bandwidth.

For more information, see: iftop-Monitoring the usage of network bandwidth.

several people
translated 2 years ago

1 human top

 

top   translation is good!

monitorix-system and Network monitoring

Monitorix is a free lightweight app Tool, which is designed to run and monitor Linux/unix server systems and resources. It has an HTTP Web server that has a regular collection of information about the system and the network and displays it graphically. It monitors the average load and usage of the system, memory allocations, disk health, system services, network ports, message statistics (SENDMAIL,POSTFIX,DOVECOT, etc.), MySQL statistics, and so on. It is used to monitor the overall performance of the system to help detect errors, bottlenecks, and abnormal activity.

litstone
translated 2 years ago

1 Human Top

 

top   Good translation!

15. arpwatch– Ethernet Activity Monitor

Arpwatch is designed to monitor Ethernet Address resolution on Linux (changes to MAC and IP addresses). He continuously monitors Ethernet activity for a period of time and outputs a log of changes in IP and MAC address pairs. It can also send an email notification to an administrator, alerting you to an increase in address pairing. This is useful for detecting ARP attacks on a network. &NBSP

For more information, see  : arpwatch to Monitor Ethernet Activity

16. suricata– Network Security monitoring

Suricata   is an open source high-performance network security, intrusion detection and anti-monitoring tool that can run on Linux, FreeBSD, and Windows. Nonprofit organization OISF   ( Open information Security Foundation ) develops and owns its copyrights.

For more information see  : suricata–a Network intrusion Detection and prevention System

realz
translated 2 years ago

1 Human top

 

top   Translation is good!

other translations (1)
Vnstat php– Network traffic monitoring

Vnstat PHP is a web-based front-end rendering of popular web Tools "Vnstat". Vnstat PHP presents the network usage in a beautiful graphical interface. He can display upload and download traffic in hours, days, months, and output summary reports.

For more information, see : Vnstat php–monitoring Network Bandwidth

nagios– Network/server monitoring

Nagios is a leading and powerful open source monitoring system that allows network/system administrators to identify and resolve problems before they affect normal business. With the Nagios system, administrators can remotely detect Linux, Windows, switches, routers, and printers within a single window. It can warn of danger and indicate whether there is an exception to the system/server, which can indirectly help you to take rescue measures before the problem occurs.

For more information, see : Install Nagios monitoring System to Monitor Remote linux/windows Hosts

We want to know: What monitoring program are you using to monitor the performance of your Linux server? If we missed the tool you think is important, please let us know in the comments and don't forget to share it!

18 command-line tools to monitor Linux performance

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.