<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Solaris Blog</title>
	
	<link>http://solaris.reys.net</link>
	<description>Tips and tricks on DTrace, ZFS, Zones and Solaris administration</description>
	<lastBuildDate>Wed, 20 May 2009 14:26:04 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/solaris" type="application/rss+xml" /><feedburner:browserFriendly>This is an XML content feed. It is intended to be viewed in a newsreader or syndicated to another site, subject to copyright and fair use.</feedburner:browserFriendly><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
		<title>Changing hostname in Solaris</title>
		<link>http://feedproxy.google.com/~r/solaris/~3/2vwXAK1fsX0/</link>
		<comments>http://solaris.reys.net/change-hostname-in-solaris/#comments</comments>
		<pubDate>Wed, 20 May 2009 14:26:04 +0000</pubDate>
		<dc:creator>Gleb Reys</dc:creator>
				<category><![CDATA[General Solaris topics]]></category>
		<category><![CDATA[hostname]]></category>
		<category><![CDATA[nodename]]></category>
		<category><![CDATA[solaris]]></category>
		<category><![CDATA[solaris zones]]></category>
		<category><![CDATA[uname]]></category>

		<guid isPermaLink="false">http://solaris.reys.net/?p=330</guid>
		<description><![CDATA[I had to change the hostname in one of Solaris zones today, and just out of curiousity looked into /etc/init.d/network script. That&#8217;s how I learned a new (to me) option of the uname command, which seems to be specific to Solaris: uname -S &#60;newhostname&#62;.
So here&#8217;s a very simple procedure for updating the hostname of your [...]]]></description>
			<content:encoded><![CDATA[<p>I had to change the hostname in one of Solaris zones today, and just out of curiousity looked into <strong>/etc/init.d/network</strong> script. That&#8217;s how I learned a new (to me) option of the <strong>uname command</strong>, which seems to be specific to Solaris: <strong>uname -S &lt;newhostname&gt;</strong>.</p>
<p>So here&#8217;s a very simple procedure for updating the hostname of your Solaris 10 server.</p>
<p><span id="more-330"></span></p>
<h3>Step 1: Update /etc/hosts</h3>
<p>Quite simply, you need to add an IP to hostname association for in here, for the new hostname you plan to use. In this example, I&#8217;ll use a &#8220;<strong>newsolaris</strong>&#8221; hostname.</p>
<pre>192.168.0.6 newsolaris</pre>
<h3>Step 2: Change /etc/nodename</h3>
<p>Just overwrite the previous value in this file (or make a backup copy of /etc/nodename to make possible going back to old hostname a bit easier):</p>
<pre>echo "newsolaris" &gt; /etc/nodename</pre>
<h3>Step 3: Update /etc/hostname.&lt;primary interface&gt;</h3>
<p>This is a step more important for physical Solaris servers rather than for Solaris zones:</p>
<pre>echo "newsolaris" &gt; /etc/hostname.e1000g0</pre>
<h3>Step 4: Reconfigure network and reset hostname to the new value</h3>
<pre>/etc/init.d/network stop
/etc/init.d/network start</pre>
<p>or, as it was in my case, if you don&#8217;t want to refresh network config and just need to apply the new hostname, do it manually:</p>
<pre>uname -S newsolaris</pre>
<h3>See also:</h3>
<ul>
<li><strong><a title="IP configuration in Solaris zones" href="http://solaris.reys.net/shared-ip-and-exclusive-ip-in-solaris-zones/">IP address configuration in Solaris zones</a></strong></li>
<li><strong><a title="inetadm change properties" href="http://solaris.reys.net/inetadm-changing-service-properties/">inetadm &#8211; changing service properties</a></strong></li>
<li><strong><a title="solaris 8 migration assistant" href="http://solaris.reys.net/solaris-8-migration-assistant-project-etude/">S8MA &#8211; Solaris 8 migration assistant</a></strong></li>
</ul>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/solaris?a=2vwXAK1fsX0:On3nYkI3Kow:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/solaris?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/solaris?a=2vwXAK1fsX0:On3nYkI3Kow:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/solaris?d=7Q72WNTAKBA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://solaris.reys.net/change-hostname-in-solaris/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://solaris.reys.net/change-hostname-in-solaris/</feedburner:origLink></item>
		<item>
		<title>Solaris 10 patch return codes</title>
		<link>http://feedproxy.google.com/~r/solaris/~3/fF3Tg3AMV44/</link>
		<comments>http://solaris.reys.net/solaris-10-patch-return-codes/#comments</comments>
		<pubDate>Tue, 19 May 2009 09:47:05 +0000</pubDate>
		<dc:creator>Gleb Reys</dc:creator>
				<category><![CDATA[General Solaris topics]]></category>
		<category><![CDATA[patches]]></category>
		<category><![CDATA[solaris]]></category>
		<category><![CDATA[solaris 10]]></category>
		<category><![CDATA[solaris install]]></category>

		<guid isPermaLink="false">http://solaris.reys.net/?p=323</guid>
		<description><![CDATA[Now that some of the systems I have to regularly patch are Solaris 10 ones, I have to get used to the new patch return codes which one can see when applying one of the Sun&#8217;s recommended patchsets. It&#8217;s similar to the Solaris 8/9 patchset installation codes, but there are more codes added to the [...]]]></description>
			<content:encoded><![CDATA[<p>Now that some of the systems I have to regularly patch are <strong>Solaris 10</strong> ones, I have to get used to the new patch return codes which one can see when applying one of the Sun&#8217;s recommended patchsets. It&#8217;s similar to the <a title="solaris 8 patch codes" href="http://solaris.reys.net/solaris-patches-installation-error-codes/">Solaris 8/9 patchset installation codes</a>, but there are more codes added to the list.</p>
<h3><span id="more-323"></span>Solaris 10 patch error codes</h3>
<pre>Exit    Meaning
code

0       No error
1       Usage error
2       Attempt to apply a patch that's already been applied
3       Effective UID is not root
4       Attempt to save original files failed
5       pkgadd failed
6       Patch is obsoleted
7       Invalid package directory
8       Attempting to patch a package that is not installed
9       Cannot access /usr/sbin/pkgadd (client problem)
10      Package validation errors
11      Error adding patch to root template
12      Patch script terminated due to signal
13      Symbolic link included in patch
14      NOT USED
15      The prepatch script had a return code other than 0.
16      The postpatch script had a return code other than 0.
17      Mismatch of the -d option between a previous patch install and the current one.
18      Not enough space in the file systems that are targets of the patch.
19      $SOFTINFO/INST_RELEASE file not found
20      A direct instance patch was required but not found
21      The required patches have not been installed on the manager
22      A progressive instance patch was required but not found
23      A restricted patch is already applied to the package
24      An incompatible patch is applied
25      A required patch is not applied
26      The user specified backout data can't be found
27      The relative directory supplied can't be found
28      A pkginfo file is corrupt or missing
29      Bad patch ID format
30      Dryrun failure(s)
31      Path given for -C option is invalid
32      Must be running Solaris 2.6 or greater
33      Bad formatted patch file or patch file not found
34      Incorrect patch spool directory
35      Later revision already installed
36      Cannot create safe temporary directory
37      Illegal backout directory specified
38      A prepatch, prePatch or a postpatch script could not be executed
39      A compressed patch was unable to be decompressed
40      Error downloading a patch
41      Error verifying signed patch
42      Error unable to retrieve patch information from SQL DB.
43      Error unable to update the SQL DB.
44      Lock file not available
45      Unable to copy patch data to partial spool directory.</pre>
<h3>See also:</h3>
<ul>
<li><strong><a title="solaris patch return codes" href="http://solaris.reys.net/solaris-patches-installation-error-codes/">Solaris 8/9 patch return codes</a></strong></li>
<li><strong><a title="jumpstart miniroot" href="http://solaris.reys.net/be-careful-with-jumpstart-miniroot/">How to make sure you don&#8217;t corrupt your netinstall miniroot </a></strong></li>
<li><strong><a title="solaris dhcp pxe" href="http://solaris.reys.net/how-to-installing-solaris-with-pxe-dhcp/">Installing Solaris with DHCP and PXE</a><br />
</strong></li>
</ul>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/solaris?a=fF3Tg3AMV44:j1egmRrbKI0:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/solaris?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/solaris?a=fF3Tg3AMV44:j1egmRrbKI0:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/solaris?d=7Q72WNTAKBA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://solaris.reys.net/solaris-10-patch-return-codes/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://solaris.reys.net/solaris-10-patch-return-codes/</feedburner:origLink></item>
		<item>
		<title>Shared-IP and Exclusive-IP in Non-Global Solaris Zones</title>
		<link>http://feedproxy.google.com/~r/solaris/~3/pzKZfz_qmz8/</link>
		<comments>http://solaris.reys.net/shared-ip-and-exclusive-ip-in-solaris-zones/#comments</comments>
		<pubDate>Mon, 11 May 2009 15:03:35 +0000</pubDate>
		<dc:creator>Gleb Reys</dc:creator>
				<category><![CDATA[General Solaris topics]]></category>
		<category><![CDATA[solaris zones]]></category>

		<guid isPermaLink="false">http://solaris.reys.net/?p=317</guid>
		<description><![CDATA[Just a few days ago I&#8217;ve been busy configuring one of the Solaris 10 zones on a DMZ server, and sure enough I hit one of the most common IP-related issues with non-global zones.
Shared IP configuration for non-global Solaris zones
By default, non-global zones will be configured with a shared IP functionality. What this means is [...]]]></description>
			<content:encoded><![CDATA[<p>Just a few days ago I&#8217;ve been busy configuring one of the Solaris 10 zones on a DMZ server, and sure enough I hit one of the most common IP-related issues with non-global zones.</p>
<h3>Shared IP configuration for non-global Solaris zones</h3>
<p>By default, non-global zones will be configured with a shared IP functionality. What this means is that IP layer configuration and state is shared between the zone you&#8217;re creating and the global zone. This usually implies both zones being on the same IP subnet for each given NIC.</p>
<p>Shared IP mode is defined by the following statement in zone configuration:</p>
<pre><strong>set ip-type=shared</strong></pre>
<p><span id="more-317"></span>Here&#8217;s all the commands needed to enable it for a zone called <strong>s10zone</strong> in my example:</p>
<pre>solaris# <strong>zonecfg -z s10zone</strong>
zonecfg:s10zone&gt; <strong>set ip-type=shared</strong>
zonecfg:s10zone&gt; <strong>verify</strong>
zonecfg:s10zone&gt; <strong>commit</strong>
zonecfg:s10zone&gt; <strong>end</strong>
solaris#</pre>
<p>While I&#8217;ve deployed quite a few zones before, it was only recently that I learned what sharing IP layer configuration meant in practical terms: no IP routing within non-global zone. So if for some reason you want your non-global zone to use a different IP route for connecting one of the available networks, you really can&#8217;t don it in shared IP mode, because your non-global zone can only inherit the routing rules of the global zone.</p>
<p>You still have an option of assigning different IP addresses to different virtual interfaces of a non-global zone, but unless their routing is catered for by the global zone, it won&#8217;t be of much use.</p>
<h3>Exclusive IP configuration for non-global Solaris zones</h3>
<p>Configured using this statement in zone configuration:</p>
<pre><strong>set ip-type=exclusive</strong></pre>
<p>&#8230; this mode implies that a given non-global zone will have exclusive access to one of the NICs on your system.</p>
<p>While for me the most important aspect of such exclusivity was the possibility to configure zone-specific routing, there&#8217;s obviously much more offered by this mode:</p>
<ul>
<li>DHCPv4 and IPv6 stateless address autoconfiguration</li>
<li><a name="indexterm-173"></a>IP Filter, including network address translation (NAT) functionality</li>
<li><a name="indexterm-174"></a>IP Network Multipathing (IPMP)</li>
<li><a name="indexterm-175"></a>IP routing</li>
<li><kbd>ndd</kbd> for setting TCP/UDP/SCTP as well as IP/ARP-level knobs</li>
<li>IP security (IPsec) and IKE, which automates the provision of authenticated keying material for IPsec security association</li>
</ul>
<p>So here it is &#8211; another design lesson for you &#8211; make sure you know what kind of networking your zones will need.</p>
<h3>See also:</h3>
<ul>
<li><strong><a title="solaris zones example" href="http://solaris.reys.net/solaris-10-zones-part-one-a-working-example/">Solaris 10 zones &#8211; a working example</a></strong></li>
<li><strong><a title="solaris 10 zones types of resources" href="http://solaris.reys.net/zones-in-solaris-10-part-two-types-of-resources/">Types of resources in Solaris zones</a></strong></li>
<li><strong><a title="sparse root and whole root" href="http://solaris.reys.net/zones-in-solaris-10-part-three-sparse-root-and-whole-root/">sparse root vs whole root in Solaris zones</a><br />
</strong></li>
</ul>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/solaris?a=pzKZfz_qmz8:W7FNJgbDtYY:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/solaris?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/solaris?a=pzKZfz_qmz8:W7FNJgbDtYY:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/solaris?d=7Q72WNTAKBA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://solaris.reys.net/shared-ip-and-exclusive-ip-in-solaris-zones/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		<feedburner:origLink>http://solaris.reys.net/shared-ip-and-exclusive-ip-in-solaris-zones/</feedburner:origLink></item>
		<item>
		<title>Solaris 10 update 7 (5/09) release</title>
		<link>http://feedproxy.google.com/~r/solaris/~3/pXqMUiyiPW8/</link>
		<comments>http://solaris.reys.net/solaris-10-update-7-509-release/#comments</comments>
		<pubDate>Wed, 06 May 2009 20:51:03 +0000</pubDate>
		<dc:creator>Gleb Reys</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[ipsec]]></category>
		<category><![CDATA[solaris 10]]></category>
		<category><![CDATA[solaris zones]]></category>
		<category><![CDATA[zfs]]></category>
		<category><![CDATA[zoneadm]]></category>

		<guid isPermaLink="false">http://solaris.reys.net/?p=312</guid>
		<description><![CDATA[Last week yet another update of Solaris 10 OS was released: Solaris 10u7.
What&#8217;s new in Solaris 10 update 7?

ZFS support when cloning a Solaris zone &#8211; quite a useful tool for someone who always copied the files of Solaris zones. I personally did similar cloning myself, but it&#8217;s handy that now ZFS cloning is supported [...]]]></description>
			<content:encoded><![CDATA[<p>Last week yet another update of <strong>Solaris 10</strong> OS was released: <strong>Solaris 10u7</strong>.</p>
<h3>What&#8217;s new in Solaris 10 update 7?</h3>
<ul>
<li><strong>ZFS support when cloning a Solaris zone</strong> &#8211; quite a useful tool for someone who always copied the files of Solaris zones. I personally did similar cloning myself, but it&#8217;s handy that now ZFS cloning is supported in the <strong>zoneadm </strong>command itself.</li>
<li><strong>IPsec &#8211; SMF services</strong> &#8211; Service Management Framework now manages all the necessary IPsec functionality with traditionally thorough approach: interface consistency, restarting anf fault-tracking are all provided. SMF services for IPsec are: <strong>ipsec/policy</strong>, <strong>ipsec/ike</strong>, <strong>ipsec/manual-key</strong> and <strong>ipsec/ipsecalgs</strong>.</li>
<li><strong>SunSSH with OpenSSL PKCS#11 Engine support</strong> &#8211; this opens way for more optimal use of hardware crypto accelerators.</li>
<li><strong>iSCSI Target improvements</strong> &#8211; greatly improved iSNS (Internet Storage Name Service) support, updates for improved interoperability. Most common iSCSI initiators are now supported</li>
<li><strong>NetXen 10-GigE driver</strong> &#8211; a new NIC driver called <strong>ntxn</strong> will make it possible to use 10-Gigabit cards on your x86 platform</li>
<li><strong>New locale support</strong> &#8211; greetings go to Kazakhstan and Ukraine which are now fully supported</li>
</ul>
<p>This isn&#8217;t a full list of improvements, so if you&#8217;re interested in all the details &#8211; please read the official <a href="http://docs.sun.com/app/docs/doc/820-7758/gijtg?a=view">What&#8217;s New in Solaris 10 update 7</a> doc.</p>
<h3>Solaris 10 u7 screenshots gallery</h3>
<p>I&#8217;ve uploaded a few screenshots for you, nothing revolutionary but will still give you an idea if you have never seen Solaris 10 before:</p>

<div class="ngg-galleryoverview" id="ngg-gallery-1-312">


	<!-- Piclense link -->
	<div class="piclenselink">
		<a class="piclenselink" href="javascript:PicLensLite.start({feedUrl:'http://solaris.reys.net/wp-content/plugins/nextgen-gallery/xml/media-rss.php?gid=1&amp;mode=gallery'});">
			[View with PicLens]		</a>
	</div>
	
	<!-- Thumbnails -->
		
	<div id="ngg-image-19" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://solaris.reys.net/wp-content/gallery/solaris-10-u7/solaris-10-u7-staroffice-start.png" title=" " class="shutterset_solaris-10-u7" >
				<img title="solaris-10-u7-staroffice-start.png" alt="solaris-10-u7-staroffice-start.png" src="http://solaris.reys.net/wp-content/gallery/solaris-10-u7/thumbs/thumbs_solaris-10-u7-staroffice-start.png" width="100" height="75" />
			</a>
		</div>
	</div>
	 		
	<div id="ngg-image-18" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://solaris.reys.net/wp-content/gallery/solaris-10-u7/solaris-10-u7-staroffice-menu.png" title=" " class="shutterset_solaris-10-u7" >
				<img title="solaris-10-u7-staroffice-menu.png" alt="solaris-10-u7-staroffice-menu.png" src="http://solaris.reys.net/wp-content/gallery/solaris-10-u7/thumbs/thumbs_solaris-10-u7-staroffice-menu.png" width="100" height="75" />
			</a>
		</div>
	</div>
	 		
	<div id="ngg-image-16" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://solaris.reys.net/wp-content/gallery/solaris-10-u7/solaris-10-u7-firefox-browser.png" title=" " class="shutterset_solaris-10-u7" >
				<img title="solaris-10-u7-firefox-browser.png" alt="solaris-10-u7-firefox-browser.png" src="http://solaris.reys.net/wp-content/gallery/solaris-10-u7/thumbs/thumbs_solaris-10-u7-firefox-browser.png" width="100" height="75" />
			</a>
		</div>
	</div>
	 		
	<div id="ngg-image-17" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://solaris.reys.net/wp-content/gallery/solaris-10-u7/solaris-10-u7-launch-menu-terminal.png" title=" " class="shutterset_solaris-10-u7" >
				<img title="solaris-10-u7-launch-menu-terminal.png" alt="solaris-10-u7-launch-menu-terminal.png" src="http://solaris.reys.net/wp-content/gallery/solaris-10-u7/thumbs/thumbs_solaris-10-u7-launch-menu-terminal.png" width="100" height="75" />
			</a>
		</div>
	</div>
	 		
	<div id="ngg-image-15" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://solaris.reys.net/wp-content/gallery/solaris-10-u7/solaris-10-u7-desktop.png" title=" " class="shutterset_solaris-10-u7" >
				<img title="solaris-10-u7-desktop.png" alt="solaris-10-u7-desktop.png" src="http://solaris.reys.net/wp-content/gallery/solaris-10-u7/thumbs/thumbs_solaris-10-u7-desktop.png" width="100" height="75" />
			</a>
		</div>
	</div>
	 		
	<div id="ngg-image-14" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://solaris.reys.net/wp-content/gallery/solaris-10-u7/solaris-10-u7-login-screen.png" title=" " class="shutterset_solaris-10-u7" >
				<img title="solaris-10-u7-login-screen.png" alt="solaris-10-u7-login-screen.png" src="http://solaris.reys.net/wp-content/gallery/solaris-10-u7/thumbs/thumbs_solaris-10-u7-login-screen.png" width="100" height="75" />
			</a>
		</div>
	</div>
	 		
	<div id="ngg-image-20" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://solaris.reys.net/wp-content/gallery/solaris-10-u7/solaris-10-u7-staroffice-writer.png" title=" " class="shutterset_solaris-10-u7" >
				<img title="solaris-10-u7-staroffice-writer.png" alt="solaris-10-u7-staroffice-writer.png" src="http://solaris.reys.net/wp-content/gallery/solaris-10-u7/thumbs/thumbs_solaris-10-u7-staroffice-writer.png" width="100" height="75" />
			</a>
		</div>
	</div>
	 	 	
	<!-- Pagination -->
 	<div class='ngg-clear'></div>
 	
</div>


<h3>See also:</h3>
<ul>
<li><strong><a title="new in solaris 10" href="http://solaris.reys.net/whats-new-in-solaris-10/">What&#8217;s new in Solaris 10</a></strong></li>
<li><strong><a title="solaris 10 zones" href="http://solaris.reys.net/solaris-10-zones-part-one-a-working-example/">Solaris 10 zones: part one</a></strong></li>
<li><strong><a title="solaris express" href="http://solaris.reys.net/what-is-solaris-express/">What is Solaris Express</a><br />
</strong></li>
</ul>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/solaris?a=pXqMUiyiPW8:FJXeW6tmvWs:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/solaris?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/solaris?a=pXqMUiyiPW8:FJXeW6tmvWs:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/solaris?d=7Q72WNTAKBA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://solaris.reys.net/solaris-10-update-7-509-release/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://solaris.reys.net/solaris-10-update-7-509-release/</feedburner:origLink></item>
		<item>
		<title>inetadm – intro</title>
		<link>http://feedproxy.google.com/~r/solaris/~3/Q1fJWpPAZnA/</link>
		<comments>http://solaris.reys.net/inetadm-intro/#comments</comments>
		<pubDate>Mon, 04 May 2009 00:48:02 +0000</pubDate>
		<dc:creator>Gleb Reys</dc:creator>
				<category><![CDATA[General Solaris topics]]></category>
		<category><![CDATA[inetadm]]></category>

		<guid isPermaLink="false">http://solaris.simplyunix.com/?p=120</guid>
		<description><![CDATA[inetadm command is used for observing and managing inetd services in Solaris 10.
If you run this command without any parameters, you&#8217;ll simply get a list of all the services it manages along with their current status:
solaris# inetadm
ENABLED   STATE          FMRI
enabled   online         svc:/application/x11/xfs:default
enabled   online         svc:/application/font/stfsloader:default
enabled   offline        svc:/application/print/rfc1179:default
enabled   online         svc:/network/rpc/gss:default
disabled  disabled       svc:/network/rpc/mdcomm:default
disabled  disabled       svc:/network/rpc/meta:default
disabled  disabled       svc:/network/rpc/metamed:default
disabled  disabled       svc:/network/rpc/metamh:default
...
I needed to start a time service on my system:
solaris# inetadm &#124; grep time
disabled  disabled       svc:/network/daytime:dgram
disabled  disabled       svc:/network/daytime:stream
disabled  disabled       svc:/network/time:dgram
disabled  disabled       svc:/network/time:stream
To enable or disable a certain network service, you have [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://docs.sun.com/app/docs/doc/816-5166/6mbb1kq3q?q=inetadm&amp;a=view">inetadm</a><span> </span>command is used for observing and managing inetd services in Solaris 10.</p>
<p>If you run this command without any parameters, you&#8217;ll simply get a list of all the services it manages along with their current status:</p>
<pre>solaris# <strong>inetadm</strong>
ENABLED   STATE          FMRI
enabled   online         svc:/application/x11/xfs:default
enabled   online         svc:/application/font/stfsloader:default
enabled   offline        svc:/application/print/rfc1179:default
enabled   online         svc:/network/rpc/gss:default
disabled  disabled       svc:/network/rpc/mdcomm:default
disabled  disabled       svc:/network/rpc/meta:default
disabled  disabled       svc:/network/rpc/metamed:default
disabled  disabled       svc:/network/rpc/metamh:default
...</pre>
<p><span id="more-120"></span>I needed to start a <strong>time</strong> service on my system:</p>
<pre>solaris# <strong>inetadm | grep time</strong>
disabled  disabled       svc:/network/daytime:dgram
disabled  disabled       svc:/network/daytime:stream
disabled  disabled       svc:/network/time:dgram
disabled  disabled       svc:/network/time:stream</pre>
<p>To enable or disable a certain network service, you have to use <strong>-e</strong> (enable) and <strong>-d</strong> (disable) command line parameters. For instance, the following command has activated <strong>time</strong> for UDP:</p>
<pre>solaris# <strong>inetadm -e svc:/network/time:stream</strong></pre>
<p>Now all we have to do is just make sure the service has been successfully started:</p>
<pre>solaris# <strong>inetadm | grep time</strong>
disabled  disabled       svc:/network/daytime:dgram
disabled  disabled       svc:/network/daytime:stream
disabled  disabled       svc:/network/time:dgram
enabled   online         svc:/network/time:stream</pre>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/solaris?a=Q1fJWpPAZnA:oGobzrstink:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/solaris?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/solaris?a=Q1fJWpPAZnA:oGobzrstink:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/solaris?d=7Q72WNTAKBA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://solaris.reys.net/inetadm-intro/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://solaris.reys.net/inetadm-intro/</feedburner:origLink></item>
		<item>
		<title>Interesting Solaris blogs</title>
		<link>http://feedproxy.google.com/~r/solaris/~3/ChMoj3ccxwY/</link>
		<comments>http://solaris.reys.net/interesting-solaris-blogs/#comments</comments>
		<pubDate>Sat, 02 May 2009 02:50:26 +0000</pubDate>
		<dc:creator>Gleb Reys</dc:creator>
				<category><![CDATA[General Solaris topics]]></category>
		<category><![CDATA[blogs]]></category>

		<guid isPermaLink="false">http://solaris.simplyunix.com/?p=139</guid>
		<description><![CDATA[I wonder if someone would be kind enough to share his most interesting Solaris blogs with me?
Here is a partial list of what I regularly read, maybe you&#8217;ll like some of it:
Solaris blogs in Russian

Ruslan Valiev &#8211; Designerus
Unix Pin
SunHelp.Ru

Solaris blogs In English

Bryan Cantrill &#8211; The Observation Deck
Ilya Voronin &#8211; CurThread.org
Robert Milkowski &#8211; Milek&#8217;s Blog
James Dickens [...]]]></description>
			<content:encoded><![CDATA[<p>I wonder if someone would be kind enough to share his most interesting Solaris blogs with me?</p>
<p>Here is a partial list of what I regularly read, maybe you&#8217;ll like some of it:</p>
<h3>Solaris blogs in Russian</h3>
<ul>
<li style="list-style-position: inside;">Ruslan Valiev &#8211; <a href="http://designerus.livejournal.com/">Designerus</a></li>
<li style="list-style-position: inside;"><a href="http://www.unixpin.com">Unix Pin</a></li>
<li style="list-style-position: inside;"><a href="http://www.sunhelp.ru">SunHelp.Ru</a></li>
</ul>
<h3>Solaris blogs In English</h3>
<ul>
<li style="list-style-position: inside;">Bryan Cantrill &#8211; <a href="http://blogs.sun.com/bmc/">The Observation Deck</a></li>
<li style="list-style-position: inside;">Ilya Voronin &#8211; <a href="http://blog.curthread.org">CurThread.org</a><a href="http://blog.curthread.org"></a></li>
<li style="list-style-position: inside;">Robert Milkowski &#8211; <a href="http://milek.blogspot.com/">Milek&#8217;s Blog</a></li>
<li style="list-style-position: inside;">James Dickens &#8211; <a href="http://uadmin.blogspot.com/">Unix Admin Corner</a></li>
<li style="list-style-position: inside;"><a href="http://prefetch.net/blog">Blog O&#8217; Matty</a></li>
<li style="list-style-position: inside;">Bill Rushmore &#8211; <a href="http://brushmore.blogspot.com/">Developer&#8217;s Quarterdeck Log</a></li>
<li style="list-style-position: inside;">Ben Rockwood &#8211; <a href="http://www.cuddletech.com/blog">Cuddletech: use UNIX or die</a></li>
<li style="list-style-position: inside;"><a href="http://www.cuddletech.com/blog"></a>Derek Crudgington &#8211; <a href="http://hell.jedicoder.net/">A look into Solaris</a></li>
</ul>
<p>Well, that seems to be all I read. Surely, there are hundreds more on <a href="http://blogs.sun.com/">blogs.sun.com</a> and <a href="http://opensolaris.org/os/blogs/">OpenSolaris.org blogs</a>, so I enjoy opening main pages of these resources now and then just to selectively read the most interesting posts (I also find weekly lists of posts on OpenSolaris to be particularly useful).</p>
<p>If you know an interesting Solaris blog, please share it with me and I&#8217;ll update the list above.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/solaris?a=ChMoj3ccxwY:C2b3OSRj4_A:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/solaris?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/solaris?a=ChMoj3ccxwY:C2b3OSRj4_A:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/solaris?d=7Q72WNTAKBA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://solaris.reys.net/interesting-solaris-blogs/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://solaris.reys.net/interesting-solaris-blogs/</feedburner:origLink></item>
		<item>
		<title>OpenSolaris: BFU archive anatomy</title>
		<link>http://feedproxy.google.com/~r/solaris/~3/IGkqjUs9fjc/</link>
		<comments>http://solaris.reys.net/opensolaris-bfu-archive-anatomy/#comments</comments>
		<pubDate>Sat, 02 May 2009 02:49:03 +0000</pubDate>
		<dc:creator>Gleb Reys</dc:creator>
				<category><![CDATA[General Solaris topics]]></category>
		<category><![CDATA[bfu]]></category>
		<category><![CDATA[opensolaris]]></category>

		<guid isPermaLink="false">http://solaris.simplyunix.com/?p=137</guid>
		<description><![CDATA[I think I&#8217;ve covered the basics of updating your OpenSolaris using BFU before. This is the post: OpenSolaris BFU. Back then I&#8217;ve explained the basics of BFUing.
Today I simply would like to tell a bit more about the contents of a BFU archive, using the latest available one as an example: ON b41.
After you download [...]]]></description>
			<content:encoded><![CDATA[<p>I think I&#8217;ve covered the basics of updating your OpenSolaris using BFU before. This is the post: OpenSolaris BFU. Back then I&#8217;ve explained the basics of BFUing.</p>
<p>Today I simply would like to tell a bit more about the contents of a BFU archive, using the latest available one as an example: <strong>ON b41</strong>.</p>
<p>After you download and unpack the archive, you will get a directory like this:</p>
<pre>bash-3.00$ <strong>cd /export/dist/archives-b41</strong>
bash-3.00$ <strong>ls</strong>
BINARYLICENSE.txt THIRDPARTYLICENSE.BFU-ARCHIVES
README.BFU-ARCHIVES.i386 i386</pre>
<p><span id="more-137"></span>Besides the text files with licenses, it also contains a README file with the full list of files supplied within the BFU along with the architecture-depended directory &#8211; i386 (this is because I&#8217;ve downloaded the BFU for my amd64-based box).</p>
<p>The i386 subdirectory contains the following:</p>
<div class="code">
<pre>bash-3.00$ <strong>cd /export/dist/archives-b41/i386</strong>
bash-3.00$ <strong>ls -al</strong>
total 512286
drwxr-xr-x 2 greys other 512 May 30 17:50 .
drwxr-xr-x 3 greys other 512 May 30 17:59 ..
-rw-r--r-- 1 greys other 61585 May 30 17:50 conflict_resolution.gz
-rw-r--r-- 1 greys other 67812860 May 30 17:50 generic.kernel
-rw-r--r-- 1 greys other 21769100 May 30 17:50 generic.lib
-rw-r--r-- 1 greys other 2097796 May 30 17:50 generic.root
-rw-r--r-- 1 greys other 1100800 May 30 17:50 generic.sbin
-rw-r--r-- 1 greys other 161510640 May 30 17:50 generic.usr
-rw-r--r-- 1 greys other 1264640 May 30 17:50 i86pc.boot
-rw-r--r-- 1 greys other 5329920 May 30 17:50 i86pc.root
-rw-r--r-- 1 greys other 1105920 May 30 17:50 i86pc.usr</pre>
</div>
<p>As you can see, these files are nothing but cpio-archives with all the files supplied in the given BFU build:</p>
<div class="code">
<pre>bash-3.00$ <strong>file generic.kernel</strong>
generic.kernel: ASCII cpio archive</pre>
</div>
<p>The README file contains the full list of all the files provided in the BFU archive, split by arhives which contain these files. So, this list has sub-sections named like ==== conflict_resolution.gz ====, or ==== generic.root ====, and so on.</p>
<p>If you&#8217;re keen on finding out what exactly you&#8217;ve got, feel free to browse your archives like this:</p>
<pre>bash-3.00$ <strong>cpio -itv </strong>
-rwxr-xr-x 1 root sys 5156384 May 30 17:37 2006, kernel/amd64/genunix
drwxr-xr-x 2 root sys 0 May 30 17:37 2006, kernel/amd64
-rwxr-xr-x 1 root sys 20512 May 14 16:51 2006, kernel/crypto/blowfish
-rwxr-xr-x 1 root sys 46216 May 30 17:36 2006, kernel/crypto/rsa
-rwxr-xr-x 1 root sys 8260 May 14 16:51 2006, kernel/crypto/arcfour
-rwxr-xr-x 1 root sys 35776 May 14 16:51 2006, kernel/crypto/aes
-rwxr-xr-x 1 root sys 12024 May 14 19:05 2006, kernel/crypto/amd64/arcfour2048
-rwxr-xr-x 1 root sys 27936 May 14 19:05 2006, kernel/crypto/amd64/blowfish448
-rwxr-xr-x 1 root sys 48072 May 14 19:05 2006, kernel/crypto/amd64/aes256
-rwxr-xr-x 1 root sys 27928 May 14 16:51 2006, kernel/crypto/amd64/blowfish
-rwxr-xr-x 1 root sys 23640 May 30 17:36 2006, kernel/crypto/amd64/swrand
-rwxr-xr-x 1 root sys 48072 May 14 16:51 2006, kernel/crypto/amd64/aes
-rwxr-xr-x 1 root sys 68352 May 30 17:36 2006, kernel/crypto/amd64/rsa
-rwxr-xr-x 1 root sys 12024 May 14 16:51 2006, kernel/crypto/amd64/arcfour
drwxr-xr-x 2 root sys 0 May 30 17:36 2006, kernel/crypto/amd64
-rwxr-xr-x 1 root sys 14784 May 30 17:36 2006, kernel/crypto/swrand
...</pre>
<p>And if you want to check quickly, whether a particular file is part of the BFU, then that&#8217;s how you do it:</p>
<pre>bash-3.00$ <strong>grep sbin/tar README.BFU-ARCHIVES.i386</strong></pre>
<p>&#8230; and just in case you want to compare it against the existing file you have in your current environment, it&#8217;s very easy to get the full listing of this file&#8217;s entry in an archive:</p>
<pre>bash-3.00$ <strong>cpio -itv</strong>
lrwxrwxrwx 1 root root 11 May 30 17:17 2006, usr/bin/tar -&gt; ../sbin/tar
-r-xr-xr-x 1 root bin 83788 May 30 17:49 2006, usr/sbin/tar</pre>
<p>That&#8217;s it for today. Good luck with your <a href="http://www.opensolaris.org">OpenSolaris</a> experiments!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/solaris?a=IGkqjUs9fjc:DdIKcuC9hi4:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/solaris?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/solaris?a=IGkqjUs9fjc:DdIKcuC9hi4:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/solaris?d=7Q72WNTAKBA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://solaris.reys.net/opensolaris-bfu-archive-anatomy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://solaris.reys.net/opensolaris-bfu-archive-anatomy/</feedburner:origLink></item>
		<item>
		<title>ZFS: managing filesystems</title>
		<link>http://feedproxy.google.com/~r/solaris/~3/_Z36g3yDzOA/</link>
		<comments>http://solaris.reys.net/zfs-managing-filesystems/#comments</comments>
		<pubDate>Sat, 02 May 2009 02:48:29 +0000</pubDate>
		<dc:creator>Gleb Reys</dc:creator>
				<category><![CDATA[General Solaris topics]]></category>
		<category><![CDATA[zfs]]></category>

		<guid isPermaLink="false">http://solaris.simplyunix.com/?p=135</guid>
		<description><![CDATA[It&#8217;s been quite a while since I&#8217;ve cleared one of internal disks in my Netra t105 to bring it under ZFS control. As a result, I now have a 33Gb zfs-pool to experiment with. Today I had some spare time, so I decided to share with you the very basics of managing ZFS filesystems.
So this [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been quite a while since I&#8217;ve cleared one of internal disks in my <strong>Netra t105</strong> to bring it under <strong>ZFS</strong> control. As a result, I now have a 33Gb zfs-pool to experiment with. Today I had some spare time, so I decided to share with you the very basics of managing ZFS filesystems.</p>
<p>So this is the ZFS pool I have:</p>
<pre>solaris# <strong>zpool list</strong>
NAME                    SIZE    USED   AVAIL    CAP  HEALTH     ALTROOT
stock                  33.8G   2.40G   31.4G     7%  ONLINE     -</pre>
<p><span id="more-135"></span>And like I said, it has only one drive in it:</p>
<pre>solaris# <strong>zpool status</strong>
pool: stock
state: ONLINE
scrub: scrub stopped with 0 errors on Tue Jan 17 21:00:45 2006
config:
NAME        STATE     READ WRITE CKSUM
stock       ONLINE       0     0     0
c0t1d0      ONLINE       0     0     0</pre>
<p>By default, when you create a zfs-pool, all of its disk space is represented as a single filesystem with the same name. This filesystem also gets a mountpoint with the same name and is automatically mounted off /. So, after doing a <strong>zpool create</strong> (<a href="http://solaris.reys.net/2005/11/zfs_first_encounter">here</a> is my example) you can immediately start working with your newly made filesystem.</p>
<p>At the moment I&#8217;ve got only 1 additional filesystem created, I use it for Oracle 10g. So here&#8217;s how it looks:</p>
<pre>solaris# <strong>zfs list</strong>
NAME                   USED  AVAIL  REFER  MOUNTPOINT
stock                 2.40G  31.1G  8.50K  /stock
stock/oracle          2.32G   693M  2.32G  /stock/oracle</pre>
<p>According to ZFS concepts, all the newly made filesystems may use all the available disk space of the zfs-pool they belong to. So, when I create another filesystem in my <strong>stock</strong> pool, this filesystem has more than 30Gb available to it:</p>
<pre>solaris# <strong>zfs create stock/try
</strong>solaris# <strong>zfs list</strong>
NAME                   USED  AVAIL  REFER  MOUNTPOINT
stock                 2.40G  31.1G   9.5K  /stock
stock/oracle          2.32G   693M  2.32G  /stock/oracle
stock/try                8K  31.1G     8K  /stock/try</pre>
<p>To make sure that some of your filesystems don&#8217;t eat up all the available disk space, you have to limit them. And it&#8217;s very easily done so:</p>
<pre>solaris# <strong>zfs set quota=512m stock/try</strong>
solaris# <strong>zfs list</strong>
NAME                   USED  AVAIL  REFER  MOUNTPOINT
stock                 2.40G  31.1G   9.5K  /stock
stock/oracle          2.32G   693M  2.32G  /stock/oracle
stock/try                8K   512M     8K  /stock/try</pre>
<pre><span style="font-family: Georgia; line-height: 19px; white-space: normal; font-size: 13px;">As you have probably guessed, <strong>quota</strong> is the parameter name, while <strong>set</strong> is a keyword to alter parameters values. There is quite a number of ZFS filesystem parameters, and most of them you can modify, but there are also some which are read-only. Here's an example of such a parameter, and you can see what happens if you try modifying them:</span></pre>
<pre>solaris# <strong>zfs get mounted stock/try</strong>
NAME             PROPERTY       VALUE                      SOURCE
stock/try        mounted        yes                        -
solaris# <strong>zfs set mounted=on stock/try</strong>
cannot set mounted property: read-only property</pre>
<p>You can find the full list of ZFS filesystem parameters on the <a href="http://www.opensolaris.org/os/community/zfs/docs/man_zfs/">man page for zfs</a>, as for me &#8211; I&#8217;ll show you only 1 more parameter today, and a very useful one in my opinion: a mount point. As all the rest things about ZFS, this parameter is very easy to change, and you even have the filesystem automatically remounted for you:</p>
<pre>solaris# <strong>df -k | grep ^stock</strong>
stock                 35112960       8 32597478     1%    /stock
stock/oracle           3145728 2436188   709540    78%    /stock/oracle
stock/try               524288       8   524280     1%    /stock/try
solaris# <strong>zfs set mountpoint=/try stock/try</strong>
solaris# <strong>df -k | grep ^stock</strong>
stock                 35112960       8 32597478     1%    /stock
stock/oracle           3145728 2436188   709540    78%    /stock/oracle
stock/try               524288       8   524280     1%    /try</pre>
<p>I left the <strong>df</strong> output intentionally here, to show that there were no additional manipulations made to the <strong>try</strong> filesystem &#8211; it really is this easy!</p>
<p>I guess that&#8217;s enough for today &#8211; so next time I&#8217;ll tell you about few more useful ZFS filesystem parameters. Good luck with your experiments!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/solaris?a=_Z36g3yDzOA:b_05bSu2GBk:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/solaris?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/solaris?a=_Z36g3yDzOA:b_05bSu2GBk:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/solaris?d=7Q72WNTAKBA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://solaris.reys.net/zfs-managing-filesystems/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://solaris.reys.net/zfs-managing-filesystems/</feedburner:origLink></item>
		<item>
		<title>DTrace: mod_auth_pam and apache2</title>
		<link>http://feedproxy.google.com/~r/solaris/~3/B7vbieaaYr8/</link>
		<comments>http://solaris.reys.net/dtrace-mod_auth_pam-and-apache2/#comments</comments>
		<pubDate>Sat, 02 May 2009 02:48:05 +0000</pubDate>
		<dc:creator>Gleb Reys</dc:creator>
				<category><![CDATA[General Solaris topics]]></category>
		<category><![CDATA[apache2]]></category>
		<category><![CDATA[dtrace]]></category>
		<category><![CDATA[nis]]></category>
		<category><![CDATA[pam]]></category>

		<guid isPermaLink="false">http://solaris.simplyunix.com/?p=133</guid>
		<description><![CDATA[One of our users has asked me to help with PAM authentication for Apache 2 on one of our remote servers.
Note: going with mod_auth_pam was decision made without me, and I was only asked to help get the chosen solution work. This being said, the recommended way to do external authentication for Apache 2 now [...]]]></description>
			<content:encoded><![CDATA[<p>One of our users has asked me to help with <a href="http://www.sun.com/software/solaris/pam/">PAM</a> authentication for <a href="http://httpd.apache.org/">Apache 2</a> on one of our remote servers.</p>
<p style="padding-left: 30px;"><strong>Note:</strong> going with <strong>mod_auth_pam</strong> was decision made without me, and I was only asked to help get the chosen solution work. This being said, the recommended way to do external authentication for Apache 2 now is to use the <a rel="nofollow" href="http://unixpapa.com/mod_authnz_external/">mod_authz_external module</a> and <a rel="nofollow" href="http://code.google.com/p/pwauth/">pwauth password authenticator</a>.</p>
<p>It did seem like a rather trivial task &#8211; download <a rel="nofollow" href="http://pam.sourceforge.net/mod_auth_pam/">mod_auth_pam</a>, compile it for Apache 2, make sure everything works. The remote server uses NIS, I could freely log onto it.</p>
<p>And you know what? It didn&#8217;t work!</p>
<p><span id="more-133"></span>The module compiled pretty easily, but I couldn&#8217;t get it to work &#8211; error_log was reporting the same lines over and over again (I had to break the line to squeeze it into my blog format):</p>
<pre>[Tue Dec 20 16:48:44 2005] [error] [client xxx.xxx.xxx.xxx]
PAM: user 'greys' - not authenticated: No account present for user</pre>
<p>Up to this point, everything was done by the user himself with small help from me. At this stage is was decided I&#8217;d have a look myself. To make things easier, I also wanted to:</p>
<ol>
<li>Move all the experiments onto my own Solaris 10 box</li>
<li>Make it all work for local users first, and only then get NIS working as well</li>
</ol>
<p>Seeing the same errors on my box, I&#8217;ve decided to take a serious look at PAM. I&#8217;ve created Apache-related lines in <strong>/etc/pam.conf </strong>and added a debug option:</p>
<pre>httpd  auth required           pam_authtok_get.so.1 debug
httpd  auth required           pam_unix_auth.so.1 debug</pre>
<p>To make it more convenient to track all the messages, I&#8217;ve updated <strong>/etc/syslog.conf </strong>to include the following:</p>
<pre>auth.debug                      /var/log/auth_log
user.debug                      /var/log/user_log</pre>
<p>It got easier to see what was happening, at least I knew it was the <strong>/etc/pam.conf </strong>section I was thinking of. But the error was still there &#8211; my user definitely did exist in the system, only it wouldn&#8217;t be recognized by Apache (and I&#8217;ve broken the lines yet again here):</p>
<pre>Dec 21 09:47:35 pele httpd[29143]: [ID 634615 user.debug]
pam_authtok_get:pam_sm_authenticate: flags = 1
Dec 21 09:47:35 pele httpd[29143]: [ID 378613 user.debug]
pam_dhkeys: user greys not found
Dec 21 09:47:35 pele httpd[29143]: [ID 896952 user.debug]
pam_unix_auth: entering pam_sm_authenticate()
Dec 21 09:47:35 pele httpd[29143]: [ID 219349 user.debug]
pam_unix_auth: user greys not found</pre>
<p>It was the right time to look at how exactly PAM and Apache 2 interacted when I was giving the username and password trying to access my page. I immediately thought of Brendan Gregg&#8217;s <a href="http://www.brendangregg.com/DTrace/opensnoop">OpenSnoop</a> script for DTrace. And it was this script indeed which helped me see the problem:</p>
<pre>60001 24744 httpd         -1   2 /etc/pam_debug
60001 24744 httpd         11   0 /etc/pam.conf
60001 24744 httpd         11   0 /usr/lib/security/pam_authtok_get.so.1
60001 24744 httpd         11   0 /usr/lib/passwdutil.so.1
60001 24744 httpd         11   0 /usr/lib/libsldap.so.1
60001 24744 httpd         11   0 /usr/lib/security/pam_dhkeys.so.1
60001 24744 httpd         11   0 /usr/lib/security/pam_unix_cred.so.1
60001 24744 httpd         11   0 /lib/libbsm.so.1
60001 24744 httpd         11   0 /lib/libsecdb.so.1
60001 24744 httpd         11   0 /usr/lib/libproject.so.1
60001 24744 httpd         11   0 /lib/libproc.so.1
60001 24744 httpd         11   0 /lib/librtld_db.so.1
60001 24744 httpd         11   0 /lib/libelf.so.1
60001 24744 httpd         11   0 /lib/libctf.so.1
60001 24744 httpd         11   0 /usr/lib/security/pam_unix_auth.so.1
60001 24744 httpd         -1   2 /var/run/syslog_door
60001 24744 httpd         -1  13 /etc/shadow
60001 24744 httpd         11   0 /var/run/name_service_door
60001 24744 httpd         11   0 /etc/passwd
60001 24744 httpd         -1  13 /etc/shadow
60001 24744 httpd         -1   2 /var/run/syslog_door
<span style="font-family: Verdana; line-height: normal; white-space: normal; font-size: 10px;">
</span></pre>
<p><span style="font-family: Verdana; line-height: normal; white-space: normal; font-size: 10px;">Apparently, httpd could not open /etc/shadow (-1 means error), obviously becase of permissions for the file. But just to make sure, I&#8217;ve looked for the error code (it&#8217;s 13 as you can see):</span></p>
<pre>solaris# <strong>grep 13 /usr/include/sys/errno.h</strong>
#define EACCES  13      /* Permission denied                    */</pre>
<p>So it all was suddenly clear, and I&#8217;ve proceeded like this:</p>
<pre>solaris# <strong>groupadd shadows</strong>
solaris# <strong>chown root:shadows /etc/shadow</strong>
solaris# <strong>chmod 440 /etc/shadow</strong></pre>
<p>All that&#8217;s left to be done now was to make sure <strong>httpd.conf</strong> has a <strong>Group </strong>parameter set to this <strong>shadows </strong>group, and not <strong>nobody</strong>.</p>
<p>pS: you might ask why didn&#8217;t it work for NIS on the remote server in first place. This is because <strong>/etc/nsswitch.conf</strong> had not this:</p>
<pre>passwd: files nis</pre>
<p>but this:</p>
<pre>passwd: compat</pre>
<p>so NIS maps were consulted, but only based on + and &#8211; specifications in <strong>/etc/passwd</strong> and <strong>/etc/shadow</strong> files. This means we still needed to be able to read <strong>/etc/shadow</strong>, even though later <strong>PAM </strong>would consult <strong>NIS</strong>.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/solaris?a=B7vbieaaYr8:vicisEsB_48:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/solaris?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/solaris?a=B7vbieaaYr8:vicisEsB_48:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/solaris?d=7Q72WNTAKBA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://solaris.reys.net/dtrace-mod_auth_pam-and-apache2/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://solaris.reys.net/dtrace-mod_auth_pam-and-apache2/</feedburner:origLink></item>
		<item>
		<title>Debugging PHP with DTrace, part 2</title>
		<link>http://feedproxy.google.com/~r/solaris/~3/mV_e3SZm2XQ/</link>
		<comments>http://solaris.reys.net/debugging-php-with-dtrace-part-2/#comments</comments>
		<pubDate>Sat, 02 May 2009 02:47:25 +0000</pubDate>
		<dc:creator>Gleb Reys</dc:creator>
				<category><![CDATA[General Solaris topics]]></category>
		<category><![CDATA[dtrace]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://solaris.simplyunix.com/?p=131</guid>
		<description><![CDATA[Your next step in observing PHP with DTrace could easily be the following script. It times how much time (in nanoseconds) each Apache process has spent running a particular PHP function.
This script generates a table of Apache PIDs and PHP scripts started within, and later you&#8217;ll get a table of all the functions with PIDs [...]]]></description>
			<content:encoded><![CDATA[<p>Your next step in observing PHP with DTrace could easily be the following script. It times how much time (in nanoseconds) each Apache process has spent running a particular PHP function.</p>
<p>This script generates a table of Apache PIDs and PHP scripts started within, and later you&#8217;ll get a table of all the functions with PIDs which ran them and the time spent.</p>
<p><span id="more-131"></span>You can download this script here: <strong><a href="http://solaris.reys.net/scripts/php-scripts-timer.d">php-scripts-timer.d</a></strong></p>
<pre>#!/usr/sbin/dtrace -s
#pragma D option quiet
BEGIN
{
printf("php scripts timer startedn");
}
:dtrace.so::function-entry
/ copyinstr(arg0) == "" &amp;&amp; name[pid,copyinstr(arg1)] != 1 /
{
printf("%d -&gt; %-30sn", pid, copyinstr(arg1));
name[pid,copyinstr(arg1)] = 1;
}
:dtrace.so::function-entry
/ copyinstr(arg0) != "" /
{
self-&gt;ts = timestamp;
}
:dtrace.so::function-return
/ copyinstr(arg0) != "" /
{
self-&gt;elapsed = timestamp - self-&gt;ts;
@time[pid, copyinstr(arg0)] = sum(self-&gt;elapsed);
}
END
{
printf("&lt;------ php scripts timer finished");
printf("n%10s %40s %14sn", "PID", "PHP function", "Time elapsed");
printa("%10d %40s %14@un", @time);
}</pre>
<p>A typical result of running this script while opening some PHP pages served by your Apache will look like this:</p>
<pre>php scripts timer started
223074 -&gt; /export/www/nightly/pma/left.php
223071 -&gt; /export/www/nightly/pma/main.php
223074 -&gt; /export/www/nightly/pma/css/phpmyadmin.css.php
223071 -&gt; /export/www/nightly/pma/css/phpmyadmin.css.php
&lt;------ php scripts timer finished
PID                             PHP function   Time elapsed
223074                             ob_get_level          22280
223074                              get_cfg_var          32678</pre>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/solaris?a=mV_e3SZm2XQ:FUZdLNOQV7w:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/solaris?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/solaris?a=mV_e3SZm2XQ:FUZdLNOQV7w:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/solaris?d=7Q72WNTAKBA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://solaris.reys.net/debugging-php-with-dtrace-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://solaris.reys.net/debugging-php-with-dtrace-part-2/</feedburner:origLink></item>
		<item>
		<title>Basic ZFS example</title>
		<link>http://feedproxy.google.com/~r/solaris/~3/LDWhn9qDBKc/</link>
		<comments>http://solaris.reys.net/basic-zfs-example/#comments</comments>
		<pubDate>Sat, 02 May 2009 02:46:52 +0000</pubDate>
		<dc:creator>Gleb Reys</dc:creator>
				<category><![CDATA[General Solaris topics]]></category>
		<category><![CDATA[zfs]]></category>

		<guid isPermaLink="false">http://solaris.simplyunix.com/?p=129</guid>
		<description><![CDATA[I just couldn&#8217;t wait any longer, and decided to try something with ZFS. And what do you know? I&#8217;ve found a very useful advice from Ben Rockwood, which allows us use regular files created with mkfile as virtual disks for ZFS. VERY useful, especially when you really want to play with such a great technology [...]]]></description>
			<content:encoded><![CDATA[<p>I just couldn&#8217;t wait any longer, and decided to try something with ZFS. And what do you know? I&#8217;ve found a very useful advice from <a title="http://cuddletech.com/blog/index.php" href="http://cuddletech.com/blog/index.php">Ben Rockwood</a>, which allows us use regular files created with mkfile as virtual disks for ZFS. VERY useful, especially when you really want to play with such a great technology and maybe try various configurations, but there are no spare physical disks for such experiments.</p>
<p>I will, of course, read and understand all the inner workings of ZFS later, but the first impression of it is this &#8211; too easy to be true! <img src='http://solaris.reys.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><span id="more-129"></span>Here&#8217;s what I did:</p>
<pre>solaris# <strong>mkdir /export/vdev</strong>
solaris# <strong>mkfile 128m /export/vdev/d1</strong>
solaris# <strong>mkfile 128m /export/vdev/d2</strong>
solaris# <strong>zpool create try /export/vdev/d1 /export/vdev/d2</strong>
solaris# <strong>zpool status</strong>
pool: try
state: ONLINE
scrub: none requested
config:
NAME               STATE     READ WRITE CKSUM
try                ONLINE       0     0     0
/export/vdev/d1  ONLINE       0     0     0
/export/vdev/d2  ONLINE       0     0     0
solaris# <strong>zpool list</strong>
NAME                    SIZE    USED   AVAIL    CAP  HEALTH     ALTROOT
try                     246M   32,5K    246M     0%  ONLINE     -</pre>
<p>After this the newly made filesystem automatically became available (it&#8217;s a partial output of <strong>df -k</strong>):</p>
<pre>Filesystem            kbytes    used   avail capacity  Mounted on
try                   235520    3722  231771     2%    /try</pre>
<p>Enough for the moment! Now the next challenge will be freeing up one of the two physical disks I&#8217;ve got in my Netra t1, so that I could bring it under ZFS control.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/solaris?a=LDWhn9qDBKc:ubybaR2NpOQ:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/solaris?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/solaris?a=LDWhn9qDBKc:ubybaR2NpOQ:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/solaris?d=7Q72WNTAKBA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://solaris.reys.net/basic-zfs-example/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://solaris.reys.net/basic-zfs-example/</feedburner:origLink></item>
		<item>
		<title>Passing command line parameters to DTrace scripts</title>
		<link>http://feedproxy.google.com/~r/solaris/~3/kju34i_tXt4/</link>
		<comments>http://solaris.reys.net/passing-command-line-parameters-to-dtrace-scripts/#comments</comments>
		<pubDate>Sat, 02 May 2009 02:44:57 +0000</pubDate>
		<dc:creator>Gleb Reys</dc:creator>
				<category><![CDATA[General Solaris topics]]></category>
		<category><![CDATA[dtrace]]></category>

		<guid isPermaLink="false">http://solaris.simplyunix.com/?p=125</guid>
		<description><![CDATA[When you&#8217;re writing a DTrace script, often you&#8217;d like to pass some parameter in command line. Such an easy task might be really hard unless you read a docs.sun.com section about DTrace scripting, particularly a section about command line parameters macros.
As with sh or bash, you can access command line parameters via $0..$9 macroses. But [...]]]></description>
			<content:encoded><![CDATA[<p>When you&#8217;re writing a DTrace script, often you&#8217;d like to pass some parameter in command line. Such an easy task might be really hard unless you read a <a href="http://docs.sun.com">docs.sun.com</a> section <a href="http://docs.sfbay/app/docs/doc/817-6223/6mlkidlim?a=view">about DTrace scripting</a>, particularly a section about <a href="http://docs.sfbay/app/docs/doc/817-6223/6mlkidliq?a=view">command line parameters macros</a>.</p>
<p>As with sh or bash, you can access command line parameters via $0..$9 macroses. But there&#8217;s a catch. Values of these macroses should match a certain definition &#8211; a number, an identifier or a string. If there isn&#8217;t a match here, you&#8217;ll get an error.</p>
<p>Let&#8217;s start with a simple script.<span id="more-125"></span></p>
<pre>#pragma D option quiet
BEGIN {
#!/usr/sbin/dtrace -s
printf("Your parameter: %dn", $1);
}</pre>
<p>If you pass a number as a command line parameter, there will be no error, and you&#8217;ll get this message:</p>
<pre>Your parameter: 123</pre>
<p>But if you pass a string instead of number, here&#8217;s the error you&#8217;ll get:</p>
<pre>solaris# <strong>./args.d a1b2c3</strong>
dtrace: failed to compile script ./args.d: line 9: failed to resolve a1b2c3: Unknown variable name</pre>
<p>This happens because DTrace tries to find an identifier &#8220;a1b2c3&#8243;. Why does this happen? Because of the way DTrace tries to recognize the type of a command line parameter. The parameter doesn&#8217;t look like a number, but to make DTrace accept the value as a string, you have to specify it in quotes. Without them, DTrace accepts we&#8217;ve passed an identifier name. And since there isn&#8217;t one with such a name, we get an error.</p>
<p>To prove this theory, you simply have to create a variable with the same name in your script:</p>
<pre>#!/usr/sbin/dtrace -s
#pragma D option quiet
BEGIN {
a1b2c3=1979;
printf("Your parameter: %dn", $1);
}</pre>
<p>There you go &#8211; it works just like I said:</p>
<pre>Your parameter: 1979</pre>
<p>And if your parameter is definitely a string, you have to change your script (the line with printf, so that it has %s for a string, and not %d for an integer, otherwise you&#8217;ll get another error)&#8230;</p>
<pre>#!/usr/sbin/dtrace -s
#pragma D option quiet
BEGIN {
a1b2c3=1979;
printf("Your parameter: %sn", $1);
}
...</pre>
<p>and also put your parameter in quotes, like this:</p>
<pre>solaris# <strong>./args.d '"a1b2c3"'</strong>
Your parameter: a1b2c3</pre>
<p>As you can see, we&#8217;re getting a string we passed, and not the variable with the same name, which was left in the script intentionally to demonstrate it&#8217;s not used anymore.</p>
<p>And finally, one more thing. If you want all your command line parameters to be treated as strings by default and even leave the quotes around parameters out, all you have to do is to access the macroses for your parameters with a double $ sign, and then the parameter type definition will be skipped:</p>
<pre>#!/usr/sbin/dtrace -s
#pragma D option quiet
BEGIN {
a1b2c3=1979;
printf("Your parameter: %sn", $$1);
}</pre>
<p>And here&#8217;s how you&#8217;d access such a script with the same parameter we&#8217;ve used before:</p>
<pre>solaris# <strong>./args.d a1b2c3</strong>
Your parameter: a1b2c3</pre>
<p>That&#8217;s it for today! Good luck with your DTrace scripts!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/solaris?a=kju34i_tXt4:iUxP_BoKbxs:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/solaris?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/solaris?a=kju34i_tXt4:iUxP_BoKbxs:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/solaris?d=7Q72WNTAKBA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://solaris.reys.net/passing-command-line-parameters-to-dtrace-scripts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://solaris.reys.net/passing-command-line-parameters-to-dtrace-scripts/</feedburner:origLink></item>
		<item>
		<title>Solaris 10 zones: part one – a working example</title>
		<link>http://feedproxy.google.com/~r/solaris/~3/6gC2RLat1q0/</link>
		<comments>http://solaris.reys.net/solaris-10-zones-part-one-a-working-example/#comments</comments>
		<pubDate>Sat, 02 May 2009 02:44:17 +0000</pubDate>
		<dc:creator>Gleb Reys</dc:creator>
				<category><![CDATA[General Solaris topics]]></category>
		<category><![CDATA[solaris zones]]></category>

		<guid isPermaLink="false">http://solaris.simplyunix.com/?p=123</guid>
		<description><![CDATA[Many of you have already heard about Solaris 10 zones &#8211; it&#8217;s a virtualization technology which allows you to create isolated and secure environments for running applications. For end-users these environments look just like separate abstract machines with Solaris 10 installed on them. Inside each zone, all the processes don&#8217;t see anything happening in all [...]]]></description>
			<content:encoded><![CDATA[<p>Many of you have already heard about Solaris 10 zones &#8211; it&#8217;s a virtualization technology which allows you to create isolated and secure environments for running applications. For end-users these environments look just like separate abstract machines with Solaris 10 installed on them. Inside each zone, all the processes don&#8217;t see anything happening in all the other zones on a system. Isolation is done on such a level that processes of one zone can&#8217;t see or affect processes of any other zone.</p>
<p>All of this is done on a software level, and by default every Solaris 10 machine has a global zone &#8211; only from this zone you can view processes of all the rest zones on your system. You probably didn&#8217;t even notice, but upon the completion of your Solaris 10 install, you&#8217;re immediately put into the global zone. It&#8217;s very easy to see this zone:</p>
<pre>solaris# <strong>zoneadm list -vc</strong>
ID NAME             STATUS         PATH
0 global           running        /</pre>
<p><span id="more-123"></span>To create a non-global zone, just plan some hard drive space for it, and work away! You&#8217;re going to need a zonecfg command. You must specify a zone name as a command line parameter:</p>
<pre>solaris# <strong>zonecfg -z zone3</strong></pre>
<p>If the zone specified doesn&#8217;t exist, you&#8217;ll see a message about it, and zonecfg will put you into it&#8217;s command interface, where you can manage or create zones. Type the following (line by line):</p>
<pre>solaris# <strong>zonecfg -z zone3
<span style="font-weight: normal;">zone3: No such zone configured
Use 'create' to begin configuring a new zone.
zonecfg:zone3&gt; <strong>create</strong>
zonecfg:zone3&gt; <strong>set zonepath=/sr/zones/3</strong>
zonecfg:zone3&gt; <strong>set autoboot=false</strong>
zonecfg:zone3&gt; <strong>add net</strong>
zonecfg:zone3:net&gt; <strong>set address=192.168.0.7</strong>
zonecfg:zone3:net&gt; <strong>set physical=bge0</strong>
zonecfg:zone3:net&gt; <strong>end</strong>
zonecfg:zone3&gt; <strong>verify</strong>
zonecfg:zone3&gt; </span>exit</strong></pre>
<p>This set of commands will create you a simple zone. There aren&#8217;t that many parameters initially, as you can see:</p>
<ul>
<li><strong>zonepath</strong> is the full path to the directory where the specified zone&#8217;s files will reside</li>
<li><strong>autoboot</strong> is a flag used to determine whether a non-global zone should be automatically booted up every time your actual system (with your global zone) boots.</li>
</ul>
<p>Further on, we&#8217;re assigning one network interface to our zone, and give it an IP address. You should specify the name of the real network interface present in your global zone. For the zone you&#8217;re creating, zonecfg will have a virtual interface based off the real one you specify.</p>
<p>Now it&#8217;s time to verify your config &#8211; this command makes sure all the necessary parameters have got their values set. After this, we&#8217;re done.</p>
<p>Now, if you look at the list of your zones again, you&#8217;re going to see a newly created zone as well:</p>
<pre>solaris# <strong>zoneadm list -vc
<span style="font-weight: normal;">ID NAME             STATUS         PATH
0 global           running        /
- zone3            configured     /sr/zones/3</span></strong></pre>
<p>Right now our zone is in a &#8220;configured&#8221; state &#8211; it can&#8217;t be used until we install OS onto it and it gets its unique ID. Obviously, you won&#8217;t be able to boot your zone unless it has installed OS.</p>
<p>Here&#8217;s a list of the states a non-global zone can be in:</p>
<ul>
<li><strong>configured</strong> &#8211; our zone is configured, but it&#8217;s yet to have its initial boot</li>
<li><strong>incomplete</strong> &#8211; zoneadm command sets a zone&#8217;s state to this value while installing and uninstalling a zone. When the operation is completed, zone&#8217;s status is changed.</li>
<li><strong>installed</strong> &#8211; zone is fully configured, OS packages have been installed. It&#8217;s a ready-to-use zone, all you have to do is to boot it. The zone has no virtual platform associated yet.</li>
<li><strong>ready</strong> &#8211; the zone is ready. It already has a virtual platform established, the kernel has created a zsched process, all the network interfaces are plumbed, devices are configured and file systems are mounted. No processes have been started yet, but since the zone is ready it already has a unique ID assigned to it. We normally don&#8217;t see a zone in this state, and it always moves one to the next one &#8211; running.</li>
<li><strong>running</strong> &#8211; the zone is up and running. You can connect to the zone. It&#8217;s a fully working environment now.</li>
<li><strong>shutting down</strong> and <strong>down</strong> are short-term states which are shown when the zone is being halted. Upon completion of halt, the zone gets back into installed state.</li>
</ul>
<p>Now, it&#8217;s time to continue configuring our zone. We should install it. It is done with the following command:</p>
<pre>solaris# <strong>zoneadm -z zone3 install</strong></pre>
<p>After this you can watch the process of packages installation for your zone, and when all the packages are installed, you&#8217;ll get the location of the OS installation log file. That&#8217;s it! Our zone is ready, and you can boot it:</p>
<pre>solaris# <strong>zoneadm -z zone3 boot</strong></pre>
<p>Wonderful. But we still can&#8217;t log in&#8230; Why? Because we&#8217;ve yet to configure the OS inside our zone &#8211; just like we would configure any box we&#8217;ve just installed with Solaris. As you&#8217;ve noticed, the order of OS installation is slightly different &#8211; in real life you have to configure the box first, and then you get to watch all the packages installing on it, with zones it&#8217;s the other way around &#8211; first copy all the stuff, then configure the OS.</p>
<p>What we need now is connect to the zone&#8217;s console and answer all the standard Configuration Assistant&#8217;s questions, one of them is the root password. After this, your zone will want to reboot, and you&#8217;ll be able to log in as root on your console. If you want to allow remote root logins, you&#8217;ll obviously need to add theCONSOLE=/dev/console line to /etc/default/login.</p>
<p>To reach a zone&#8217;s console, you should use <strong>zlogin </strong>command, -C means &#8220;console&#8221;:</p>
<pre>solaris# <strong>zlogin -C zone3</strong></pre>
<p>You can disconnect from the console using the standard combination: &#8220;~.&#8221; (tilda dot)</p>
<p>One more thing. Since non-global zones will share the physical network interface with your global zone &#8211; you&#8217;ve got to make sure your system (your global zone) can see your non-global zones networks.</p>
<p>For instance, here&#8217;s the ifconfig -a from my laptop:</p>
<pre>bge0:1: flags=1000843&lt;UP,BROADCAST,RUNNING,MULTICAST,IPv4&gt; mtu 1500 index 2
zone zone2
inet 192.168.0.6 netmask ffffff00 broadcast 192.168.0.255
bge0:2: flags=1000843&lt;UP,BROADCAST,RUNNING,MULTICAST,IPv4&gt; mtu 1500 index 2
inet 192.168.0.2 netmask ffffff00 broadcast 192.168.0.255
bge0:3: flags=1000843&lt;UP,BROADCAST,RUNNING,MULTICAST,IPv4&gt; mtu 1500 index 2
zone zone1
inet 192.168.0.5 netmask ffffff00 broadcast 192.168.0.255</pre>
<p>As you can see, interfaces assigned to zones are marked with the &#8220;zone&#8221; parameter. I had to create a virtual interface (bge0:2) from the same subnet as the IPs of my zones. This way, I can ping interfaces assigned to each of the zones configured.</p>
<p>One more thing I wanted to mention: software packages, installed in a zone. Most curious of you have probably looked inside the installation log file, and noticed, that most of the standard Solaris 10 packages have been installed in our zone. At the same time, the directory with our zone&#8217;s files takes up roughly 70mb&#8230;</p>
<p>Such an incostistancy is explained by one of the key features of the zones virtualization: non-global zones can easily share files with the global zone. Thus, you can specify for each zone, that some files (packages), when required by the installer, should not be actually copied and installed, but just borrowed from the global zone &#8211; every time you&#8217;ll want to access some of these files in your non-global zone, they&#8217;ll be taken from the ones in your actual system &#8211; from your global zone.</p>
<p>Obviously, all the files inherited in such a way by non-global zone, will be read-only.This technique allows you save lots of space, and by default all the files from /lib, /platform, /usr and /sbin directories are shared with the global zone. It is important to undestand that this happens only to the standard packages. So, if you&#8217;ve added some files of yours in the abovenamed directories, they will obviously NOT be shared with non-global zones.</p>
<p>Well, I guess it&#8217;s enough for the part one of my notes on Solaris zones &#8211; with any luck you should now have a working zone which you can access remotely &#8211; log in, manage services, do whatever you want.</p>
<p>I&#8217;ll add more stuff whenever I have a minute to spare&#8230;.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/solaris?a=6gC2RLat1q0:dtfMb7HmnLI:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/solaris?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/solaris?a=6gC2RLat1q0:dtfMb7HmnLI:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/solaris?d=7Q72WNTAKBA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://solaris.reys.net/solaris-10-zones-part-one-a-working-example/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<feedburner:origLink>http://solaris.reys.net/solaris-10-zones-part-one-a-working-example/</feedburner:origLink></item>
		<item>
		<title>inetadm – changing service properties</title>
		<link>http://feedproxy.google.com/~r/solaris/~3/TiBSManIONs/</link>
		<comments>http://solaris.reys.net/inetadm-changing-service-properties/#comments</comments>
		<pubDate>Sat, 02 May 2009 02:43:40 +0000</pubDate>
		<dc:creator>Gleb Reys</dc:creator>
				<category><![CDATA[Useful Solaris commands]]></category>
		<category><![CDATA[inetadm]]></category>

		<guid isPermaLink="false">http://solaris.simplyunix.com/?p=121</guid>
		<description><![CDATA[Today I&#8217;ve met a problem which I easily solved with the help of inetadm, and here&#8217;s the entry explaining what happened.
When trying to FTP some files off my laptop, I&#8217;ve noticed FTP client failing to parse the ls -l output due to Russian weekdays used in listing. It was obvious that such FTP daemon behavior [...]]]></description>
			<content:encoded><![CDATA[<p>Today I&#8217;ve met a problem which I easily solved with the help of <strong>inetadm</strong>, and here&#8217;s the entry explaining what happened.</p>
<p>When trying to FTP some files off my laptop, I&#8217;ve noticed FTP client failing to parse the <strong>ls -l</strong> output due to Russian weekdays used in listing. It was obvious that such FTP daemon behavior was due to one of its options, which specifically made sure the daemon inherited all the environment variables. Luckily such a behavior was easy to change with <strong>inetadm</strong>:</p>
<p><span id="more-121"></span>To list all the options of a given service, use a command similar to this:</p>
<pre>solaris# <strong>inetadm -l svc:/network/ftp:default</strong>
SCOPE    NAME=VALUE
name="ftp"
endpoint_type="stream"
proto="tcp6"
isrpc=FALSE
wait=FALSE
exec="/usr/sbin/in.ftpd -a"
user="root"
default  bind_addr=""
default  bind_fail_max=-1
default  bind_fail_interval=-1
default  max_con_rate=-1
default  max_copies=-1
default  con_rate_offline=-1
default  failrate_cnt=40
default  failrate_interval=60
default  inherit_env=TRUE
default  tcp_trace=FALSE
default  tcp_wrappers=FALSE</pre>
<p>As you can see, there was an inherit_env variable, set to TRUE by default. All I had to do was to switch it off:</p>
<pre>solaris# <strong>inetadm -m svc:/network/ftp:default inherit_env=FALSE</strong></pre>
<p>After this FTP daemon has stopped inheriting environment variables, and, accordingly, switched to using C (English) locale for displaying weekdays in ls listings.</p>
<p>Using similar command line, you can alter any options of any service which is under inetadm control.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/solaris?a=TiBSManIONs:kmgNe0I0akQ:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/solaris?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/solaris?a=TiBSManIONs:kmgNe0I0akQ:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/solaris?d=7Q72WNTAKBA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://solaris.reys.net/inetadm-changing-service-properties/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://solaris.reys.net/inetadm-changing-service-properties/</feedburner:origLink></item>
		<item>
		<title>DTrace: Aggregations</title>
		<link>http://feedproxy.google.com/~r/solaris/~3/-6fBEwfQ3UM/</link>
		<comments>http://solaris.reys.net/dtrace-aggregations/#comments</comments>
		<pubDate>Sat, 02 May 2009 02:42:08 +0000</pubDate>
		<dc:creator>Gleb Reys</dc:creator>
				<category><![CDATA[General Solaris topics]]></category>
		<category><![CDATA[dtrace]]></category>

		<guid isPermaLink="false">http://solaris.simplyunix.com/?p=118</guid>
		<description><![CDATA[Quite often it is more important for you to see the whole picture, rather than to know each case when a particular probe fires. For instance, observing a process which consumes a lot of CPU time according to prstat, we ask ourselves: what is this process doing? And often we think about the overall number [...]]]></description>
			<content:encoded><![CDATA[<p>Quite often it is more important for you to see the whole picture, rather than to know each case when a particular probe fires. For instance, observing a process which consumes a lot of CPU time according to <a href="http://docs.sun.com/app/docs/doc/816-5166/6mbb1kqc9?q=prstat&amp;a=view">prstat</a>, we ask ourselves: what is this process doing? And often we think about the overall number of system calls executed by this process, and not every particular one of these system calls.</p>
<p><strong>DTrace aggregations</strong> are created specifically for answering such questions. Working with sets of numerical data, aggregation functions help us to easily determing average, min and max values of data sets, count numbers and sums of elements in these data sets, and even build frequency distributions.</p>
<p><span id="more-118"></span>More information can be found <a href="http://docs.sun.com/app/docs/doc/817-6223/6mlkidlh7?q=target&amp;a=view">here</a>, but today I&#8217;ll show only few examples of using aggregations.</p>
<p>DTrace stores the results of aggregation functions in objects called <strong><em>aggregations</em></strong>.<br />
The syntax is:</p>
<pre>@name[ keys ] = aggfunc ( args );</pre>
<p>here&#8217;s what this line means:</p>
<ul>
<li><strong>name</strong> &#8211; name of our aggregation</li>
<li><strong>keys</strong> &#8211; index keys, very similar to those of associative arrays.</li>
<li><strong>aggfunc</strong> &#8211; aggregation function</li>
<li><strong>args</strong> &#8211; function arguments, usually it&#8217;s a set of numerical data</li>
</ul>
<p>Today I&#8217;ll use sum aggregation function, which as it&#8217;s obvious from the name, helps us calculate the sum of a numerical data set,</p>
<p>Only the current value of the aggregation function is stored in the memory, it&#8217;s calculated off the previous function argument values. Then the function is calculated for the current value of the argument, and this result is applied to the current aggregation value.</p>
<p>For basic analysis you can use as few aggregations keys as you can &#8211; for instance, use only PID, without specifying thread ID as another index key.You can even use execname &#8211; but keep in mind that there might be more than one process running on your system with the same name. Still, execname-based aggregation will be quite useful to track what&#8217;s getting most of our system&#8217;s attention:</p>
<p>Here&#8217;s our script:</p>
<pre>#!/usr/sbin/dtrace -s
#pragma D option quiet
syscall:::entry
{
self-&gt;ts=timestamp;
}
syscall:::return
{
self-&gt;elapsed = timestamp - self-&gt;ts;
@time[execname]=sum(self-&gt;elapsed);
}
END
{
printf("n%20s %20sn","Execname", "Time elapsed");
printa("%20s %20@un", @time);
}</pre>
<p>Save it into a file, do chmod a+x on this file and start it. You&#8217;ll get an output similar to this:</p>
<pre>Execname               Time elapsed
xscreensaver                   5710
gnome-smproxy                  6886
wnck-applet                    7735
gnome-panel                   52032
metacity                      54430
gnome-settings-d              60419
vim                           66452
mixer_applet2             670078802
gnome-netstatus-          819836799
nautilus                  900025830
Xorg                     1074783431
gnome-terminal           1074816530
firefox-bin              2000076871
dtrace                9843796821648</pre>
<p>The time in the last column is given in nanoseconds, so don&#8217;t be scared with such huge numbers <img src='http://solaris.reys.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  For timing some actions in your script timestamp proves to be VERY useful. It&#8217;s a nanoseconds counter which increments from an arbitrary point, so it can be used for relative computations only.</p>
<p>Now you can look at the output and notice how much of unnecessary actions is happening on my laptop with started Gnome <img src='http://solaris.reys.net/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>If you want a deeper analysis, you can make our script a bit more complex, and you&#8217;ll get a powerful tool for determining what process was doing what on our system, and for how long.</p>
<pre>#!/usr/sbin/dtrace -s
#pragma D option quiet
syscall:::entry
{
self-&gt;ts=timestamp;
}
syscall:::return
{
self-&gt;elapsed = timestamp - self-&gt;ts;
@time[execname,probefunc,pid,tid]=sum(self-&gt;elapsed);
}
END
{
printf("n%20s %20s %8s %7s %20sn",
"Execname", "Syscall", "Process", "Thread", "Time elapsed");
printa("%20s %20s %8d %7d %20@un", @time);
}</pre>
<p>If you save this code into syscalls.d and start the script, you&#8217;ll probably get something similar (I&#8217;ve deleted lots of lines to save up some space):</p>
<pre>Execname              Syscall  Process  Thread         Time elapsed
gnome-terminal           read     7199       1                12867
Xorg                     read     6953       1                13769
dtrace                    brk     7331       1                33647
dtrace               schedctl     7331       1                39320
gnome-terminal          write     7199       1                48052
Xorg                   writev     6953       1                57112
gnome-terminal        pollsys     7199       1               646816
dtrace               lwp_park     7331       1             44817217
Xorg                  pollsys     6953       1             46936244
dtrace                  ioctl     7331       1        9269224066655</pre>
<p>If you leave such a script running for a couple of minutes, you&#8217;ll get a very long output with the list of every process running on your system all the system calls it&#8217;s been executing, with the time spent by each thread of each process.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/solaris?a=-6fBEwfQ3UM:in7rbA8kM8I:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/solaris?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/solaris?a=-6fBEwfQ3UM:in7rbA8kM8I:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/solaris?d=7Q72WNTAKBA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://solaris.reys.net/dtrace-aggregations/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://solaris.reys.net/dtrace-aggregations/</feedburner:origLink></item>
		<item>
		<title>DTrace: $target macro  variable</title>
		<link>http://feedproxy.google.com/~r/solaris/~3/EIjn4VEiWVQ/</link>
		<comments>http://solaris.reys.net/dtrace-target-macro-variable/#comments</comments>
		<pubDate>Sat, 02 May 2009 02:41:37 +0000</pubDate>
		<dc:creator>Gleb Reys</dc:creator>
				<category><![CDATA[General Solaris topics]]></category>
		<category><![CDATA[dtrace]]></category>

		<guid isPermaLink="false">http://solaris.simplyunix.com/?p=116</guid>
		<description><![CDATA[Macro variables are meant to make your life MUCH easier when scripting with DTrace. Names of such variables must begin with a $ sign, and DTrace will automatically replace all the macro variables with the appropriate values when parsing your script.
Full list of macro variables can be found here, I will only talk about $target [...]]]></description>
			<content:encoded><![CDATA[<p>Macro variables are meant to make your life MUCH easier when scripting with DTrace. Names of such variables must begin with a $ sign, and DTrace will automatically replace all the macro variables with the appropriate values when parsing your script.</p>
<p>Full list of macro variables can be found <a href="http://docs.sun.com/app/docs/doc/817-6223/6mlkidlim?q=target&amp;a=view#chp-script-2">here</a>, I will only talk about <strong>$targe</strong>t variable this time.</p>
<p><strong>$target</strong> specifies the PID of the process you associate with your DTrace script.</p>
<p><span id="more-116"></span>DTrace has two useful command line options which can be used not only when running a <a href="http://docs.sun.com/app/docs/doc/816-5166/6mbb1kq12?q=dtrace&amp;a=view">dtrace</a> command, but also when running DTrace-scripts:</p>
<pre>solaris# <strong>./script.d -c xterm</strong></pre>
<p>This command asks DTrace to run a command which follows the -c option, and process the actual script.d only after this. Our macro variable, $target, will containt a PID of the started command we specified &#8211; xterm in this example.</p>
<pre>solaris# .<strong>/script.d -p 654</strong></pre>
<p>This is a similar way of running a DTrace script, only we notify DTrace that we&#8217;d like to work with the process with PID of 654. This way of using DTrace is especially useful as you don&#8217;t have to start or restart an already running process. <strong>$target</strong> will contain the PID specified in the command line &#8211; 654 in this example.</p>
<p><strong>$target</strong> may be used like this:</p>
<pre>#!/usr/sbin/dtrace -s
#pragma D option quiet
syscall:::entry, syscall:::return
/pid == $target/
{
printf("%d/%d: %s:%sn", pid, tid, probefunc, probename);
}</pre>
<p>If you execute this script, you&#8217;ll probably get an output like this:</p>
<pre>solaris# <strong>./script.d -c xterm</strong>
26525/1: munmap:entry
26525/1: munmap:return
26525/1: mmap:entry
26525/1: mmap:return
26525/1: setcontext:entry
26525/1: setcontext:return
26525/1: getrlimit:entry
26525/1: getrlimit:return
26525/1: getpid:entry
26525/1: getpid:return
...</pre>
<p>Just a little bit later I&#8217;ll talk about aggregations &#8211; yet another one of the wonderful DTrace features, and then I&#8217;ll be able to give you more interesting and useful examples of DTrace scripting.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/solaris?a=EIjn4VEiWVQ:N15I95thdBU:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/solaris?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/solaris?a=EIjn4VEiWVQ:N15I95thdBU:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/solaris?d=7Q72WNTAKBA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://solaris.reys.net/dtrace-target-macro-variable/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://solaris.reys.net/dtrace-target-macro-variable/</feedburner:origLink></item>
		<item>
		<title>DTrace options: flowindent</title>
		<link>http://feedproxy.google.com/~r/solaris/~3/0VEeqh3ydmk/</link>
		<comments>http://solaris.reys.net/dtrace-options-flowindent/#comments</comments>
		<pubDate>Sat, 02 May 2009 02:41:08 +0000</pubDate>
		<dc:creator>Gleb Reys</dc:creator>
				<category><![CDATA[General Solaris topics]]></category>
		<category><![CDATA[dtrace]]></category>

		<guid isPermaLink="false">http://solaris.simplyunix.com/?p=114</guid>
		<description><![CDATA[One of the most useful (for me) options in DTrace is flowindent. All it does is indent the entry to each function with &#8220;-&#62;&#8221;, and mark the return from this function with &#8220;&#60;-&#8221;. Doesn&#8217;t seem like much, does it? But just look at the results!
The following example catches all the probes of the fbt provided. [...]]]></description>
			<content:encoded><![CDATA[<p>One of the most useful (for me) options in DTrace is <strong>flowindent</strong>. All it does is indent the entry to each function with &#8220;-&gt;&#8221;, and mark the return from this function with &#8220;&lt;-&#8221;. Doesn&#8217;t seem like much, does it? But just look at the results!</p>
<p>The following example catches all the probes of the <strong>fbt</strong> provided. By default (that&#8217;s our case since we&#8217;re not changing any other options but flowindent), DTrace registers and prints to the standard output all the probes matched in the tracing process.</p>
<p><span id="more-114"></span>Here is our script:</p>
<pre>#!/usr/sbin/dtrace -s
fbt:::
/execname == "dtrace"/
{
}</pre>
<p>And this is the output we&#8217;ll get by running this script:</p>
<pre>dtrace: script './try5.d' matched 32659 probes
CPU     ID                    FUNCTION:NAME
1   2027                    xc_sync:entry
1    819                 xc_do_call:entry
1   1210         mutex_vector_enter:entry
1   1238               lock_set_spl:entry
1   2353                       splx:entry
1  15484                apic_setspl:entry
1  15485               apic_setspl:return
1   2354                      splx:return
1   1239              lock_set_spl:return
1   1211        mutex_vector_enter:return
1    821                  xc_common:entry
1  15510              apic_send_ipi:entry
1  15511             apic_send_ipi:return
...</pre>
<p>But if we only add the<span> </span><strong>flowindent</strong><span> </span>option to our script (you can also achieve the same result by using -F dtrace command line option), the output is going to appear much more readable and easy to follow:</p>
<p>Our new script:</p>
<pre>#!/usr/sbin/dtrace -s
#pragma D option flowindent
fbt:::
/execname == "dtrace"/
{
}</pre>
<p>And this is the output we&#8217;ll get:</p>
<pre>dtrace: script './try5.d' matched 32659 probes
CPU FUNCTION
1  -&gt; xc_sync
1    -&gt; xc_do_call
1      -&gt; mutex_vector_enter
1        -&gt; lock_set_spl
1          -&gt; splx
1            -&gt; apic_setspl
1            &lt;- apic_setspl
1          &lt;- splx
1        &lt;- lock_set_spl
1      &lt;- mutex_vector_enter
1      -&gt; xc_common
1        -&gt; apic_send_ipi
1        &lt;- apic_send_ipi
...</pre>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/solaris?a=0VEeqh3ydmk:4vl-9sGnvns:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/solaris?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/solaris?a=0VEeqh3ydmk:4vl-9sGnvns:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/solaris?d=7Q72WNTAKBA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://solaris.reys.net/dtrace-options-flowindent/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://solaris.reys.net/dtrace-options-flowindent/</feedburner:origLink></item>
		<item>
		<title>DTrace: count system calls for any process</title>
		<link>http://feedproxy.google.com/~r/solaris/~3/Ovs7uGWnEZU/</link>
		<comments>http://solaris.reys.net/dtrace-count-system-calls-for-any-process/#comments</comments>
		<pubDate>Sat, 02 May 2009 02:36:51 +0000</pubDate>
		<dc:creator>Gleb Reys</dc:creator>
				<category><![CDATA[General Solaris topics]]></category>
		<category><![CDATA[dtrace]]></category>

		<guid isPermaLink="false">http://solaris.simplyunix.com/?p=103</guid>
		<description><![CDATA[One more variation of using DTrace allows to track which system calls are made from a certain process. Or do the same for lots of processes, if you use execname and not PIDs&#8230;
Such a command line will show you all system calls made by Xorg in the last 5 seconds:
solaris# dtrace -n 'syscall:::entry /execname == [...]]]></description>
			<content:encoded><![CDATA[<p>One more variation of using DTrace allows to track which system calls are made from a certain process. Or do the same for lots of processes, if you use <strong>execname </strong>and not PIDs&#8230;</p>
<p>Such a command line will show you all system calls made by Xorg in the last 5 seconds:</p>
<pre>solaris# <strong>dtrace -n 'syscall:::entry /execname == "Xorg"/ {@[probefunc] = count(); } tick-5sec {printa(@); clear(@);}'</strong>
dtrace: description 'syscall:::entry ' matched 227 probes
CPU     ID                    FUNCTION:NAME
0  36588                       :tick-5sec
writev                                                           20
lwp_sigmask                                                      38
setcontext                                                       38
setitimer                                                        75
read                                                            422
pollsys                                                         426</pre>
<p>pS: some time later I&#8217;ll hopefully write more about what DTrace and D language are</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/solaris?a=Ovs7uGWnEZU:-SyMpL9DOmo:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/solaris?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/solaris?a=Ovs7uGWnEZU:-SyMpL9DOmo:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/solaris?d=7Q72WNTAKBA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://solaris.reys.net/dtrace-count-system-calls-for-any-process/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://solaris.reys.net/dtrace-count-system-calls-for-any-process/</feedburner:origLink></item>
		<item>
		<title>Basic usage of DTrace</title>
		<link>http://feedproxy.google.com/~r/solaris/~3/kGT070Q8GNU/</link>
		<comments>http://solaris.reys.net/basic-usage-of-dtrace/#comments</comments>
		<pubDate>Sat, 02 May 2009 02:33:58 +0000</pubDate>
		<dc:creator>Gleb Reys</dc:creator>
				<category><![CDATA[General Solaris topics]]></category>
		<category><![CDATA[dtrace]]></category>

		<guid isPermaLink="false">http://solaris.simplyunix.com/?p=100</guid>
		<description><![CDATA[I&#8217;m slowly getting used to seeing and using DTrace in my everyday work&#8230;
For example, here&#8217;s a start of the most basic analysis.
My setup: The system is constantly busy with something, and our task is to find what&#8217;s responsible for this. How? One of the possible solutions is to simply watch the system for a certain [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m slowly getting used to seeing and using <strong>DTrace </strong>in my everyday work&#8230;</p>
<p>For example, here&#8217;s a start of the most basic analysis.</p>
<p><strong>My setup:</strong> The system is constantly busy with something, and our task is to find what&#8217;s responsible for this. How? One of the possible solutions is to simply watch the system for a certain period of time (5 seconds in our case) to see what process makes most system calles&#8230; And it&#8217;s clearly seen now that the most active consumer of system calls is Java VM which happens to run a very complex graphics applet at this very moment.</p>
<p><span id="more-100"></span>As for <strong>rxvt </strong>terminals, we&#8217;re seeing so many calls simply because we&#8217;re building our list based on the command name and not PID, so in the table we really see the cumulative number of system calls made by roughly 40 terminals I&#8217;ve got running on my box, and not a single session as one might think. Had I done the PID-based list, all the 40+ rxvt processes would have been shown separately.</p>
<p>Here it goes:</p>
<pre>solaris# <strong>dtrace -n syscall:::entry'{@[execname] = count()} tick-5sec {printa(@); clear(@);}'</strong></pre>
<p>And this is the result of such a command line. Every 5 seconds you&#8217;ll see an output similar to this:</p>
<pre>dtrace: description 'syscall:::entry' matched 227 probes
CPU     ID                    FUNCTION:NAME
1  36588                       :tick-5sec
svc.configd                                                       1
expect                                                            3
telnet                                                            4
svc.startd                                                        6
sendmail                                                         10
thunderbird-bin                                                  10
htt_server                                                       10
nscd                                                             13
mozilla-bin                                                      19
soffice.bin                                                      77
xautolock                                                       106
dtrace                                                          173
icewm                                                           225
Xorg                                                            874
rxvt                                                           2008
java_vm                                                        2651</pre>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/solaris?a=kGT070Q8GNU:JSRhVovgvYc:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/solaris?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/solaris?a=kGT070Q8GNU:JSRhVovgvYc:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/solaris?d=7Q72WNTAKBA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://solaris.reys.net/basic-usage-of-dtrace/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://solaris.reys.net/basic-usage-of-dtrace/</feedburner:origLink></item>
		<item>
		<title>What’s new in Solaris 10?</title>
		<link>http://feedproxy.google.com/~r/solaris/~3/sRJWo65zieQ/</link>
		<comments>http://solaris.reys.net/whats-new-in-solaris-10/#comments</comments>
		<pubDate>Sat, 02 May 2009 02:32:00 +0000</pubDate>
		<dc:creator>Gleb Reys</dc:creator>
				<category><![CDATA[General Solaris topics]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[dtrace]]></category>
		<category><![CDATA[solaris 10]]></category>
		<category><![CDATA[zfs]]></category>

		<guid isPermaLink="false">http://solaris.simplyunix.com/?p=98</guid>
		<description><![CDATA[Here are just some of the revolutionary changes introduced in Solaris 10:
DTrace &#8211; dynamic tracing
DTrace allows you to dynamically trace anything and everything in real time. You can observe processes both in userland and kernel space, watch them as closely as you want and this all with virtually no performance impact. This allows DTrace to [...]]]></description>
			<content:encoded><![CDATA[<p>Here are just some of the revolutionary changes introduced in <strong>Solaris 10</strong>:</p>
<h3>DTrace &#8211; dynamic tracing</h3>
<p><strong>DTrace </strong>allows you to dynamically trace anything and everything in real time. You can observe processes both in userland and kernel space, watch them as closely as you want and this all with virtually no performance impact. This allows DTrace to be used on a production system being absolutely sure it&#8217;s not going to considerably slow the system down or crash it.<br />
I think it&#8217;s one of the best Solaris 10 innovations &#8211; all the administrators and developers will like it.</p>
<h3>ZFS file system (zettabyte file system)</h3>
<p><span id="more-98"></span>This is a new filesystem &#8211; it promises to put an end to all the standard troubles every system administrator has with file systems. By introducing a virtual storage pool, you will be able to grow or shrink file systems much easier by simply adding new physical disks to this pool. The same storage pool is going to be used for all the filesystems you need &#8211; so, having added 10 more physical disks to the pool, you&#8217;ll be able to decide which filesystems you want to grow.</p>
<h3>Predictive Self-Healing (PSH)</h3>
<p><strong>PSH </strong>is a set of automated diagnostics, isolation and recovery procedures for most of the hardware and software faults which might occur on your system. In case of hardware failure, PSH will be able to safely isolate the faulty part and notify all the hardware and software resources which might be dependant on this faulty part.</p>
<p>PSH has few components. Someday I&#8217;ll write more on it, but in short &#8211; here&#8217;s how it works: mst of the work is done by <strong>Solaris Fault Manage</strong><strong>r</strong> (SFM) and <strong>Solaris Service Manager</strong> (SSM).</p>
<p><strong>SFM</strong> is watching the hardware &#8211; if it find a faulty processor, a bad memory region or some faulty I/O device, it will automatically isolate the part before it fails completely and provokes a system crash or some other failure.</p>
<p><strong>SSM</strong> in its turn is looking after all the applications &#8211; all the daemons are started as services, and with just few commands you can get their status, restart them or set up logical dependancies between them.</p>
<p>For instance, a telnet service will be dependant on the basic network services &#8211; the ones which configure network interfaces. Because of the dependancies, if system interfaces weren&#8217;t configured on boot-up, the appropriate service will not be in online state and this will make dependant telnet service to fall into the maintenance mode, waiting for the necessary network services to come online. It all sounds rather complicated (and it actually is!), but if you properly configure everything, it works together fairly well.</p>
<h3>Network performance</h3>
<p>There was a lot of stuff rewritten in TCP/IP stack and this allowed Solaris 10 to reach a much better performance.<br />
One of the main achievements is the linear scalability on multi-processor systems. All the latest network technologies are obviously supported as well. The project name for these improvements is <strong>FireEngine</strong>, and I&#8217;ll probably try and find some links to the pages related to it.</p>
<h3>Janus &#8211; Linux environment running on Solaris</h3>
<p>It is promised that you&#8217;ll be able to run many Linux applications on Solaris systems. Practically, this feature allows you to run any native Linux application without any changes to it or any reboots, with the performance almost as good as original. To make this work, you&#8217;ll have to free up some spance on your disks for Linux libraries, and there is still no guarantee that every application will work, but to proove the concept, Sun engineers have already successfully started BEA WebLogic Server and Oracle Database Server for Linux, Samba and Apache were also tested, as well as lots of browsers and office packages.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/solaris?a=sRJWo65zieQ:L4w1IL_B8y0:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/solaris?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/solaris?a=sRJWo65zieQ:L4w1IL_B8y0:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/solaris?d=7Q72WNTAKBA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://solaris.reys.net/whats-new-in-solaris-10/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://solaris.reys.net/whats-new-in-solaris-10/</feedburner:origLink></item>
		<item>
		<title>DTrace: observing PHP</title>
		<link>http://feedproxy.google.com/~r/solaris/~3/vk7p-4LL7j8/</link>
		<comments>http://solaris.reys.net/dtrace-php-scripts/#comments</comments>
		<pubDate>Fri, 01 May 2009 21:50:36 +0000</pubDate>
		<dc:creator>Gleb Reys</dc:creator>
				<category><![CDATA[General Solaris topics]]></category>
		<category><![CDATA[dtrace php]]></category>

		<guid isPermaLink="false">http://solaris.simplyunix.com/?p=56</guid>
		<description><![CDATA[I&#8217;ve finally got some spare time to download a PEAR module for DTrace. What a great module! I&#8217;ve found a little problem with it, wrote a letter to Wez Furlong, and he immediately changed the source code to make it work even better. Thanks a lot, Wez!  
So, here it is &#8211; my first [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve finally got some spare time to download a PEAR module for <a href="http://netevil.org/node.php?nid=413">DTrace</a>. What a great module! I&#8217;ve found a little problem with it, wrote a letter to <a href="http://netevil.org/wiki.php?WezFurlong">Wez Furlong</a>, and he immediately changed the source code to make it work even better. Thanks a lot, Wez! <img src='http://solaris.reys.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>So, here it is &#8211; my first PHP Dtrace script: <a href="http://solaris.reys.net/scripts/php-scripts-snoop.d"><strong>php-scripts-snoop.d</strong></a></p>
<p><strong><span id="more-56"></span><br />
</strong></p>
<pre><code>#!/usr/sbin/dtrace -s
#pragma D option quiet
:dtrace.so::function-entry
/ copyinstr(arg0) == "" /
{
printf("%d -&gt; %-30sn", pid, copyinstr(arg1));}
:dtrace.so::function-return
/ copyinstr(arg0) == "" /
{
printf("%d &lt;- %-30sn", pid, copyinstr(arg1));
}</code></pre>
<p>So go ahead, download the script, do</p>
<pre>solaris# <strong>chmod a+x ./php-scripts-snoop.d</strong></pre>
<p>for it, and after you start it in a terminal of your web-server, you can run PHP scripts from this server, and our DTrace script will be reporting us whenever each PHP script stars or finishes, specifying which Apache process is responsible for this:</p>
<div class="bb-code-title">
<pre>solaris# ./php-scripts-snoop.d
204934 -&gt; /export/www/pma/index.php
204934 &lt;- /export/www/pma/index.php
204934 -&gt; /export/www/pma/css/phpmyadmin.css.php
204934 &lt;- /export/www/pma/css/phpmyadmin.css.php
204936 -&gt; /export/www/pma/left.php
204934 -&gt; /export/www/pma/queryframe.php
204936 &lt;- /export/www/pma/left.php
204936 -&gt; /export/www/pma/main.php
204934 &lt;- /export/www/pma/queryframe.php
204934 -&gt; /export/www/pma/css/phpmyadmin.css.php
204934 &lt;- /export/www/pma/css/phpmyadmin.css.php
204934 -&gt; /export/www/pma/css/phpmyadmin.css.php
204936 -&gt; /export/www/pma/css/phpmyadmin.css.php
204934 &lt;- /export/www/pma/css/phpmyadmin.css.php
204934 -&gt; /export/www/1.php
204934 &lt;- /export/www/1.php
204936 &lt;- /export/www/pma/css/phpmyadmin.css.php</pre>
</div>
<p>pS: yes, starting of today I&#8217;ve decided to provide download links for each of my scripts &#8211; should be more convenient for you now. This means that sooner or later I&#8217;ll update all the archive blog entries to have download links for respective scripts.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/solaris?a=vk7p-4LL7j8:tFCMkJSj9tE:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/solaris?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/solaris?a=vk7p-4LL7j8:tFCMkJSj9tE:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/solaris?d=7Q72WNTAKBA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://solaris.reys.net/dtrace-php-scripts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://solaris.reys.net/dtrace-php-scripts/</feedburner:origLink></item>
		<item>
		<title>Zones in Solaris 10: part two – types of resources</title>
		<link>http://feedproxy.google.com/~r/solaris/~3/gq7eaS_frp4/</link>
		<comments>http://solaris.reys.net/zones-in-solaris-10-part-two-types-of-resources/#comments</comments>
		<pubDate>Fri, 01 May 2009 21:49:19 +0000</pubDate>
		<dc:creator>Gleb Reys</dc:creator>
				<category><![CDATA[General Solaris topics]]></category>
		<category><![CDATA[solaris zones]]></category>

		<guid isPermaLink="false">http://solaris.simplyunix.com/?p=54</guid>
		<description><![CDATA[Now that we know how to create non-global zones in Solaris, it&#8217;s probably time to learn some basics of zones configuration. Most work is done with zonecfg which has been mentioned in my Solaris zones: a working example post.
Example of fully configuring a Solaris 10 zone
For starters, let&#8217;s have a look at the full configuration [...]]]></description>
			<content:encoded><![CDATA[<p>Now that we know how to create non-global zones in Solaris, it&#8217;s probably time to learn some basics of zones configuration. Most work is done with <strong>zonecfg</strong> which has been mentioned in my <a href="http://solaris.reys.net/solaris-10-zones-part-one-a-working-example/">Solaris zones: a working example</a> post.</p>
<h3>Example of fully configuring a Solaris 10 zone</h3>
<p>For starters, let&#8217;s have a look at the full configuration of our zone. You&#8217;ve probably guessed by now, that we only specified the minimal number of parameters when creating our zone. Now I&#8217;ll show you how to get a full view of our zone&#8217;s configuration, and I&#8217;ll also talk a bit about types of resources you can allocate to a non-global zone.</p>
<p><span id="more-54"></span>Start <strong>zonecfg</strong> with <strong>export</strong> command to get a full configuration (<strong>export</strong> is a command line parameter in my example, but if you like, you can do <strong>zonecfg -z zone1</strong> and then type <strong>export</strong> when prompted for a command):</p>
<pre>solaris# <strong>zonecfg -z zone1 export
<span style="font-weight: normal;"><span style="font-family: -webkit-monospace; line-height: 19px; white-space: normal; font-size: 13px;">c</span>reate -b
set zonepath=/sr/zones/1
set autoboot=false
add inherit-pkg-dir
set dir=/lib
end
add inherit-pkg-dir
set dir=/platform
end
add inherit-pkg-dir
set dir=/sbin
end
add inherit-pkg-dir
set dir=/usr
end
add net
set address=192.168.0.5
set physical=bge0
end</span></strong></pre>
<p>As you can guess from the name of the command -<strong>export<span style="font-weight: normal;">, we&#8217;re getting a full list of commands for <strong>zonecfg <span style="font-weight: normal;">to create a similar zone. We&#8217;re exporting the config. I&#8217;ll talk about this a bit more some other time.</span></strong></span></strong></p>
<p>Lookinf at the output, you can recognize some of the commands we&#8217;ve actually typed following the instructions from my previous entry, but there are also few new commands. Particularly, they are the file-system (packages) related ones. I&#8217;ll definitely have a separate blog entry on file systems in zones, but for now I&#8217;ll just talk about resources for zones.</p>
<p>Each non-global zone can be allocated any resources you have on your actual system. Resources are added with an <strong>add <span style="font-weight: normal;">command, which you can see now in the output I&#8217;ve given. This commands takes a parameter &#8211; a resource type.</span></strong></p>
<h3>Resource types in Solaris 10 configuration</h3>
<ul>
<li><strong>net <span style="font-weight: normal;">- a network interface. As you remember, when adding such a resource, you have to specify a physically present network adapter card you have in your box, and zone&#8217;s network interface will be a virtual interface on this network adapter.</span></strong></li>
<li><strong><span style="font-weight: normal;"><strong>device <span style="font-weight: normal;">- any additional device. Using device names mask (for instance, /dev/pts*), you can allow a non-global zone access any devices you have on your actual system.</span></strong></span></strong></li>
<li><strong><span style="font-weight: normal;"><strong><span style="font-weight: normal;"><strong>fs <span style="font-weight: normal;">- a file system. You can grant access to a physical disk or any directory of your actual system to any non-global zone. You can specify a file system type along with mount options, which is very convenient.</span></strong></span></strong></span></strong></li>
<li><strong><span style="font-weight: normal;"><strong><span style="font-weight: normal;"><strong><span style="font-weight: normal;"><strong>inherit-pkg-dir <span style="font-weight: normal;">- a globa zone root filesystem directory which is inherited by a non-global zone. Specifying a directory name, you&#8217;re pointing to the fact that all the files from this directory of your actual system (global zone) will not be physically copied into the non-global zone, but insteal will be inherited. The fact is, files from these directories will be accessible through a read-only loopback filesystem in your non-global zone (thanks, <a href="http://solaris.reys.net/english/2005/03/%7Chttp://solaris.reys.net/archives/57-Solaris-10.html#c106%22">Dan</a>!)</span></strong></span></strong></span></strong></span></strong></li>
<li><strong><span style="font-weight: normal;"><strong><span style="font-weight: normal;"><strong><span style="font-weight: normal;"><strong><span style="font-weight: normal;"><strong>attr <span style="font-weight: normal;">- an attribute. With resources of this type you can create text comments for your zones &#8211; these comments might come in handy when you get back to reconfiguring your zone some time later.</span></strong></span></strong></span></strong></span></strong></span></strong></li>
<li><strong><span style="font-weight: normal;"><strong><span style="font-weight: normal;"><strong><span style="font-weight: normal;"><strong><span style="font-weight: normal;"><strong><span style="font-weight: normal;"><strong>rctl <span style="font-weight: normal;">- a zone-wide resource control. At this stage, there are only two parameters of this type -<strong>zone.cpu-shares <span style="font-weight: normal;">and <strong>zone.max-lwps<span style="font-weight: normal;">, but there will be more in the future. These parameters allow you to limit a CPU time given to a zone, and limit a max number of lwp processes which can be created in a zone.</span></strong></span></strong></span></strong></span></strong></span></strong></span></strong></span></strong></span></strong></li>
</ul>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/solaris?a=gq7eaS_frp4:AUUjZX54gTE:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/solaris?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/solaris?a=gq7eaS_frp4:AUUjZX54gTE:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/solaris?d=7Q72WNTAKBA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://solaris.reys.net/zones-in-solaris-10-part-two-types-of-resources/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://solaris.reys.net/zones-in-solaris-10-part-two-types-of-resources/</feedburner:origLink></item>
		<item>
		<title>Asus A8N-SLI NIC drivers for Solaris</title>
		<link>http://feedproxy.google.com/~r/solaris/~3/WAXasXXCozk/</link>
		<comments>http://solaris.reys.net/a8n-sli-nic-drivers-for-solaris/#comments</comments>
		<pubDate>Fri, 01 May 2009 21:47:21 +0000</pubDate>
		<dc:creator>Gleb Reys</dc:creator>
				<category><![CDATA[General Solaris topics]]></category>

		<guid isPermaLink="false">http://solaris.simplyunix.com/?p=50</guid>
		<description><![CDATA[Finally, I&#8217;ve found some time to finish off the on-board network adapters configuration in Solaris 10 for my Asus A8N-SLI motherboard.
As I&#8217;ve already told before, this motherboard comes equipped with 2 network adapters:nForce4 and Yukon Gigabit Ethernet 10/100/1000Base-T Adapter. Both adapters are based on Marvell chips &#8211; they are Marvell 88E8001-LKJ1 (PCI Gigabit Ethernet) and [...]]]></description>
			<content:encoded><![CDATA[<p>Finally, I&#8217;ve found some time to finish off the on-board network adapters configuration in Solaris 10 for my <strong>Asus A8N-SLI</strong> motherboard.</p>
<p>As I&#8217;ve already told before, this motherboard comes equipped with 2 network adapters:nForce4 and Yukon Gigabit Ethernet 10/100/1000Base-T Adapter. Both adapters are based on Marvell chips &#8211; they are Marvell 88E8001-LKJ1 (PCI Gigabit Ethernet) and Marvell 88E1111-RCJ (PHY) respectively.</p>
<p>So, the first one of these adapters is properly found and supported in Solaris 10 out of the box. In fact, Solaris 10 even finds and attempts to configure <strong>nge0</strong> during the initial OS install.</p>
<p>To make the <strong>Yukon Gigabit (Marvell)</strong> adapter work, you should go to the <strong>SysKonnect</strong> website and navigate to the <a href="http://www.skd.de/e_en/support/driver.html">drivers downloads page</a> (<strong>skge</strong> is there as well). What&#8217;s REALLY cool is that there is a 64bit driver already! So I&#8217;ve got myself this file: skgesol_x64v8.12.1.3.tar.Z</p>
<p>After you unpack the archive, you should install the <strong>SKGEsolx</strong>, and that&#8217;s it &#8211; the pre-install script even allows you to configure skge0 adapter &#8211; set its IP and network mask.<br />
This is where my two network adapters are found (taken from <strong>/etc/path_to_inst</strong>):</p>
<pre>"/pci@0,0/pci10de,5c@9/pci1043,811a@c" 0 "skge"
"/pci@0,0/pci1043,8141@a" 0 "nge"</pre>
<p><strong>Attention:</strong> due to unknown reasons, <strong>prtconf -vp</strong> clearly shows only one of the adapters &#8211; <strong>skge</strong>. That&#8217;s the one represented by the &#8220;Ethernet controller&#8221; model name. Don&#8217;t know why, but <strong>nge</strong> is called &#8220;Bridge device&#8221; there.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/solaris?a=WAXasXXCozk:Kvh557M1fiw:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/solaris?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/solaris?a=WAXasXXCozk:Kvh557M1fiw:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/solaris?d=7Q72WNTAKBA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://solaris.reys.net/a8n-sli-nic-drivers-for-solaris/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://solaris.reys.net/a8n-sli-nic-drivers-for-solaris/</feedburner:origLink></item>
		<item>
		<title>ZFS: commands emulation</title>
		<link>http://feedproxy.google.com/~r/solaris/~3/g7mmJp99j7M/</link>
		<comments>http://solaris.reys.net/zfs-commands-emulation/#comments</comments>
		<pubDate>Fri, 01 May 2009 21:41:52 +0000</pubDate>
		<dc:creator>Gleb Reys</dc:creator>
				<category><![CDATA[General Solaris topics]]></category>
		<category><![CDATA[zfs]]></category>

		<guid isPermaLink="false">http://solaris.simplyunix.com/?p=48</guid>
		<description><![CDATA[I&#8217;m considering getting myself an x86 server with Solaris for home use, and today I&#8217;ve decided to play around with ZFS on my old Sparc-box.
I believe those of you who are just getting started with ZFS will really like the -n command line option for zfs and zpool, which allows you to see what result [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m considering getting myself an x86 server with Solaris for home use, and today I&#8217;ve decided to play around with ZFS on my old Sparc-box.</p>
<p>I believe those of you who are just getting started with ZFS will really like the -n command line option for <strong>zfs </strong>and <strong>zpool</strong>, which allows you to see what result would a certain command yield, while there is nothing actually done to your disks.</p>
<p>So, if you&#8217;re thinking of creating a new storage pool, you don&#8217;t have to actually create it just to see how it will look &#8211; you can use -n option instead:</p>
<pre><code>solaris# <strong>zpool create -n mypool raidz /export/vdev/d1 /export/vdev/d2 /export/vdev/d3 /export/vdev/d4</strong>
</code></pre>
<div><span id="more-48"></span>it will create a &#8217;storage&#8217; with the following layout:</p>
<pre>mypool
raidz
/export/vdev/d1
/export/vdev/d2
/export/vdev/d3
/export/vdev/d4</pre>
</div>
<p>The command will still be validated &#8211; its syntax will be checked, plus you&#8217;ll have the existance of the disks verified as well. So, if you don&#8217;t have one of the devices in your system, you might see something like this:</p>
<pre><code>solaris# <strong>zpool create -n mypool raidz /export/vdev/d1 /export/vdev/d2 /export/vdev/d3 /export/vdev/d4</strong>
cannot open '/export/vdev/d1': No such file or directory</code></pre>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/solaris?a=g7mmJp99j7M:mMwDb4KJH1A:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/solaris?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/solaris?a=g7mmJp99j7M:mMwDb4KJH1A:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/solaris?d=7Q72WNTAKBA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://solaris.reys.net/zfs-commands-emulation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://solaris.reys.net/zfs-commands-emulation/</feedburner:origLink></item>
		<item>
		<title>Solaris 8 Migration Assistant (Project Etude)</title>
		<link>http://feedproxy.google.com/~r/solaris/~3/etgPz6nznV0/</link>
		<comments>http://solaris.reys.net/solaris-8-migration-assistant-project-etude/#comments</comments>
		<pubDate>Fri, 01 May 2009 21:39:45 +0000</pubDate>
		<dc:creator>Gleb Reys</dc:creator>
				<category><![CDATA[Solaris How-To]]></category>
		<category><![CDATA[s8ma]]></category>
		<category><![CDATA[solaris 8]]></category>
		<category><![CDATA[solaris zones]]></category>

		<guid isPermaLink="false">http://solaris.simplyunix.com/?p=45</guid>
		<description><![CDATA[I&#8217;ve finally completed my first successful experiment with Solaris 8 Migration Assistant (S8MA) today &#8211; a new product from Sun which allows you to run Solaris 8 branded zones. It&#8217;s a fully and officially supported solution (for an extra price), but you can download the free 90-day trial to play with it and understand how [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve finally completed my first successful experiment with <strong>Solaris 8 Migration Assistant</strong> (<strong>S8MA</strong>) today &#8211; a new product from Sun which allows you to run Solaris 8 branded zones. It&#8217;s a fully and officially supported solution (for an extra price), but you can download the free 90-day trial to play with it and understand how really cool it is.</p>
<h3>Why use Solaris 8 zones?</h3>
<p>First of all, just a few words about the niche for this product. Many companies are rather conservative about their Solaris upgrades. Most systems are still running Solaris 8, if not something older. Quite often this is also dictated by third-party software dependencies &#8211; products which were bought and configured for Solaris 8, which are now so tightly integrated that there isn&#8217;t an easy way to migrated them into Solaris 10. Such systems are doomed for slow but very expensive death. Expensive, because with every year the hardware support for servers capable of running Solaris 8 raises again and again.</p>
<p><span id="more-45"></span></p>
<p>That&#8217;s where the Solaris 8 zones come in. It&#8217;s very easy, really: you create a flar-copy fo your existing physical server under Solaris 8, then create a Solaris 8 zone, import your flar-archive and get a virtual copy of your Solaris 8 environment, with all your processes, programs and startup scripts.</p>
<p>To make things easier, it&#8217;s even possible to configure your hostid in Solaris 8 zone to match the one of the physical Solaris 8 system, this way no programs running in the zone will even guess that they&#8217;ve been virtualized.</p>
<p>Who knows, maybe I&#8217;ll tell you more about this technology some other day, but for now &#8211; just the simplest list of actions and commands for your S8MA proof of concept.</p>
<h3>Preparation: Solaris 10u4 server an S8MA packages</h3>
<p>1. Find and prepare a sparc box with Solaris 10u4. It is important to have the latest Solaris 10 update. Preparations are usually limited to applying a kernel patch, 127111-01 in my case.</p>
<p>2. Download the Solaris 8 Migration Assitant (current version is 1.0) from this location: <a href="http://www.sun.com/download/products.xml?id=470c4a45">Solaris 8 Migration Assistant</a>. The 3 packages in archive are dead easy to install using standard pkgadd.</p>
<p>Here are the packages you&#8217;ll get:</p>
<div><code>SUNWs8brandr     Solaris 8 Migration Assistant: solaris8 brand support (Root)<br />
SUNWs8brandu     Solaris 8 Migration Assistant: solaris8 brand support (Usr)<br />
SUNWs8p2v       Solaris 8 p2v Tool</code></div>
<h3>Make a snapshot of your old Solaris 8 server</h3>
<p>You need to create a flar-archive of your Solaris 8 system.</p>
<p>Log onto your Solaris 8 box, and run the command. In this and all the following examples, solaris8 is nothing but an arbitrary name I&#8217;ve chosen for my zone. You might as well call it anything you like.</p>
<pre><span style="font-family: -webkit-monospace;">solaris# <strong>flarcreate -S -n solaris8 solaris8.flar</strong></span></pre>
<h3>Set up a Solaris 8 zone</h3>
<p>Here&#8217;s how you do it:</p>
<pre><code>solaris# <strong>zonecfg -z solaris8</strong>
solaris8: No such zone configured
Use 'create' to begin configuring a new zone.
zonecfg:solaris8-system&gt; <strong>create -t SUNWsolaris8</strong>
zonecfg:solaris8&gt; <strong>set zonepath=/export/solaris8</strong>
zonecfg:solaris8&gt; <strong>add net</strong>
zonecfg:solaris8:net&gt; <strong>set address=172.21.7.155/24</strong>
zonecfg:solaris8:net&gt; <strong>set physical=ce0</strong>
zonecfg:solaris8:net&gt; <strong>end</strong>
zonecfg:solaris8&gt; <strong>commit</strong>
zonecfg:solaris8&gt; <strong>exit</strong></code></pre>
<p>Naturally, your IP and network device name will be different. As of now, our zone is fully configured, but not yet installed.</p>
<h3>Install Solaris 8 zone using flar-archive</h3>
<p><span style="font-family: -webkit-monospace;">solaris# <strong>zoneadm -z solaris8 install -u -a /export/solaris8.flar</strong><br />
Log File: /var/tmp/solaris8.install.13597.log<br />
Source: /export/solaris8.flar<br />
Installing: This may take several minutes&#8230;<br />
Postprocessing: This may take several minutes&#8230;<br />
WARNING: zone did not finish booting.</span></p>
<div><code>Result: Installation completed successfully.<br />
Log File: /export/solaris8/root/var/log/solaris8.install.13597.log</code></div>
<p>In my case the Solaris 8 zone got stuck on sys-unconfig, and so I had to connect to the virtual console of the zone to help it move on:</p>
<p>Here&#8217;s how you connect to a zone&#8217;s console:</p>
<pre>solaris# <strong>zlogin -C solaris8</strong></pre>
<p>That&#8217;s it! The rest was easy &#8211; just a few minutes of configuring the network parameters and DNS/NIS settings. Finally, I was able to ssh into the new zone and run uname:</p>
<div>
<pre>solaris8 #<strong>uname -a</strong>
SunOS solaris8 5.8 Generic_Virtual sun4u sparc SUNW,Sun-Fire-V490</pre>
</div>
<p>I liked <strong>Solaris 8 Migration Assistant</strong> very much. It&#8217;s an incredibly quick and easy way to have a whole bunch of Solaris 8 systems virtualized and running under on one of the most advanced servers with the most advanced OS &#8211; Solaris 10u4.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/solaris?a=etgPz6nznV0:KEGGdWakgF8:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/solaris?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/solaris?a=etgPz6nznV0:KEGGdWakgF8:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/solaris?d=7Q72WNTAKBA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://solaris.reys.net/solaris-8-migration-assistant-project-etude/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://solaris.reys.net/solaris-8-migration-assistant-project-etude/</feedburner:origLink></item>
	</channel>
</rss>
