For Linux
Package Name is sysstat
sysstat.i586 : The sar and iostat system monitoring commands
#[root@inf1sysadm1 ~]# sar -d 1 1
Linux 2.6.30.10-105.fc11.i586 (inf1sysadm1.ind.com) 01/22/2010
02:30:57 PM DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util
02:30:58 PM dev8-0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
02:30:58 PM dev8-1 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
02:30:58 PM dev8-2 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
02:30:58 PM dev8-3 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
02:30:58 PM dev8-4 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
********** -d Report activity for each block device ***********
#[root@inf1sysadm1 ~]# sar -u 1 1
Linux 2.6.30.10-105.fc11.i586 (inf1sysadm1.ind.com) 01/22/2010
02:34:29 PM CPU %user %nice %system %iowait %steal %idle
02:34:30 PM all 6.37 0.00 2.94 0.00 0.00 90.69
Average: all 6.37 0.00 2.94 0.00 0.00 90.69
****** -u 2 5 Report CPU utilization for each 2 seconds.5lines are displayed.*****
[root@inf1sysadm1 ~]# iostat 1 1
Linux 2.6.30.10-105.fc11.i586 (inf1sysadm1.ind.com) 01/22/2010
avg-cpu: %user %nice %system %iowait %steal %idle
5.63 0.44 2.72 1.28 0.00 89.94
Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn
sda 7.15 99.33 38.85 1510463 590764
sda1 0.01 0.17 0.00 2624 4
sda2 7.10 98.47 38.39 1497306 583704
sda3 0.00 0.11 0.00 1715 0
sda4 0.04 0.53 0.46 8002 7056
--------------------------For Solaris---------------------------
# iostat -xc
extended device statistics cpu
device r/s w/s kr/s kw/s wait actv svc_t %w %b us sy wt id
fd0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 8 64 27 0
sd0 51.1 0.2 6545.1 1.6 0.0 1.8 34.7 0 100
sd1 84.7 0.0 10615.1 0.0 0.0 1.6 19.0 1 98
sd4 27.6 6.8 220.5 51.6 0.0 2.9 83.0 0 98
sd6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0
nfs1 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0
Looks like disk 'sd0' is really busy (100% busy!). Next step is to find out what is using it.
The fields have the following meanings:
disk name of the disk
r/s reads per second
w/s writes per second
Kr/s kilobytes read per second
Kw/s kilobytes written per second
wait average number of transactions waiting for ser-
vice (queue length)
actv average number of transactions actively being
serviced (removed from the queue but not yet
completed)
%w percent of time there are transactions waiting
for service (queue non-empty)
%b percent of time the disk is busy (transactions
in progress)
---------------------For AIX --------------------------------
On AIX 5.3
mypc:/#sar -d 1 1
AIX MYDB01 3 5 00C830104C00 01/22/10
System configuration: lcpu=14 drives=22 ent=3.50 mode=Capped
15:07:32 device %busy avque r+w/s Kbs/s avwait avserv
15:07:33 hdisk0 0 0.0 0 3 0.0 7.7
hdisk1 0 0.0 0 0 0.0 0.0
hdisk2 11 0.0 14 6087 0.0 12.5
hdisk3 10 0.0 12 6087 0.0 9.0
dac0 0 0.0 1953 96713 0.3 7.1
dac0utm 0 0.0 0 0 0.0 0.0
dac1 0 0.0 752 20925 0.0 5.5
dac1utm 0 0.0 0 0 0.0 0.0
hdisk4 99 0.0 542 67378 1.2 12.6
hdisk5 93 0.0 752 20925 0.0 5.5
hdisk6 98 0.0 549 18856 0.0 5.3
MyPC:/#iostat aux 1 1
iostat: 0551-154 Disk aux is not found.
System configuration: lcpu=14 drives=22 ent=3.50 paths=4 vdisks=0
tty: tin tout avg-cpu: % user % sys % idle % iowait physc % entc
0.0 126.5 66.4 24.7 4.5 4.3 3.2 92.3
Disks: % tm_act Kbps tps Kb_read Kb_wrtn
hdisk0 2.9 19.6 4.9 16 4
hdisk1 1.0 3.9 1.0 0 4
hdisk2 98.0 65822.5 117.6 4660 62479
hdisk3 92.2 65771.6 106.9 5632 61455
dac0 0.0 115247.1 2169.6 83980 33572
dac0utm 0.0 0.0 0.0 0 0
dac1 0.0 21851.0 395.1 2640 19648
dac1utm 0.0 0.0 0.0 0 0
*****disk Read throughput:
# time dd if=/tmp/f66mb.out of=/dev/null bs=1024k
63+1 records in.
63+1 records out.
real 0m2.04s
user 0m0.00s
sys 0m1.05s
The 'time' command shows the amount of time it took to complete the read. The read throughput
in this example is about 33MB per second (66MB / 2.04 seconds real time)
******measure disk Write throughput
# sync; date; dd if=/dev/zero of=/tmp/1000m bs=1024k count=1000; date; sync; date
Thu Jan 5 23:02:41 PST 2006
1000+0 records in.
1000+0 records out.
Thu Jan 5 23:02:59 PST 2006
Thu Jan 5 23:02:59 PST 2006
In this example, dd completed after 18 seconds (23:02:59 - 23:02:41) and wrote with 55MB
per second (1GB / 18 seconds).
Friday, January 22, 2010
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment