-
Notifications
You must be signed in to change notification settings - Fork 1
cmds
- SAR
Using sar utility you can do two things: 1) Monitor system real time performance (CPU, Memory, I/O, etc) 2) Collect performance data in the background on an on-going basis and do analysis on the historical data to identify bottlenecks.
Sar is part of the sysstat package. The following are some of the things you can do using sar utility.
Collective CPU usage Individual CPU statistics Memory used and available Swap space used and available Overall I/O activities of the system Individual device I/O activities Context switch statistics Run queue and load average data Network statistics Report sar data from a specific time and lot more.. The following sar command will display the system CPU statistics 3 times (with 1 second interval).
The following “sar -b” command reports I/O statistics. “1 3” indicates that the sar -b will be executed for every 1 second for a total of 3 times.
$ sar -b 1 3 Linux 2.6.18-194.el5PAE (dev-db) 03/26/2011 i686 (8 CPU)
01:56:28 PM tps rtps wtps bread/s bwrtn/s 01:56:29 PM 346.00 264.00 82.00 2208.00 768.00 01:56:30 PM 100.00 36.00 64.00 304.00 816.00 01:56:31 PM 282.83 32.32 250.51 258.59 2537.37 Average: 242.81 111.04 131.77 925.75 1369.90
tcpdump -A -i eth0
iostat -p sda
mpstat -A mpstat -P ALL ps -e -o pid,args --forest free -mto pmap pmap -x
strace ls strace -e open ls