Sunday, March 27, 2016

Linux Performance Monitoring Commands

Linux Performance Monitoring Commands

Top

Linux Top command is a performance monitoring program which is used frequently by many system administrators to monitor Linux performance and it is available under many Linux/Unix like operating systems. 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.

Example: #top

VmStat – Virtual Memory Statistics

Linux 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 called sysstat that includes a vmstat program.

Example: #vmstat

Lsof – List Open Files

Lsof 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

Example: #lsof

Tcpdump – Network Packet Analyzer

Tcpdump 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.

Example: #tcpdump -i eth0

Netstat – Network Statistics

Netstat 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.

Example: # netstat -a|grep <port_no>

Iostat – Input/Output Statistics

IoStat 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 including devices, local disks, remote disks such as NFS.

Example: #iostat

Uptime

Uptime gives a one line display which represents current time, how long the system has been running, how many users are currently logged on and the system load averages for the past 1 minute, 5 minutes and 15 minutes respectively.

Example: # uptime

Free

free command shows memory statistics for both main memory and swap.

Examle: #free -k/m/g -s

Sar

sar is a command line tool for collecting, viewing and recording performance data.

Exapmple: # sar 1 5

No comments:

Post a Comment