18 Command Line Tools to Monitor Linux Performance
By??Under:?,??On:?December 26,2013 It’s really very tough job for every?System?or?Network?administrator to monitor and debugLinux System Performance?problems every day. After being a?Linux Administrator?for?5 years?in?IT industry,I came to know that how hard is to monitor and keep systems up and running. For this reason,we’ve compiled the list of?Top 18?frequently used command line monitoring tools that might be useful for every?Linux/Unix System Administrator. These commands are available under all flavors of?Linux?and can be useful to monitor and find the actual causes of performance problem. This list of commands shown here are very enough for you to pick the one that is suitable for your monitoring scenario. <p class="wp-caption-text">Linux Command Line Monitoring 1. Top – Linux Process MonitoringLinux?Top?command is a performance monitoring program which is used frequently by many system administrators to monitor Linux performance and it is available under manyLinux/Unix?like operating systems. The top command used to dipslay all the running and active real-time processes in ordered list and updates it regularly. It display?CPU usage,Memory usage,?Swap Memory,?Cache Size,?Buffer Size,?Process PID,?User,?Commands and much more. It also shows high?memory?and?cpu?utilization of a running processess. The top command is much userful for system administrator to monitor and take correct action when required. Let’s see top command in action. # top <p class="wp-caption-text">Top Command Example For more examples of Top command read :? 2. VmStat – Virtual Memory StatisticsLinux?VmStat?command used to display statistics of?virtual memory,?kernerl threads,disks,?system processes,?I/O blocks,?interrupts,?CPU activity?and much more. By default vmstat command is not available under Linux systems you need to install a package calledsysstat?that includes a vmstat program. The common usage of command format is. # vmstat For more Vmstat examples read :? 3. Lsof – List Open FilesLsof?command used in many?Linux/Unix?like system that is used to display list of all the open files and the processes. The open files included are?disk files,?network sockets,pipes,?devices?and?processes. One of the main reason for using this command is when a disk cannot be unmounted and displays the error that files are being used or opened. With this commmand you can easily identify which files are in use. The most common format for this command is. # lsof More lsof command usage and examples :? 4. Tcpdump – Network Packet AnalyzerTcpdump?one of the most widely used command-line?network packet analyzer?or?packets sniffer?program that is used capture or filter?TCP/IP?packets that received or transferred on a specific interface over a network. It also provides a option to save captured packages in a file for later analysis. tcpdump is almost available in all major Linux distributions. # tcpdump -i eth0 For more tcpdump usage read :? 5. Netstat – Network StatisticsNetstat?is a command line tool for monitoring?incoming?and?outgoing network?packets statistics as well as interface statistics. It is very useful tool for every system administrator to monitor network performance and troubleshoot network related problems. # netstat -a | more More Netstat examples :?. 6. Htop – Linux Process MonitoringHtop?is a much advanced interactive and real time Linux process monitoring tool. This is much similar to Linux?top command?but it has some rich features like?user friendly interface to manage process,?shortcut keys,?vertical and horizontal view of the processes?and much more. Htop is a third party tool and doesn’t included in Linux systems,you need to install it using?YUM?package manager tool. For more information on installation read our article below. # htop ![]() For Htop installation read :? 7. Iotop – Monitor Linux Disk I/OIotop?is also much similar to?top command?and?Htop program,but it has accounting function to monitor and display real time?Disk I/O?and?processes. This tool is much useful for finding the exact process and high used disk read/writes of the processes. # iotop ![]() For Ioptop installation and usage read :? 8. Iostat – Input/Output StatisticsIoStat?is simple tool that will collect and show system?input?and?output?storage device statistics. This tool is often used to trace storage device performance issues includingdevices,?local disks,?remote disks?such as?NFS. # iostat For more Iostat usage and examples visit :? 9. IPTraf – Real Time IP LAN MonitoringIPTraf?is an open source console-based real time network (IP LAN) monitoring utility forLinux. It collects a variety of information such as IP traffic monitor that passes over the network,including TCP flag information,ICMP details,TCP/UDP traffic breakdowns,TCP connection packet and byne counts. It also gathers information of general and detaled interface statistics of TCP,UDP,IP,ICMP,non-IP,IP checksum errors,interface activity etc. <p class="wp-caption-text">IP Traffic Monitor For more information and usage of IPTraf tool,please visit :? 10. Psacct or Acct – Monitor User Activitypsacct or acct tools are very useful for monitoring each users activity on the system. Both daemons runs in the background and keeps a close watch on the overall activity of each user on the system and also what resources are being consumed by them. These tools are very useful for system administrators to track each users activity like what they are doing,what commands they issued,how much resources are used by them,how long they are active on the system etc. For installation and example usage of commands read the article on? 11. Monit – Linux Process and Services MonitoringMonit?is a free open source and web based process supervision utility that automatically monitors and managers system processes,programs,files,directories,permissions,checksums and filesystems. It monitors services like Apache,MySQL,Mail,FTP,ProFTP,Nginx,SSH and so on. The system status can be viewed from the command line or using it own web interface. <p class="wp-caption-text">Monit Linux Process Monitoring Read More?:? 12. NetHogs – Monitor Per Process Network BandwidthNetHogs?is an open source nice small program (similar to Linux?top command) that keeps a tab on each process network activity on your system. It also keeps a track of real time network traffic bandwidth used by each program or application. <p class="wp-caption-text">NetHogs Linux Bandwidth Monitoring Read More?:? 13. iftop – Network Bandwidth Monitoringiftop?is another terminal-based free open source system monitoring utility that displays a frequently updated list of network bandwidth utilization (source and destination hosts) that passing through the network interface on your system. iftop is considered for network usage,what ‘top‘ does for CPU usage. iftop is a ‘top‘ family tool that monitor a selected interface and displays a current bandwidth usage between two hosts. <p class="wp-caption-text">iftop – Network Bandwidth Monitoring Read More?:? 14. Monitorix – System and Network MonitoringMonitorix?is a free lightweight utility that is designed to run and monitor system and network resources as many as possible in?Linux/Unix?servers. It has a built in?HTTP?web server that regularly collects system and network information and display them in graphs. It Monitorssystem load average and usage,?memory allocation,?disk driver health,?system services,?network ports,?mail statistics?(Sendmail,?Postfix,?Dovecot,etc),?MySQL statistics?and many more. It designed to monitor overall system performance and helps in detecting failures,bottlenecks,abnormal activities etc. <p class="wp-caption-text">Monitorix Monitoring Read More?:? 15. Arpwatch – Ethernet Activity MonitorArpwatch?is a kind of program that is designed to monitor Address Resolution (MAC?and?IPaddress changes) of?Ethernet?network traffic on a Linux network. It continuously keeps watch on Ethernet traffic and produces a log of?IP?and?MAC?address pair changes along with a timestamps on a network. It also has a feature to send an email alerts to administrator,when a pairing added or changes. It is very useful in detecting?ARP?spoofing on a network. Read More?:? 16. Suricata – Network Security MonitoringSuricata?is an high performance open source?Network Security?and?Intrusion Detectionand?Prevention Monitoring System?for?Linux,?FreeBSD?and?Windows.It was designed and owned by a non-profit foundation?OISF?(Open Information Security Foundation). Read More?:? 17. VnStat PHP – Monitoring Network BandwidthVnStat PHP?a web based frontend application for most popular networking tool called “vnstat“.?VnStat PHP?monitors a network traffic usage in nicely graphical mode. It displays a total?IN?and?OUT?network traffic usage in?hourly,?daily,?monthly?and?full summary?report. Read More?:? 18. Nagios – Network/Server MonitoringNagios is an leading open source powerful monitoring system that enables network/system administrators to identify and resolve server related problems before they affect major business processes. With the Nagios system,administrators can able to monitor remote Linux,Windows,Switches,Routers and Printers on a single window. It shows critical warnings and indicates if something went wrong in your network/server which indirectly helps you to begin remediation processes before they occur. Read More?:? We would like to know what kind of?monitoring programs?you use to?monitor performance of your Linux servers? If we’ve missed any important tool that you would like us to include in this list,please inform us via comments and please don’t forget to share it. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |