SUMMARY: Disk naming with sar

From: SI-Gaetan Boudreau (boudreg@IRCM.UMontreal.CA)
Date: Fri Mar 06 1998 - 13:35:11 CST


The question was:
How do you translate the disk name given by sar (ex: sd1) with the more
familiar one given by df (ex: c0t1d0)

The answer is to run this script (from Sun):
(each line is separated by a blank line)
-----------------------------
#!/bin/sh

cd /dev/rdsk

/usr/bin/ls -l *s0 | tee /tmp/d1c |awk '{print "/usr/bin/ls -l "$11}' |
sh | awk '{print "sd" substr($0,38,4)/8}' > /tmp/d1d

awk '{print substr($9,1,6)}' /tmp/d1c |paste - /tmp/d1d

rm /tmp/d1[cd]
-----------------------------

It will produce something like:
c0t1d0 sd1
c0t3d0 sd3
c0t6d0 sd6
c1t0d0 sd15
c1t1d0 sd16
c1t2d0 sd17
c1t3d0 sd18
c1t5d0 sd20

Thanks to all that took the time to help.

-- 
====================================================
Gaetan Boudreau, ing/P.Eng.                       
Administrateur de reseau/Network Administrator
IRCM (Institut de recherches cliniques de Montreal/
      Clinical Research Institute of Montreal)

tel: 514-987-5563 fax: 514-987-5644 Internet E-Mail: Gaetan_Boudreau@IRCM.UMontreal.CA Internet Web Site: http://www.ircm.umontreal.ca



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:12:33 CDT