Graphing sar statistics using kSAR, collecting disk data with sar 
To watch server performance meaningfully you can use the kSAR java application which understands the sar output. The kSAR will provide you with nice graphs for almost all of the data collected. kSAR can even do the pdf for later presentation. kSAR seems to be a perfect tool for performance analysis.

documentation:
http://heanet.dl.sourceforge.net/source ... -4.0.4.pdf

kSar download:
http://sourceforge.net/project/showfile ... _id=179805

Within the small window choose launch ssh command and see the graphs...



It is useful sometimes to collect the disk statistics. The linux sysstat package for CentOS/RedHat and others is set by default to not collect them. Therefore 'sar -d' will output that no data is available, specificaly it will say 'Requested activities not available in file'. To watch the disk statistics for your system with sar you have to modify /usr/lib64/sa/sa1 script which comes with sysstat package and is scheduled to run 1/10 min by cron (/etc/cron.d/sysstat).

The switch you should have to add for the sadc is '-d':

#!/bin/sh
# /usr/lib64/sa/sa1.sh
# (C) 1999-2006 Sebastien Godard (sysstat <at> wanadoo.fr)
#
umask 0022
ENDIR=/usr/lib64/sa
cd ${ENDIR}
if [ $# = 0 ]
then
# Note: Stats are written at the end of previous file *and* at the
# beginning of the new one (when there is a file rotation) only if
# outfile has been specified as '-' on the command line...
exec ${ENDIR}/sadc -d -F -L 1 1 -
else
exec ${ENDIR}/sadc -d -F -L $* -
fi


Then you have to clear the sar statisctisc for the day and sar will start to collect data. If you issue the 'sar -d' you will get some similar to this:

09:20:01 AM DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util
09:30:01 AM dev8-0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
09:30:01 AM dev8-16 1.72 0.11 98.74 57.36 0.00 0.95 0.26 0.04
09:30:01 AM dev8-32 0.69 2.56 10.48 18.76 0.00 3.79 2.56 0.18
09:30:01 AM dev8-48 0.76 2.53 11.49 18.38 0.00 6.23 2.93 0.22
09:30:01 AM dev8-64 0.75 2.37 11.35 18.25 0.01 8.29 2.77 0.21
09:30:01 AM dev8-80 0.79 1.79 12.65 18.20 0.00 5.50 2.77 0.22
09:30:01 AM dev8-96 0.87 1.65 13.57 17.54 0.00 4.22 2.41 0.21
09:30:01 AM dev8-112 0.73 2.63 10.12 17.42 0.00 4.95 2.82 0.21
09:30:01 AM dev9-0 2.68 3.41 18.01 8.00 0.00 0.00 0.00 0.00
Average: dev8-0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
Average: dev8-16 2.16 4.97 103.67 50.37 0.00 1.15 0.67 0.14
Average: dev8-32 1.35 9.30 15.13 18.10 0.01 5.72 2.54 0.34
Average: dev8-48 1.47 9.08 17.29 17.95 0.01 5.46 2.40 0.35
Average: dev8-64 1.40 9.27 16.22 18.23 0.01 6.19 2.56 0.36
Average: dev8-80 1.42 9.06 16.59 18.10 0.01 5.73 2.44 0.35
Average: dev8-96 1.43 8.74 16.97 17.96 0.01 5.32 2.45 0.35
Average: dev8-112 1.35 9.33 15.26 18.28 0.01 5.99 2.57 0.35
Average: dev9-0 4.83 34.11 25.74 12.38 0.00 0.00 0.00 0.00

The question you might have is how the 'dev8-0' relates to the disk. To reveal this just type:

[tech@xen ~]$ find /dev -name sd*  | xargs ls -la
brw-r----- 1 root disk 8, 0 Mar 28 03:24 /dev/sda
brw-r----- 1 root disk 8, 1 Mar 28 03:24 /dev/sda1
brw-r----- 1 root disk 8, 2 Mar 28 03:24 /dev/sda2
brw-r----- 1 root disk 8, 3 Mar 28 03:24 /dev/sda3
brw-r----- 1 root disk 8, 16 Mar 28 03:24 /dev/sdb
brw-r----- 1 root disk 8, 17 Mar 28 03:25 /dev/sdb1
brw-r----- 1 root disk 8, 18 Mar 28 03:24 /dev/sdb2
brw-r----- 1 root disk 8, 19 Mar 28 03:25 /dev/sdb3
brw-r----- 1 root disk 8, 32 Mar 28 03:24 /dev/sdc
brw-r----- 1 root disk 8, 33 Mar 28 03:24 /dev/sdc1
brw-r----- 1 root disk 8, 48 Mar 28 03:24 /dev/sdd
brw-r----- 1 root disk 8, 49 Mar 28 03:24 /dev/sdd1
brw-r----- 1 root disk 8, 64 Mar 28 03:24 /dev/sde
brw-r----- 1 root disk 8, 65 Mar 28 03:24 /dev/sde1
brw-r----- 1 root disk 8, 80 Mar 28 03:24 /dev/sdf
brw-r----- 1 root disk 8, 81 Mar 28 03:24 /dev/sdf1
brw-r----- 1 root disk 8, 96 Mar 28 03:24 /dev/sdg
brw-r----- 1 root disk 8, 97 Mar 28 03:24 /dev/sdg1
brw-r----- 1 root disk 8, 112 Mar 28 03:24 /dev/sdh
brw-r----- 1 root disk 8, 113 Mar 28 03:24 /dev/sdh1


You can see the 8,0 is actually the major and minor device number assigned to the device.

Next, you can add this device mapping to kSAR to see regular disk names within the kSAR disk graphs.



[ 25 comments ] ( 66 views )   |  [ 0 trackbacks ]   |  permalink

<<First <Back | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | Next> Last>>