Linux Performance issue - Command Line tools

Linux Performance issue

Below discussed commands are mostly used to check linux performance issues such as

1. To find out bottlenecks.
2. Disk or storage I/O bottlenecks.
3. CPU and memory bottlenecks.
4. Network bottlenecks.



Below are the commonly used command line tools in linux.



#1. TOP - To view the process Activity on server

#2. VMSTAT - Its Used to check System Activity, Hardware and System Information


    Display Memory utilization  : #vmstat -m
    Display about active/inactive memory page info  : #vmstat -a

#3. PS  - To display the process
 
    #ps -axu


    #ps -auxf | sort -nr -k 3 | head -10  : To display Top 10 CPU Consuming process

#4. free - To display Memory utlization

#5. iostat - Average CPU Load, Disk Activity

    iostat reports CPU statistics for devices , partitions and netowrk file systems.

#6. SAR - To collect and report system activity

    #sar -n DEV  : To view netowrk counter

    # sar -n DEV -f /var/log/sa/sa20 | more  : To view 20th network counter info.

#7. MPSTAT - To display Multiprocessor usage

    #mpstat -P ALL   : To display average CPU utilization per processor:

#8. PMAP : To display Process Memory usage.

    # pmap -d PID

#9. NETSTAT : To view Network statistics.

    #netstat -an

    #netstat -s  #To view TCP connections

    #netstat -nat | awk '{print $6}' | sort | uniq -c | sort -n

    #netstat -nat |grep {IP-address} | awk '{print $6}' | sort | uniq -c | sort -n  // To view about particular IP address access on server.


#10. TCPDUMP # Detailed netowrk traffic analysis

   #tcpdump -i eth1 'udp port 53'

#11. ETHTOOL : Display or change ethernet card settings

   #ethtool ethX

   # ethtool -i eth0  // To display ethernet device driver settings

   #ethtool -a eth0  //To display autoneg settings

   #ethtool  -s eth0 autoneg off  //To set the parameter for netowrk card

   #ethtool -s eth0 speed 100 autoneg off  //To change the speed of network card



#12. MII-TOOL : This utility checks or sets the status of a network interface's Media Independent Interface (MII) unit.

   # mii-tool -v  // Display information about the network card

   # mii-tool -F 100baseTx-HD //To Change Duplex settings

  

#13. /proc File system: It provides detailed information about various hardware devices and other Linux kernel information

     # cat /proc/cpuinfo
     # cat /proc/meminfo
     # cat /proc/zoneinfo
     # cat /proc/mounts
     # cat /proc/scsi
   



Post a Comment

0 Comments