Linux Performance Testing Commands

Some basics, I use while checking the health of the Linux Box , whenever in a trap.

$top - overall UT of the machine
$mpstat - display utilization of each CPU individually
$mpstat -P ALL

$sar - todays cpu activity
$sar -u 2 5 : todays cpu activity ,comaprison of cpu 2 seconds apart.. 5 times
$sar -o output.file 12 8 >/dev/null 2>&1 & - redirect output to file
$sar -f data.file - read file

$ps -eo pcpu,pid,user,args | sort -k 1 -r | head -10 : who is monopolizing or eating the CPUs
$ps -eo pcpu,pid,user,args | sort -r -k1 | less : who is monopolizing or eating the CPUs

iostat : avg cpu ut since last reboot
$iostat -xtc 5 3 : You may want to use following command, which gives you three outputs every 5 seconds (as previous command gives information since the last reboot)

Monitoring Disk utilisation:

Display 3 reports of extended statistics at 5 second intervals for disk type the following command:
$ iostat -d -x 5 3

$iostat -d -x interval count

-d : Display the device utilization report (d == disk)
-x : Display extended statistics including disk utilization

interval : It is time period in seconds between two samples . iostat 2 will give data at each 2 seconds interval.
count : It is the number of times the data is needed . iostat 2 5 will give data at 2 seconds interval 5 times

Will add more to it sooon.....

Keep reading..



Popular Posts