Thursday, November 27, 2008

Performance Tuning on Linux

Measuring Disk I/O
watch --interval 0.5 iostat
Measuring Memory Usage
top or ps aux or pmap
Measuring Video Memory
lspci -v | more
Measuring Network Throughput

netstat
netstat -i inet : displays amount of traffic on all network interface.
watch --interval 1 netstat -i inet : display network traffic every second
ifconfig : # of packets and # of bytes from a particular interface.
netstat -t : displays TCP traffic.
netstat -u : displays UDP traffic.
netstat --protocol=ip : displays all IP(IPv4) connections.
netstat --protocol=ip6 : displays all IPv6 connections.
lsof
lsof -i4 : displays processes having IPv4 connections.
lsof -i6 : displays processes having IPv6 connections.
lsof -i tcp : displays applications with TCP sockets.
lsof -i udp : displays apps with UDP sockets.

No comments: