<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/css" href="http://brandonhutchinson.com/mediawiki/skins/common/feed.css?97"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title>Solaris instance number to device name conversion - Revision history</title>
		<link>http://brandonhutchinson.com/mediawiki/index.php5?title=Solaris_instance_number_to_device_name_conversion&amp;action=history</link>
		<description>Revision history for this page on the wiki</description>
		<language>en</language>
		<generator>MediaWiki 1.11.0rc1</generator>
		<lastBuildDate>Wed, 22 May 2013 13:36:12 GMT</lastBuildDate>
		<item>
			<title>Hutch at 20:39, 26 September 2007</title>
			<link>http://brandonhutchinson.com/mediawiki/index.php5?title=Solaris_instance_number_to_device_name_conversion&amp;diff=383&amp;oldid=prev</link>
			<description>&lt;p&gt;&lt;/p&gt;

			&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;tr&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 20:39, 26 September 2007&lt;/td&gt;
			&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 47:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 47:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;To:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;To:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt; my ($special, $fstyp, $opt) = (split(&amp;quot; &amp;quot;, $line))[1,2,3];&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt; my ($special, $fstyp, $opt) = (split(&amp;quot; &amp;quot;, $line))[1,2,3];&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt; $ '''./mapdev'''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt; $ '''./mapdev'''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt; nfs11 is an alias for /oradata1/PP01&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt; nfs11 is an alias for /oradata1/PP01&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</description>
			<pubDate>Wed, 26 Sep 2007 20:39:56 GMT</pubDate>			<dc:creator>Hutch</dc:creator>			<comments>http://brandonhutchinson.com/wiki/Talk:Solaris_instance_number_to_device_name_conversion</comments>		</item>
		<item>
			<title>Hutch: New page: When providing statistics on block devices in Solaris, utilities like ''sar'' and ''kstat'' return instance numbers instead of device names. Converting these to device names can be difficu...</title>
			<link>http://brandonhutchinson.com/mediawiki/index.php5?title=Solaris_instance_number_to_device_name_conversion&amp;diff=382&amp;oldid=prev</link>
			<description>&lt;p&gt;New page: When providing statistics on block devices in Solaris, utilities like ''sar'' and ''kstat'' return instance numbers instead of device names. Converting these to device names can be difficu...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;When providing statistics on block devices in Solaris, utilities like ''sar'' and ''kstat'' return instance numbers instead of device names. Converting these to device names can be difficult, especially for NFS file systems. Example:&lt;br /&gt;
 $ '''sar -d'''&lt;br /&gt;
 ...&lt;br /&gt;
           nfs1              0     0.0       0       0     0.0     0.0&lt;br /&gt;
           nfs2              0     0.0       0       0     0.0     0.0&lt;br /&gt;
           nfs3              0     0.0       0       0     0.0     0.0&lt;br /&gt;
           nfs4              0     0.0       0       0     0.7    19.2&lt;br /&gt;
           nfs5              0     0.0       0       0     2.5    15.3&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
In the above output, which file system corresponds to ''nfs1''? To find out, we have to look at the ''dev='' value in ''/etc/mnttab'' and perform a hexadecimal conversion. Fortunately, there is a Perl script named ''[http://search.cpan.org/~aburlison/Solaris-0.05a/ mapdev]'' that performs this conversion.&lt;br /&gt;
&lt;br /&gt;
== Step-by-step instructions for running ''mapdev'' ==&lt;br /&gt;
&lt;br /&gt;
In this example, I run ''mapdev'' out of my current directory. You may instead put ''MapDev.pm'' in @INC and modify the instructions accordingly.&lt;br /&gt;
&lt;br /&gt;
* Download ''[http://search.cpan.org/CPAN/authors/id/A/AB/ABURLISON/Solaris-0.05a.tar.gz mapdev]''.&lt;br /&gt;
* Extract ''mapdev''.&lt;br /&gt;
 $ '''gzip -cd Solaris-0.05a.tar.gz | tar xvf -'''&lt;br /&gt;
* Move ''MapDev.pm'' and ''mapdev'' to the current directory.&lt;br /&gt;
 $ '''mv Solaris-0.05/MapDev/MapDev.pm .'''&lt;br /&gt;
 $ '''mv Solaris-0.05/scripts/mapdev .'''&lt;br /&gt;
* Modify ''mapdev''. In this example, my version of ''perl'' is located in ''/usr/bin'', not ''/usr/local/bin''.&lt;br /&gt;
 $ '''sed -e 's@#!/usr/local/bin/perl -w@#!/usr/bin/perl -w@' \&lt;br /&gt;
 '''-e 's@use Solaris::MapDev qw(:ALL);@use MapDev qw(:ALL);@' mapdev &amp;gt; mapdev.new'''&lt;br /&gt;
 $ '''mv mapdev.new mapdev'''&lt;br /&gt;
* Modify ''MapDev.pm''.&lt;br /&gt;
 $ '''sed 's@package Solaris::MapDev;@package MapDev;@' MapDev.pm &amp;gt; MapDev.pm.new'''&lt;br /&gt;
 $ '''mv MapDev.pm.new MapDev.pm'''&lt;br /&gt;
* Run ''mapdev''.&lt;br /&gt;
 $ '''./mapdev'''&lt;br /&gt;
 nfs11 is an alias for fas:/vol/oradata1_pp01&lt;br /&gt;
 nfs12 is an alias for fas:/vol/oradata2_pp01&lt;br /&gt;
 nfs13 is an alias for fas:/vol/oradata1_sp01&lt;br /&gt;
 nfs14 is an alias for fas:/vol/oradata2_sp01&lt;br /&gt;
 nfs15 is an alias for fas:/vol/oradata3_pp01&lt;br /&gt;
 nfs16 is an alias for fas:/vol/oradata3_sp01&lt;br /&gt;
 nfs17 is an alias for fas:/vol/oradata4_pp01&lt;br /&gt;
 nfs18 is an alias for fas:/vol/oradata4_sp01&lt;br /&gt;
 nfs2 is an alias for hostname:vold(pid1742)&lt;br /&gt;
 nfs21 is an alias for fass:/vol/dba_misc&lt;br /&gt;
 sd0 is an alias for c0t0d0&lt;br /&gt;
 sd1 is an alias for c0t1d0&lt;br /&gt;
 sd19 is an alias for c1t4d0&lt;br /&gt;
* If you would rather see local mount points instead of remote NFS resources, change line 71 in ''MapDev.pm'' from:&lt;br /&gt;
 my ($special, $fstyp, $opt) = (split(&amp;quot; &amp;quot;, $line))[0,2,3];&lt;br /&gt;
To:&lt;br /&gt;
 my ($special, $fstyp, $opt) = (split(&amp;quot; &amp;quot;, $line))[1,2,3];&lt;br /&gt;
 $ '''./mapdev'''&lt;br /&gt;
 nfs11 is an alias for /oradata1/PP01&lt;br /&gt;
 nfs12 is an alias for /oradata2/PP01&lt;br /&gt;
 nfs13 is an alias for /oradata1/SP01&lt;br /&gt;
 nfs14 is an alias for /oradata2/SP01&lt;br /&gt;
 nfs15 is an alias for /oradata3/PP01&lt;br /&gt;
 nfs16 is an alias for /oradata3/SP01&lt;br /&gt;
 nfs17 is an alias for /oradata4/PP01&lt;br /&gt;
 nfs18 is an alias for /oradata4/SP01&lt;br /&gt;
 nfs2 is an alias for /vol&lt;br /&gt;
 nfs21 is an alias for /files/files0/DBA/misc&lt;br /&gt;
 sd0 is an alias for c0t0d0&lt;br /&gt;
 sd1 is an alias for c0t1d0&lt;br /&gt;
 sd19 is an alias for c1t4d0&lt;/div&gt;</description>
			<pubDate>Wed, 26 Sep 2007 20:39:32 GMT</pubDate>			<dc:creator>Hutch</dc:creator>			<comments>http://brandonhutchinson.com/wiki/Talk:Solaris_instance_number_to_device_name_conversion</comments>		</item>
	</channel>
</rss>