<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	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/"
	>

<channel>
	<title>SUNWfrk’s Blog</title>
	<atom:link href="http://www.sunwfrk.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sunwfrk.com/blog</link>
	<description>a blog about my passion, hobby and work</description>
	<lastBuildDate>Wed, 24 Feb 2010 17:25:44 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>The APC ES 550 (follow up)</title>
		<link>http://www.sunwfrk.com/blog/2010/02/24/the-apc-es-550-follow-up/</link>
		<comments>http://www.sunwfrk.com/blog/2010/02/24/the-apc-es-550-follow-up/#comments</comments>
		<pubDate>Wed, 24 Feb 2010 17:22:54 +0000</pubDate>
		<dc:creator>SUNWfrk</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[OpenSolaris]]></category>
		<category><![CDATA[Soekris]]></category>
		<category><![CDATA[UPS]]></category>

		<guid isPermaLink="false">http://www.sunwfrk.com/blog/?p=324</guid>
		<description><![CDATA[Today my UPS&#8217;es made themselves usefull.
$ grep apcupsd /var/log/messages
Feb 24 13:02:39 soekris apcupsd[1369]: Power failure.
Feb 24 13:02:45 soekris apcupsd[1369]: Running on UPS batteries.
Feb 24 13:41:27 soekris apcupsd[1369]: Mains returned. No longer on UPS batteries.
Feb 24 13:41:27 soekris apcupsd[1369]: Power is back. UPS running on mains.
I must say the UPS with my OpenSolaris laptop and 2 [...]]]></description>
			<content:encoded><![CDATA[<p>Today my UPS&#8217;es made themselves usefull.</p>
<p>$ grep apcupsd /var/log/messages<br />
Feb 24 13:02:39 soekris apcupsd[1369]: Power failure.<br />
Feb 24 13:02:45 soekris apcupsd[1369]: Running on UPS batteries.<br />
Feb 24 13:41:27 soekris apcupsd[1369]: Mains returned. No longer on UPS batteries.<br />
Feb 24 13:41:27 soekris apcupsd[1369]: Power is back. UPS running on mains.</p>
<p>I must say the UPS with my OpenSolaris laptop and 2 external ZFS disks  on came close to a shutdown because the battery was almost empty.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunwfrk.com/blog/2010/02/24/the-apc-es-550-follow-up/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle-ified</title>
		<link>http://www.sunwfrk.com/blog/2010/02/17/oracle-ified/</link>
		<comments>http://www.sunwfrk.com/blog/2010/02/17/oracle-ified/#comments</comments>
		<pubDate>Wed, 17 Feb 2010 19:15:05 +0000</pubDate>
		<dc:creator>SUNWfrk</dc:creator>
				<category><![CDATA[General IT stuff]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Sun]]></category>

		<guid isPermaLink="false">http://www.sunwfrk.com/blog/?p=291</guid>
		<description><![CDATA[I had enough with the old layout, it was ok but I needed a change.. So I ended up with this and then realized that my site changed the same way sun.com did. From blue to red. I think I spend to much time on those sites.
I will try to post some more soon..

]]></description>
			<content:encoded><![CDATA[<p>I had enough with the old layout, it was ok but I needed a change.. So I ended up with this and then realized that my site changed the same way sun.com did. From blue to red. I think I spend to much time on those sites.</p>
<p>I will try to post some more soon..<br />
<a href="http://upload.yakuza.be/SunRIPsmall.jpg"><img class="aligncenter" title="Sun RIP" src="http://upload.yakuza.be/SunRIPsmall.jpg" alt="Sun RIP" width="640" height="501" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunwfrk.com/blog/2010/02/17/oracle-ified/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The APC ES 550</title>
		<link>http://www.sunwfrk.com/blog/2009/07/06/the-apc-es-550/</link>
		<comments>http://www.sunwfrk.com/blog/2009/07/06/the-apc-es-550/#comments</comments>
		<pubDate>Mon, 06 Jul 2009 21:13:07 +0000</pubDate>
		<dc:creator>SUNWfrk</dc:creator>
				<category><![CDATA[General IT stuff]]></category>

		<guid isPermaLink="false">http://www.sunwfrk.com/blog/?p=244</guid>
		<description><![CDATA[
I wanted some backup in case the power went down at home, not that it happens every day or even month but it happens. there was always a problem after such an event, not all the discs were found on my opensolaris (usb disk with a very low spin up time) or it was stuck on [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright" title="APC UPS ES 550" src="http://www.sunwfrk.com/upload/20090706-apc_es_550.jpg" alt="" width="258" height="163" /></p>
<p>I wanted some backup in case the power went down at home, not that it happens every day or even month but it happens. there was always a problem after such an event, not all the discs were found on my opensolaris (usb disk with a very low spin up time) or it was stuck on the boot archive. So I bought me two of these UPS&#8217;es, each for about €80 and they have a usb cable to monitor them! I hooked one to my soekris downstairs wich runs openbsd and one to my backup/media server running opensolaris. here is what I did to configure them from the source on <a title="apcupsd" href="http://www.apcupsd.org/" target="_blank">http://www.apcupsd.org/</a></p>
<p><span id="more-244"></span>Installation on OpenSolaris:<br />
First of all, when you plug it in you&#8217;ll see this on opensolaris:<br />
<em> Jul  2 20:56:34 OpenSolaris usba: [ID 349649 kern.info]         APC Back-UPS ES 550 FW:828.D3 .I USB FW:D3  3B0???X?????</em><br />
Now you need to install SUNWgmake and download the usb.h header file</p>
<p># pkg install SUNWgmake<br />
# cd /usr/sfw/include<br />
# wget http://src.opensolaris.org/source/raw/sfw/usr/src/lib/libusb/inc/usb.h<br />
-&gt; unpack the apcupsd tarball and cd into it.<br />
# ./configure &#8211;enable-usb<br />
# gmake<br />
# gmake install<br />
-&gt; cd to the config files in /etc/opt/apcupsd</p>
<p>Installation on OpenBSD:<br />
You&#8217;ll get this when you plug it in<br />
<em> ugen0 at uhub0 port 1 &#8220;APC Back-UPS ES 550 FW:828.D3 .I USB FW:D3&#8243; rev 1.10/1.06 addr 2</em></p>
<p>-&gt; unpack the apcupsd tarball and cd into it.<br />
# ./configure &#8211;enable-usb<br />
# gmake<br />
# gmake install<br />
-&gt; cd to the config files in /etc/apcupsd</p>
<p>On both operating systems you need to at least have these settings:<br />
UPSCABLE usb<br />
UPSTYPE usb<br />
DEVICE</p>
<p>On OpenSolaris you need to reconfigure before starting apcupsd so do:<br />
# touch /reconfigure &amp;&amp; init 6<br />
-&gt; apcupsd will start automatic now, check the status with:<br />
# /etc/opt/apcupsd/sbin/apcaccess status</p>
<p>On OpenBSD you need to edit /etc/rc.local so apcupsd will start automaticly then check the status with:<br />
# /sbin/apcaccess status</p>
<p>Don&#8217;t forget to read the manual! a point of intrest:<br />
*BSD: <a href="http://www.apcupsd.org/manual/manual.html#known-bsd-usb-issues" target="_blank">http://www.apcupsd.org/manual/manual.html#known-bsd-usb-issues</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunwfrk.com/blog/2009/07/06/the-apc-es-550/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>1Tb Maxtor basic drives &amp; ZFS</title>
		<link>http://www.sunwfrk.com/blog/2009/06/28/1tb-maxtor-basic-drives-zfs/</link>
		<comments>http://www.sunwfrk.com/blog/2009/06/28/1tb-maxtor-basic-drives-zfs/#comments</comments>
		<pubDate>Sun, 28 Jun 2009 12:37:46 +0000</pubDate>
		<dc:creator>SUNWfrk</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Sun]]></category>
		<category><![CDATA[Maxtor]]></category>
		<category><![CDATA[OpenSolaris]]></category>
		<category><![CDATA[ZFS]]></category>

		<guid isPermaLink="false">http://www.sunwfrk.com/blog/?p=233</guid>
		<description><![CDATA[I have two 1TB Maxtor basic drives connected to my opensolaris box. On there I run a ZFS mirror. All working well, maybe not on mega speeds but fairly enough for home use (it does stream movies to my AppleTV with XBMC over smb) The downside I discovered later, is that they auto sleep after [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft" title="Maxtor1T basic" src="http://www.sunwfrk.com/upload/20090628-maxtor.jpg" alt="" width="173" height="166" />I have two 1TB Maxtor basic drives connected to my opensolaris box. On there I run a ZFS mirror. All working well, maybe not on mega speeds but fairly enough for home use (it does stream movies to my AppleTV with XBMC over smb) The downside I discovered later, is that they auto sleep after 15minutes of being idle and I will tell you this, ZFS doesn&#8217;t like this feature&#8230; I fixed this with a crontab writing a tmp file in a directory on the disk but that gave me some onwanted problems in some cases. This morning I was fed up with it and I wanted a good solution and it seems, there is one&#8230; but the application doesn&#8217;t have a lot of functions when you use it on MacOSX it appeared&#8230; so you really need to do this on a windows computer (scary huh) so <a href="http://www.google.be/search?hl=nl&amp;q=FreeAgent-DT-WW.exe+site%3Aseagate.com&amp;btnG=Google+zoeken&amp;meta=&amp;aq=f&amp;oq=" target="_blank">here is the application</a>. Have fun!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunwfrk.com/blog/2009/06/28/1tb-maxtor-basic-drives-zfs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Playing with RRD</title>
		<link>http://www.sunwfrk.com/blog/2009/05/10/playing-with-rrd/</link>
		<comments>http://www.sunwfrk.com/blog/2009/05/10/playing-with-rrd/#comments</comments>
		<pubDate>Sun, 10 May 2009 15:07:45 +0000</pubDate>
		<dc:creator>SUNWfrk</dc:creator>
				<category><![CDATA[General IT stuff]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[NTP]]></category>

		<guid isPermaLink="false">http://www.sunwfrk.com/blog/?p=231</guid>
		<description><![CDATA[I&#8217;ve been playing with Round Robin Databases and rrdgraph. So I needed some data.. and te target was the connections per minute to my ntpd server. check it out here: https://sunrise.yakuza.be/ntp/. I must say it&#8217;s easyer then I tought.
What do you think of the result?


]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been playing with Round Robin Databases and rrdgraph. So I needed some data.. and te target was the connections per minute to my ntpd server. check it out here: <a href="https://sunrise.yakuza.be/ntp/" target="_blank">https://sunrise.yakuza.be/ntp/</a>. I must say it&#8217;s easyer then I tought.</p>
<p>What do you think of the result?</p>
<p><a href="https://sunrise.yakuza.be/ntp-images/graph1.png"><img class="aligncenter" title="4 hourly ntp" src="https://sunrise.yakuza.be/ntp-images/graph1.png" alt="4 hourly ntp" width="697" height="184" /></a><a href="https://sunrise.yakuza.be/ntp-images/graph5.png"></a></p>
<p><a href="https://sunrise.yakuza.be/ntp-images/graph5.png"><img class="aligncenter" title="yearly graph" src="https://sunrise.yakuza.be/ntp-images/graph5.png" alt="yearly graph" width="697" height="184" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunwfrk.com/blog/2009/05/10/playing-with-rrd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OpenSolaris 2008.11 ZFS with &#8216;on access&#8217; virus scan</title>
		<link>http://www.sunwfrk.com/blog/2009/04/19/zfs-with-on-access-virus-scan/</link>
		<comments>http://www.sunwfrk.com/blog/2009/04/19/zfs-with-on-access-virus-scan/#comments</comments>
		<pubDate>Sun, 19 Apr 2009 21:09:19 +0000</pubDate>
		<dc:creator>SUNWfrk</dc:creator>
				<category><![CDATA[Sun]]></category>
		<category><![CDATA[OpenSolaris]]></category>
		<category><![CDATA[ZFS]]></category>

		<guid isPermaLink="false">http://www.sunwfrk.com/blog/?p=193</guid>
		<description><![CDATA[Although at home I only work with Macintosh and OpenSolaris computers and the risk for virusses and malware are rather slim, my files could be infected with pc virusses and I could send pc virusses to friends without me knowing. It is also very stupid to think that Macintosh computer are just safe and don&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p>Although at home I only work with Macintosh and OpenSolaris computers and the risk for virusses and malware are rather slim, my files could be infected with pc virusses and I could send pc virusses to friends without me knowing. It is also very stupid to think that Macintosh computer are just safe and don&#8217;t need a virus scanner. So this is where this article came from, I installed <a title="ClamXav" href="http://www.clamxav.com/" target="_blank">ClamXav</a> on my MacBooks and then started to look at my NAS. It&#8217;s running OpenSolaris so.. there must be a great way to secure that! (and there is!!)</p>
<p>We need a few ingredients to get this running, here are my steps:</p>
<ul>
<li>First of al the SUNW packages for vscan (you should be able to install them if you haven&#8217;t got them)</li>
</ul>
<blockquote><p># pkginfo |grep -i vscan<br />
system      SUNWvscankr                     Virus Scan Service Kernel (Root)<br />
system      SUNWvscanr                      Virus Scan Service (Root)<br />
system      SUNWvscanu                      Virus Scan Service (Usr)</p></blockquote>
<ul>
<li>Install an antivirus daemon, I chose for <a title="clamav on blastwave" href="http://www.blastwave.org/packages.php/clamav" target="_blank">clamav available from blastwave</a> (i&#8217;m not gonna <a href="http://www.blastwave.org/howto.html" target="_blank">explain</a> how to install this, but in the end you should have a running daemon)</li>
</ul>
<ul>
<li>We need to download c-icap from <a title="download c-icap" href="http://sourceforge.net/projects/c-icap" target="_blank">sourceforge</a> and extract it and then compile it</li>
</ul>
<blockquote><p># export LDFLAGS=&#8221;-L/opt/csw/lib -R/opt/csw/lib -lclamav&#8221;<br />
# export CC=gcc<br />
# export CXX=g++</p>
<p># ./configure &#8211;prefix=/opt/icap &#8211;with-clamav=/opt/csw &#8211;with-perl=/bin/perl &#8211;with-zlib=/usr/lib &#8211;enable-large-files</p>
<p># make<br />
# make install</p></blockquote>
<ul>
<li><span id="more-193"></span> Before we start it we need to configure /opt/icap/etc/c-icap.conf (changes only)</li>
</ul>
<blockquote><p>CommandsSocket /tmp/c-icap.socket<br />
User nobody<br />
Logger sys_logger<br />
acl localnet src 192.168.1.0/255.255.255.0<br />
icap_access allow localnet<br />
srv_clamav.MaxObjectSize 100M<br />
<em><br />
And commented out the Viralator portions, since I&#8217;m not going to use that.</em><br />
# And here the viralator-like mode.<br />
# where to save documents<br />
# srv_clamav.VirSaveDir /srv/www/htdocs/downloads/<br />
# from where the documents can be retrieved (you can find the get_file.pl script in contrib dir)<br />
# srv_clamav.VirHTTPServer &#8220;http://fortune/cgi-bin/get_file.pl?usename=%f&amp;remove=1&amp;file=&#8221;<br />
# The refresh rate&#8230;.<br />
# srv_clamav.VirUpdateTime 15<br />
# For which filetypes the &#8220;virelator like mode&#8221; will be used.<br />
# srv_clamav.VirScanFileTypes ARCHIVE EXECUTABLE</p></blockquote>
<ul>
<li>Now we need to make sure this service starts by itself, for this I modified the clamav smf manifest to my own <a title="SUNWfrk's c-icap.xml" href="http://www.sunwfrk.com/upload/20090420-c-icap.xml" target="_blank">c-icap.xml</a> and <a title="svc-c-icap" href="http://www.sunwfrk.com/upload/20090420-svc-c-icap" target="_blank">startup script</a></li>
</ul>
<blockquote><p># cp svc-c-icap /var/opt/csw/svc/method/<br />
# chmod +x /var/opt/csw/svc/method/svc-c-icap<br />
# svccfg import c-icap.xml<br />
# svcadm enable c-icap</p></blockquote>
<ul>
<li>Now we can start with the ZFS stuff</li>
</ul>
<blockquote><p># svcadm enable vscan<br />
# zfs set vscan=on Maxtor1T/Data<br />
# vscanadm add-engine datacapsule         (replace datacapsule by the hostname of your server with c-icap (in my case I choose the hostname of the same server!)<br />
# vscanadm get-engine datacapsule<br />
# vscanadm set -p max-size=100M<br />
# vscanadm show<br />
max-size=100M<br />
max-size-action=allow<br />
types=+*</p>
<p>datacapsule:enable=on<br />
datacapsule:host=localhost<br />
datacapsule:port=1344<br />
datacapsule:max-connection=32</p></blockquote>
<ul>
<li>Now we need to test! download the <a title="Eicar test virus" href="http://www.eicar.org/anti_virus_test_file.htm" target="_blank">eicar</a> test virus and put it on that zfs volume</li>
</ul>
<blockquote><p># cp /tmp/eicar.com /Maxtor1T/Data/pom</p>
<p># tail /var/adm/messages<br />
&#8230;<br />
Apr 20 09:54:26 DataCapsule C-ICAP:: [ID 702911 local1.crit] general, VIRUS DETECTED:Eicar-Test-Signature.<br />
Apr 20 09:54:26 DataCapsule Take action&#8230;&#8230;.<br />
Apr 20 09:54:26 DataCapsule<br />
Apr 20 09:54:26 DataCapsule vscand: [ID 540744 daemon.notice] quarantine /Maxtor1T/Data/pom 0 &#8211; Eicar-Test-Signature;</p>
<p># /usr/bin/ls -l/c /Maxtor1T/Data/pom<br />
-rw-r&#8211;r&#8211;   1 root     root          68 Apr 20 09:54 /Maxtor1T/Data/pom<br />
{A&#8212;&#8212;mq-}<br />
(That q stands for quarantined and all access is denied)</p></blockquote>
<p>References:</p>
<ul>
<li><a href="http://blogs.sun.com/timthomas/entry/configuring_the_opensolaris_virus_scan" target="_blank">http://blogs.sun.com/timthomas/entry/configuring_the_opensolaris_virus_scan</a> (this helped me through with configuring vscand)</li>
<li><a href="http://www.c0t0d0s0.org/uploads/vscanclamav.pdf" target="_blank">http://www.c0t0d0s0.org/uploads/vscanclamav.pdf</a> (helped me with compiling and configuring c-icap but some other bits and pieces didn&#8217;t worked for me)</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.sunwfrk.com/blog/2009/04/19/zfs-with-on-access-virus-scan/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Specify the Finder icon with Avahi on OpenSolaris 2008.11</title>
		<link>http://www.sunwfrk.com/blog/2009/04/05/specify-the-finder-icon-with-avahi-on-opensolaris-200811/</link>
		<comments>http://www.sunwfrk.com/blog/2009/04/05/specify-the-finder-icon-with-avahi-on-opensolaris-200811/#comments</comments>
		<pubDate>Sun, 05 Apr 2009 10:36:43 +0000</pubDate>
		<dc:creator>SUNWfrk</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Sun]]></category>
		<category><![CDATA[avahi]]></category>
		<category><![CDATA[MacosX]]></category>
		<category><![CDATA[OpenSolaris]]></category>

		<guid isPermaLink="false">http://www.sunwfrk.com/blog/?p=156</guid>
		<description><![CDATA[I found this article from Simon Wheatley and found it very nice to do. But it didn&#8217;t seem to work on OpenSolaris&#8230; but don&#8217;t worry, it just needs a small fix, don&#8217;t use port 0 for _device-info._tcp, but just give it a port you are already advertising.
like:

&#60;?xml version=&#8221;1.0&#8243; standalone=&#8217;no&#8217;?&#62;&#60;!&#8211;*-nxml-*&#8211;&#62;
&#60;!DOCTYPE service-group SYSTEM &#8220;avahi-service.dtd&#8221;&#62;
&#60;service-group&#62;
&#60;name replace-wildcards=&#8221;yes&#8221;&#62;%h&#60;/name&#62;
&#60;service&#62;
&#60;type&#62;_device-info._tcp&#60;/type&#62;
&#60;port&#62;548&#60;/port&#62;
&#60;txt-record&#62;model=RackMac&#60;/txt-record&#62;
&#60;/service&#62;
&#60;service&#62;
&#60;type&#62;_afpovertcp._tcp&#60;/type&#62;
&#60;port&#62;548&#60;/port&#62;
&#60;/service&#62;
&#60;/service-group&#62;


]]></description>
			<content:encoded><![CDATA[<p>I found this article from <a title="Specify the Finder icon with Avahi" href="http://www.simonwheatley.co.uk/2008/04/06/avahi-finder-icons/" target="_blank">Simon Wheatley</a> and found it very nice to do. But it didn&#8217;t seem to work on OpenSolaris&#8230; but don&#8217;t worry, it just needs a small fix, don&#8217;t use port 0 for _device-info._tcp, but just give it a port you are already advertising.<br />
<span id="more-156"></span>like:</p>
<blockquote>
<p style="font-size: 10px;">&lt;?xml version=&#8221;1.0&#8243; standalone=&#8217;no&#8217;?&gt;&lt;!&#8211;*-nxml-*&#8211;&gt;<br />
&lt;!DOCTYPE service-group SYSTEM &#8220;avahi-service.dtd&#8221;&gt;<br />
&lt;service-group&gt;<br />
&lt;name replace-wildcards=&#8221;yes&#8221;&gt;%h&lt;/name&gt;<br />
&lt;service&gt;<br />
&lt;type&gt;_device-info._tcp&lt;/type&gt;<br />
&lt;port&gt;548&lt;/port&gt;<br />
&lt;txt-record&gt;model=RackMac&lt;/txt-record&gt;<br />
&lt;/service&gt;<br />
&lt;service&gt;<br />
&lt;type&gt;_afpovertcp._tcp&lt;/type&gt;<br />
&lt;port&gt;548&lt;/port&gt;<br />
&lt;/service&gt;<br />
&lt;/service-group&gt;</p>
</blockquote>
<p><!--adsensestart--></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunwfrk.com/blog/2009/04/05/specify-the-finder-icon-with-avahi-on-opensolaris-200811/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Share your OpenSolaris 2008.11 screen to Mac Os X</title>
		<link>http://www.sunwfrk.com/blog/2009/04/05/share-your-opensolaris-200811-screen-to-mac-os-x/</link>
		<comments>http://www.sunwfrk.com/blog/2009/04/05/share-your-opensolaris-200811-screen-to-mac-os-x/#comments</comments>
		<pubDate>Sun, 05 Apr 2009 10:14:53 +0000</pubDate>
		<dc:creator>SUNWfrk</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Sun]]></category>

		<guid isPermaLink="false">http://www.sunwfrk.com/blog/?p=139</guid>
		<description><![CDATA[I found some info on how to share your OpenSolaris Screen with vnc, and those manuals just didn&#8217;t do it for Mac Os X unless you use a vnc viewer. But I wanted to use the build in screen sharing build in to Mac Os X which support vnc but it didn&#8217;t seem to work.. [...]]]></description>
			<content:encoded><![CDATA[<p>I found some info on how to share your <a href="http://blogs.sun.com/darren/entry/vnc_for_opensolaris_2008_05" target="_blank">OpenSolaris Screen with vnc</a>, and those manuals just didn&#8217;t do it for Mac Os X unless you use a vnc viewer. But I wanted to use the build in screen sharing build in to Mac Os X which support vnc but it didn&#8217;t seem to work.. The resolution was Mac Os X wants authentication and thus the fix was easy, here you go:<span id="more-139"></span></p>
<blockquote style="font-size: 10px;"><p>svccfg -s x11-server<br />
svc:/application/x11/x11-server&gt; setprop options/server = &#8220;/usr/X11/bin/Xvnc&#8221;<br />
svc:/application/x11/x11-server&gt; setprop options/server_args = astring: (&#8220;-SecurityTypes&#8221; &#8220;Vncauth&#8221; &#8220;-RfbAuth&#8221; &#8220;/etc/X11/.vncpasswd&#8221;)<br />
svc:/application/x11/x11-server&gt; end</p>
<p>vncpasswd /etc/X11/.vncpasswd<br />
chown root:root /etc/X11/.vncpasswd<br />
chmod 400 /etc/X11/.vncpasswd</p>
<p>svcadm restart gdm</p></blockquote>
<p>I found out gdm will go into maintenance mode after a while, so just do this when this happens</p>
<blockquote>
<p style="font-size: 10px;">svcadm clear gdm</p>
</blockquote>
<p>Now you want bonjour to pick this service up so add this to /etc/avahi/services/rfb.service</p>
<blockquote>
<p style="font-size: 10px;">&lt;?xml version=&#8221;1.0&#8243; standalone=&#8217;no&#8217;?&gt;&lt;!&#8211;*-nxml-*&#8211;&gt;<br />
&lt;!DOCTYPE service-group SYSTEM &#8220;avahi-service.dtd&#8221;&gt;<br />
&lt;service-group&gt;<br />
&lt;name replace-wildcards=&#8221;yes&#8221;&gt;%h&lt;/name&gt;<br />
&lt;service&gt;<br />
&lt;type&gt;_rfb._tcp&lt;/type&gt;<br />
&lt;port&gt;5900&lt;/port&gt;<br />
&lt;/service&gt;<br />
&lt;/service-group&gt;</p></blockquote>
<p>and then restart the avahi daemon</p>
<blockquote>
<p style="font-size: 10px;">svcadm restart avahi-bridge-dsd</p>
</blockquote>
<p>and then you should have something like this</p>
<p><a href="http://www.sunwfrk.com/upload/20090405-opensolaris-afp-screensharing.png"><img class="alignnone" title="OpenSolaris Screen Sharing to Mac Os X" src="http://www.sunwfrk.com/upload/20090405-th-opensolaris-afp-screensharing.png" alt="" width="288" height="162" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunwfrk.com/blog/2009/04/05/share-your-opensolaris-200811-screen-to-mac-os-x/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Solaris ZFS &#8211; SSD &amp; ZFS &#8211; Hybrid Storage Technology</title>
		<link>http://www.sunwfrk.com/blog/2009/03/20/solaris-zfs-ssd-zfs/</link>
		<comments>http://www.sunwfrk.com/blog/2009/03/20/solaris-zfs-ssd-zfs/#comments</comments>
		<pubDate>Fri, 20 Mar 2009 19:33:31 +0000</pubDate>
		<dc:creator>SUNWfrk</dc:creator>
				<category><![CDATA[Sun]]></category>

		<guid isPermaLink="false">http://www.sunwfrk.com/blog/?p=107</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><!-- Smart Youtube --><span class="youtube"><object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/6g5qgDSRET8&amp;rel=1&amp;color1=d6d6d6&amp;color2=f0f0f0&amp;border=0&amp;fs=1&amp;hl=en&amp;autoplay=0&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0" /><param name="allowFullScreen" value="true" /><embed wmode="transparent" src="http://www.youtube.com/v/6g5qgDSRET8&amp;rel=1&amp;color1=d6d6d6&amp;color2=f0f0f0&amp;border=0&amp;fs=1&amp;hl=en&amp;autoplay=0&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="355" ></embed><param name="wmode" value="transparent" /></object></span><a href="http://www.youtube.com/watch?v=6g5qgDSRET8"><img src="http://img.youtube.com/vi/6g5qgDSRET8/default.jpg" width="130" height="97" border=0></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunwfrk.com/blog/2009/03/20/solaris-zfs-ssd-zfs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Process Management</title>
		<link>http://www.sunwfrk.com/blog/2009/03/04/process_management/</link>
		<comments>http://www.sunwfrk.com/blog/2009/03/04/process_management/#comments</comments>
		<pubDate>Wed, 04 Mar 2009 21:34:57 +0000</pubDate>
		<dc:creator>SUNWfrk</dc:creator>
				<category><![CDATA[Sun]]></category>

		<guid isPermaLink="false">http://sunwfrk.wordpress.com/?p=50</guid>
		<description><![CDATA[I learned some nice things from our middleware guy, who I will support in the future. So I was searching for some process management commands. Romeo Ninov has a nice list on it.toolbox.com
here is the list:
Commands
apptrace – for trace of library calls
dtrace – debugger, new in version 10
pargs – get list of arguments and environment [...]]]></description>
			<content:encoded><![CDATA[<p>I learned some nice things from our middleware guy, who I will support in the future. So I was searching for some process management commands. Romeo Ninov has a nice list on <a title="Process Management" href="http://it.toolbox.com/wiki/index.php/List_of_Solaris_commands_for_process_management" target="_blank">it.toolbox.com</a></p>
<p>here is the list:</p>
<p><strong>Commands</strong><br />
apptrace – for trace of library calls<br />
dtrace – debugger, new in version 10<br />
pargs – get list of arguments and environment variables with which process was started<br />
pfiles – list of file descriptors, associated with process<br />
pgrep – get the PID&#8217;s of processes by name i.e. Something like ps -efl|grep -v grep|grep process_name<br />
pkill – send signal to process. For example pkill -9 init <img src='http://www.sunwfrk.com/blog/wp-includes/images/smilies/icon_razz.gif' alt=':-P' class='wp-smiley' /><br />
pldd – list dynamic libraries, associated with process, similar to ldd for executable<br />
plockstat – see list of locked by process files. Lock can be mutex i.e. exclusive and reader/writer for shared access<br />
pmap – get memory map (segments) of process<br />
preap – try to kick-off zombie process<br />
prstat – fullscreen view of processes sorted by different criteria, similar to Linux top command<br />
prun – continue hold with pstop process<br />
ps &#8211; print process information and status. In Solaris exist SYSV and BSD variants, respectively /usr/bin/ps and /usr/ucb/ps<br />
psig – list signals that can be handled by process<br />
pstack – get backtrace stack of process for debugging purposes<br />
pstop – temporary hold process<br />
ptree &#8211; print the tree of processes<br />
pwait – wait till process finish<br />
pwdx – list working directory for process, like pwd command<br />
truss – for trace system calls and signals</p>
<p><strong><span id="more-50"></span>Examples<br />
apptrace</strong><br />
# apptrace man<br />
-&gt; man      -&gt; libc.so.1:int atexit(int (*)() = 0xd27d6bfc)<br />
&lt;- man      -&gt; libc.so.1:atexit()<br />
-&gt; man      -&gt; libc.so.1:int atexit(int (*)() = 0&#215;8054e8c)<br />
&lt;- man      -&gt; libc.so.1:atexit()<br />
-&gt; man      -&gt; libc.so.1:void __fpstart(void)<br />
&lt;- man      -&gt; libc.so.1:__fpstart() = 0xd251fc94<br />
-&gt; man      -&gt; libc.so.1:access(0&#215;8055984, 0&#215;1, 0&#215;8047e30) ** NR<br />
-&gt; man      -&gt; libc.so.1:char * setlocale(int = 0&#215;6, const char * = 0&#215;8055980 &#8220;&#8221;)<br />
&lt;- man      -&gt; libc.so.1:setlocale() = 0xd25002ed<br />
-&gt; man      -&gt; libc.so.1:char * setlocale(int = 0&#215;5, const char * = 0&#215;0 &lt;NULL&gt;)<br />
&lt;- man      -&gt; libc.so.1:setlocale() = 0xd25002ed<br />
-&gt; man      -&gt; libc.so.1:strcpy(0&#215;80669e8, 0xd25002ed, 0&#215;8047e30) ** NR<br />
-&gt; man      -&gt; libc.so.1:int strcmp(const char * = 0&#215;805597c &#8220;C&#8221;, const char * = 0&#215;80669e8 &#8220;C&#8221;)<br />
&lt;- man      -&gt; libc.so.1:strcmp()<br />
-&gt; man      -&gt; libc.so.1:char * textdomain(const char * = 0&#215;8055968 &#8220;SUNW_OST_OSCMD&#8221;)<br />
&lt;- man      -&gt; libc.so.1:textdomain() = 0&#215;80683e0<br />
-&gt; man      -&gt; libc.so.1:strcpy(0&#215;80665e8, 0&#215;8055960, 0&#215;8047e30) ** NR<br />
-&gt; man      -&gt; libc.so.1:char * getenv(const char * = 0&#215;8054fc0 &#8220;MANPATH&#8221;)<br />
&lt;- man      -&gt; libc.so.1:getenv()<br />
-&gt; man      -&gt; libc.so.1:strrchr(0&#215;8047e98, 0&#215;2f, 0&#215;8047e30) ** NR<br />
-&gt; man      -&gt; libc.so.1:int strcmp(const char * = 0&#215;8047e98 &#8220;man&#8221;, const char * = 0&#215;8054fb8 &#8220;apropos&#8221;)<br />
&lt;- man      -&gt; libc.so.1:strcmp() = 0xc<br />
-&gt; man      -&gt; libc.so.1:int strcmp(const char * = 0&#215;8047e98 &#8220;man&#8221;, const char * = 0&#215;8055958 &#8220;whatis&#8221;)<br />
&lt;- man      -&gt; libc.so.1:strcmp() = 0xfffffff6<br />
-&gt; man      -&gt; libc.so.1:int strcmp(const char * = 0&#215;8047e98 &#8220;man&#8221;, const char * = 0&#215;8055944 &#8220;catman&#8221;)<br />
&lt;- man      -&gt; libc.so.1:strcmp() = 0xa<br />
-&gt; man      -&gt; libc.so.1:int getopt(int = 0&#215;1, char *const * = 0&#215;8047de4, const char * = 0&#215;8066420 &#8220;FfkrP:M:T:ts:lad&#8221;)<br />
&lt;- man      -&gt; libc.so.1:getopt() = 0xffffffff<br />
-&gt; man      -&gt; libc.so.1:char * gettext(const char * = 0&#215;8055838 &#8220;usage:        man [-] [-adFlrt] [-M path] [-T macro-package ] [ -s  section ] name &#8230;<br />
man [-M path] -k keyword &#8230;<br />
man [-M path] -f file &#8230;&#8221;)<br />
&lt;- man      -&gt; libc.so.1:gettext() = 0&#215;8055838<br />
-&gt; man      -&gt; libc.so.1:int fprintf(FILE * = 0&#215;8067610, const char * = 0&#215;8054f7c &#8220;%s<br />
&#8220;, void * = 0&#215;8055838, &#8230;)<br />
usage:  man [-] [-adFlrt] [-M path] [-T macro-package ] [ -s section ] name &#8230;<br />
man [-M path] -k keyword &#8230;<br />
man [-M path] -f file &#8230;<br />
&lt;- man      -&gt; libc.so.1:fprintf() = 0&#215;88<br />
-&gt; man      -&gt; libc.so.1:exit(0&#215;2, 0&#215;8047e30, 0&#215;8047da0) ** NR<br />
in the above example you can see very clear functions as fprintf(), strcmp(), getenv(), etc.<br />
<strong></strong></p>
<p><strong>pargs</strong><br />
# pargs 558<br />
558:    /usr/lib/sendmail -Ac -q15m<br />
argv[0]: sendmail: Queue runner@00:15:00 for /var/spool/clientmqueue</p>
<p>argv[1]: &lt;NULL&gt;<br />
argv[2]: @00:15:00 for /var/spool/clientmqueue<br />
in above example you see arguments for start sendmail as daemon<br />
<strong></strong></p>
<p><strong>pfiles</strong><br />
# pfiles 558<br />
558:    /usr/lib/sendmail -Ac -q15m<br />
Current rlimit: 1024 file descriptors<br />
0: S_IFCHR mode:0666 dev:270,0 ino:6815752 uid:0 gid:3 rdev:13,2<br />
O_RDONLY<br />
/devices/pseudo/mm@0:null<br />
1: S_IFCHR mode:0666 dev:270,0 ino:6815752 uid:0 gid:3 rdev:13,2<br />
O_WRONLY<br />
/devices/pseudo/mm@0:null<br />
2: S_IFCHR mode:0666 dev:270,0 ino:6815752 uid:0 gid:3 rdev:13,2<br />
O_WRONLY<br />
/devices/pseudo/mm@0:null<br />
3: S_IFDOOR mode:0444 dev:279,0 ino:53 uid:0 gid:0 size:0<br />
O_RDONLY|O_LARGEFILE FD_CLOEXEC  door to nscd[366]<br />
/var/run/name_service_door<br />
4: S_IFCHR mode:0666 dev:270,0 ino:11010052 uid:0 gid:3 rdev:21,0<br />
O_WRONLY FD_CLOEXEC<br />
/devices/pseudo/log@0:conslog<br />
5: S_IFREG mode:0600 dev:102,0 ino:189384 uid:25 gid:25 size:32<br />
O_WRONLY|O_CREAT|O_EXCL<br />
/var/spool/clientmqueue/sm-client.pid<br />
Here you see list of files as NULL, console log, some PID file. On the top you can see the maximum number of file handlers for this process, with info can be helpful for troubleshooting of application</p>
<p><strong>pgrep<br />
</strong># pgrep named<br />
586<br />
Something like ps -efl|grep -v grep|grep process_name|awk &#8216;{print $1}&#8217;<br />
# ps -e|grep -v grep|grep named|awk &#8216;{print $1}&#8217;<br />
586<br />
pkill<br />
# pgrep named<br />
628<br />
# pkill named<br />
# pgrep named<br />
636<br />
#<br />
As you see named daemon was killed and respawned (with new PID)</p>
<p><strong>pldd<br />
</strong># pldd 636<br />
636:    /usr/sbin/named<br />
/usr/lib/dns/liblwres.so.1.1.2<br />
/usr/lib/dns/libdns.so.16.0.0<br />
/usr/lib/dns/libisccfg.so.0.0.11<br />
/usr/sfw/lib/libcrypto.so.0.9.7<br />
/usr/lib/dns/libisccc.so.0.1.0<br />
/usr/lib/dns/libisc.so.7.1.5<br />
/lib/libnsl.so.1<br />
/lib/libsocket.so.1<br />
/lib/libscf.so.1<br />
/lib/libpthread.so.1<br />
/lib/libthread.so.1<br />
/lib/libc.so.1<br />
/lib/libdoor.so.1<br />
/lib/libuutil.so.1<br />
# ldd /usr/sbin/named<br />
liblwres.so.1 =&gt;         /usr/lib/dns/liblwres.so.1<br />
libdns.so.16 =&gt;  /usr/lib/dns/libdns.so.16<br />
libisccfg.so.0 =&gt;        /usr/lib/dns/libisccfg.so.0<br />
libcrypto.so.0.9.7 =&gt;    /usr/sfw/lib/libcrypto.so.0.9.7<br />
libisccc.so.0 =&gt;         /usr/lib/dns/libisccc.so.0<br />
libisc.so.7 =&gt;   /usr/lib/dns/libisc.so.7<br />
libnsl.so.1 =&gt;   /lib/libnsl.so.1<br />
libsocket.so.1 =&gt;        /lib/libsocket.so.1<br />
libscf.so.1 =&gt;   /lib/libscf.so.1<br />
libpthread.so.1 =&gt;       /lib/libpthread.so.1<br />
libthread.so.1 =&gt;        /lib/libthread.so.1<br />
libc.so.1 =&gt;     /lib/libc.so.1<br />
libmp.so.2 =&gt;    /lib/libmp.so.2<br />
libmd5.so.1 =&gt;   /lib/libmd5.so.1<br />
libdoor.so.1 =&gt;  /lib/libdoor.so.1<br />
libuutil.so.1 =&gt;         /lib/libuutil.so.1<br />
libm.so.2 =&gt;     /lib/libm.so.2<br />
Results from both commands are almost the same <img src='http://www.sunwfrk.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  Why? Ask SUN</p>
<p><strong>pmap<br />
</strong># pmap 636<br />
636:    /usr/sbin/named<br />
08046000       8K rw&#8212;-    [ stack ]<br />
08050000     232K r-x&#8211;  /usr/sbin/named<br />
08099000      16K rwx&#8211;  /usr/sbin/named<br />
0809D000     544K rwx&#8211;    [ heap ]<br />
D21ED000       4K rw&#8211;R    [ stack tid=4 ]<br />
D21F0000      64K rwx&#8211;    [ anon ]<br />
D2218000       4K rw&#8211;R    [ stack tid=3 ]<br />
D221B000       4K rwxs-    [ anon ]<br />
D2236000      16K rw&#8211;R    [ stack tid=2 ]<br />
D223C000      64K rw&#8212;-    [ anon ]<br />
D224E000      64K rw&#8212;-    [ anon ]<br />
D2260000      24K rwx&#8211;    [ anon ]<br />
D2270000       4K rwx&#8211;    [ anon ]<br />
D2280000      24K r-x&#8211;  /lib/libuutil.so.1<br />
D2296000       4K rw&#8212;-  /lib/libuutil.so.1<br />
D22A0000       4K r-x&#8211;  /lib/libdoor.so.1<br />
D22B1000       4K rw&#8212;-  /lib/libdoor.so.1<br />
D22C0000       4K rwx&#8211;    [ anon ]<br />
D22D0000     740K r-x&#8211;  /lib/libc.so.1<br />
D2399000      24K rw&#8212;-  /lib/libc.so.1<br />
D239F000       8K rw&#8212;-  /lib/libc.so.1<br />
D23B0000      16K r-x&#8211;  /lib/libthread.so.1<br />
D23C0000      12K r-x&#8211;  /lib/libpthread.so.1<br />
D23D0000      88K r-x&#8211;  /lib/libscf.so.1<br />
D23F6000       4K rw&#8212;-  /lib/libscf.so.1<br />
D2400000       4K rwx&#8211;    [ anon ]<br />
D2410000      44K r-x&#8211;  /lib/libsocket.so.1<br />
D242B000       4K rw&#8212;-  /lib/libsocket.so.1<br />
D2430000     512K r-x&#8211;  /lib/libnsl.so.1<br />
D24B0000      20K rw&#8212;-  /lib/libnsl.so.1<br />
D24B5000      32K rw&#8212;-  /lib/libnsl.so.1<br />
D24C0000     228K r-x&#8211;  /usr/lib/dns/libisc.so.7.1.5<br />
D2508000       8K rwx&#8211;  /usr/lib/dns/libisc.so.7.1.5<br />
D2510000      24K r-x&#8211;  /usr/lib/dns/libisccc.so.0.1.0<br />
D2525000       4K rwx&#8211;  /usr/lib/dns/libisccc.so.0.1.0<br />
D2530000       4K rwx&#8211;    [ anon ]<br />
D2540000     924K r-x&#8211;  /usr/sfw/lib/libcrypto.so.0.9.7<br />
D2637000      84K rw&#8212;-  /usr/sfw/lib/libcrypto.so.0.9.7<br />
D264C000       8K rw&#8212;-  /usr/sfw/lib/libcrypto.so.0.9.7<br />
D2650000      48K r-x&#8211;  /usr/lib/dns/libisccfg.so.0.0.11<br />
D266B000      12K rwx&#8211;  /usr/lib/dns/libisccfg.so.0.0.11<br />
D2670000    1024K r-x&#8211;  /usr/lib/dns/libdns.so.16.0.0<br />
D277F000      20K rwx&#8211;  /usr/lib/dns/libdns.so.16.0.0<br />
D2790000       4K rwx&#8211;    [ anon ]<br />
D27A0000      56K r-x&#8211;  /usr/lib/dns/liblwres.so.1.1.2<br />
D27BD000       4K rwx&#8211;  /usr/lib/dns/liblwres.so.1.1.2<br />
D27CA000     132K r-x&#8211;  /lib/ld.so.1<br />
D27FB000       4K rwx&#8211;  /lib/ld.so.1<br />
D27FC000       8K rwx&#8211;  /lib/ld.so.1<br />
total      5192K<br />
This command help on the process of fine tuning big applications, especially to resolve memory leak cases</p>
<p><strong>preap<br />
</strong># ps -efl|grep 551<br />
0 Z     root   551   550   0   0  -        -      0        -        &#8211; ?           0:00 &lt;defunct&gt;<br />
# preap 551<br />
551: exited with status 0<br />
# ps -efl|grep 551<br />
In above example this tool successfully remove zombie process. Otherwise the only way to kick them off is reboot</p>
<p><strong>prstat<br />
</strong># prstat<br />
PID USERNAME  SIZE   RSS STATE  PRI NICE      TIME  CPU PROCESS/NLWP<br />
744 root     4376K 4080K cpu0    39    0   0:00:00 0.4% prstat/1<br />
560 root     6988K 1944K sleep   59    0   0:00:01 0.1% sshd/1<br />
468 root       31M   13M sleep   59    0   0:00:04 0.1% Xorg/1<br />
550 root     9576K 6856K sleep   59    0   0:00:01 0.0% dtgreet/1<br />
577 root     1160K  892K sleep   59    0   0:00:00 0.0% ksh/1<br />
366 root     3476K 2472K sleep   59    0   0:00:00 0.0% nscd/27<br />
699 root     6984K 1948K sleep   59    0   0:00:00 0.0% sshd/1<br />
506 root     6672K 4776K sleep   59    0   0:00:00 0.0% snmpd/1<br />
476 root     2724K 1552K sleep   59    0   0:00:00 0.0% dmispd/1<br />
481 root     3268K 1964K sleep   59    0   0:00:00 0.0% snmpXdmid/2<br />
532 root     2492K 1928K sleep   59    0   0:00:00 0.0% vold/5<br />
538 root     2352K 1564K sleep   59    0   0:00:00 0.0% devfsadm/6<br />
457 root     4448K 1668K sleep   59    0   0:00:00 0.0% dtlogin/1<br />
458 root     2040K 1240K sleep   59    0   0:00:00 0.0% snmpdx/1<br />
466 root     1468K  724K sleep   59    0   0:00:00 0.0% fbconsole/1<br />
413 root     1700K  700K sleep   59    0   0:00:00 0.0% smcboot/1<br />
562 root     1076K  824K sleep   59    0   0:00:00 0.0% sh/1<br />
412 root     1700K  700K sleep   59    0   0:00:00 0.0% smcboot/1<br />
356 root     3336K 1176K sleep   59    0   0:00:00 0.0% sshd/1<br />
533 root     7480K 2860K sleep   59    0   0:00:00 0.0% dtlogin/1<br />
411 root     1704K 1032K sleep   59    0   0:00:00 0.0% smcboot/1<br />
263 root     1064K  620K sleep   59    0   0:00:00 0.0% utmpd/1<br />
359 root     4400K 2212K sleep   59    0   0:00:00 0.0% syslogd/16<br />
261 root     3936K 3004K sleep   59    0   0:00:02 0.0% inetd/4<br />
264 root     1888K 1084K sleep   59    0   0:00:00 0.0% ttymon/1<br />
241 daemon   2340K 1520K sleep   59    0   0:00:00 0.0% statd/1<br />
122 root     1328K  904K sleep   59    0   0:00:00 0.0% powerd/3<br />
202 root     2228K  884K sleep   59    0   0:00:00 0.0% cron/1<br />
96 root     2128K 1288K sleep   59    0   0:00:00 0.0% syseventd/14<br />
554 root     7200K 3664K sleep   59    0   0:00:00 0.0% sshd/1<br />
361 root     9272K 5640K sleep   59    0   0:00:00 0.0% fmd/14<br />
244 daemon   2072K 1312K sleep   60  -20   0:00:00 0.0% lockd/2<br />
55 root     1952K  924K sleep   59    0   0:00:00 0.0% dhcpagent/1<br />
253 root     1700K  892K sleep   59    0   0:00:00 0.0% sac/1<br />
232 daemon   2288K 1012K sleep   59    0   0:00:00 0.0% rpcbind/1<br />
123 daemon   3908K 2016K sleep   59    0   0:00:00 0.0% kcfd/3<br />
117 root     2468K 1544K sleep   59    0   0:00:00 0.0% picld/4<br />
339 root     4252K 1592K sleep   59    0   0:00:00 0.0% automountd/3<br />
175 root     1852K  952K sleep   59    0   0:00:00 0.0% in.routed/1<br />
9 root     9000K 8068K sleep   59    0   0:00:11 0.0% svc.configd/18<br />
7 root     8888K 7940K sleep   59    0   0:00:05 0.0% svc.startd/13<br />
260 root     1948K 1168K sleep   59    0   0:00:00 0.0% ttymon/1<br />
The program in default view is less informative that top, but can give you info for zones, projects and ever for processes bind to specific processor<br />
prun &#8211; see example of pstop</p>
<p><strong>ps<br />
</strong># /usr/bin/ps<br />
PID TTY         TIME CMD<br />
562 pts/2       0:00 sh<br />
577 pts/2       0:00 ksh<br />
757 pts/2       0:00 ps<br />
# /usr/ucb/ps<br />
PID TT       S  TIME COMMAND<br />
260 console  S  0:00 /usr/lib/saf/ttymon -g -d /dev/console -l console -T sun-color -m ldterm,ttcompat -h -p unknown console lo<br />
562 pts/2    S  0:00 -sh<br />
577 pts/2    S  0:00 ksh -o ksh<br />
759 pts/2    O  0:00 /usr/ucb/ps<br />
701 pts/3    S  0:00 -sh</p>
<p><strong>psig<br />
</strong># psig 636<br />
636:    /usr/sbin/named<br />
HUP     default<br />
INT     default<br />
QUIT    default<br />
ILL     default<br />
TRAP    default<br />
ABRT    default<br />
EMT     default<br />
FPE     default<br />
KILL    default<br />
BUS     default<br />
SEGV    default<br />
SYS     default<br />
PIPE    ignored<br />
ALRM    default<br />
TERM    default<br />
USR1    default<br />
USR2    default<br />
CLD     default                 NOCLDSTOP<br />
PWR     default<br />
WINCH   default<br />
URG     default<br />
POLL    default<br />
STOP    default<br />
TSTP    ignored<br />
CONT    default<br />
TTIN    ignored<br />
TTOU    ignored<br />
VTALRM  default<br />
PROF    default<br />
XCPU    default<br />
XFSZ    ignored<br />
WAITING default<br />
LWP     default<br />
FREEZE  default<br />
THAW    default<br />
CANCEL  default<br />
LOST    default<br />
XRES    default<br />
JVM1    default<br />
JVM2    default<br />
RTMIN   default<br />
RTMIN+1 default<br />
RTMIN+2 default<br />
RTMIN+3 default<br />
RTMAX-3 default<br />
RTMAX-2 default<br />
RTMAX-1 default<br />
RTMAX   default</p>
<p><strong>pstack<br />
</strong># pstack 636<br />
636:    /usr/sbin/named<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-  lwp# 1 / thread# 1  &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
d23700a5 sigtimedwait (8047ce0, 8047cf0, 0)<br />
d23655a6 sigwait  (8047dc0) + 1c<br />
d235e206 __posix_sigwait (8047dc0, 8047e60) + 2e<br />
d24db3dd isc_app_run (8047ec8, 8047e60, d27fb840, 0, 8047e98, 805c33e) + 158<br />
08066da7 main     (1, 8047ea4, 8047eac) + fe<br />
0805c33e ???????? (1, 8047f30, 0, 8047f40, 8047f47, 8047f5f)<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-  lwp# 2 / thread# 2  &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
d236fc99 lwp_park (0, 0, 0)<br />
d236a501 cond_wait_queue (80a2a7c, 80a2a48, 0, 0) + 3b<br />
d236a9fa _cond_wait (80a2a7c, 80a2a48) + 66<br />
d236aa3c cond_wait (80a2a7c, 80a2a48) + 21<br />
d236aa75 pthread_cond_wait (80a2a7c, 80a2a48) + 1b<br />
d24d871b dispatch (80a2a40, d2239fec, d236f93e, 80a2a40, 0, 0) + a0<br />
d24d8ba2 run      (80a2a40) + c<br />
d236f93e _thr_setup (d2262400) + 4e<br />
d236fc20 _lwp_start (d2262400, 0, 0, d2239ff8, d236fc20, d2262400)<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-  lwp# 3 / thread# 3  &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
d236fc99 lwp_park (0, d2218ec8, 0)<br />
d236a501 cond_wait_queue (80a2ae8, 80a2ab8, d2218ec8, 0) + 3b<br />
d236a8a1 cond_wait_common (80a2ae8, 80a2ab8, d2218ec8) + 1df<br />
d236aad5 _cond_timedwait (80a2ae8, 80a2ab8, d2218f28) + 51<br />
d236ab40 cond_timedwait (80a2ae8, 80a2ab8, d2218f28) + 24<br />
d236ab7c pthread_cond_timedwait (80a2ae8, 80a2ab8, d2218f28) + 1e<br />
d24e7601 isc_condition_waituntil (80a2ae8, 80a2ab8, 80a2ae0) + 81<br />
d24da800 run      (80a2ab0) + a2<br />
d236f93e _thr_setup (d21f0000) + 4e<br />
d236fc20 _lwp_start (d21f0000, 0, 0, d2218ff8, d236fc20, d21f0000)<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-  lwp# 4 / thread# 4  &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
d2370cd5 pollsys  (d21edce0, 6, 0, 0)<br />
d231ecca pselect  (1c, d21ede40, d21edec0, d239a868, 0, 0) + 18e<br />
d231efad select   (1c, d21ede40, d21edec0, 0, 0) + 6f<br />
d24e355c watcher  (80a5bd0) + bd<br />
d236f93e _thr_setup (d21f0400) + 4e<br />
d236fc20 _lwp_start (d21f0400, 0, 0, d21edff8, d236fc20, d21f0400)<br />
This command can be sometime very helpful in process of debugging some daemons. You can see functions by thread<br />
pstop<br />
# ps -efl|grep ssh<br />
0 S     root   554   356   0  40 20 d419b870   1800 d4c87e72 21:03:52 ?           0:00 /usr/lib/ssh/sshd<br />
0 S     root   356     1   0  40 20 d4195320    834 d49f3432 21:02:46 ?           0:00 /usr/lib/ssh/sshd<br />
0 S     root   560   554   0  40 20 d41931a0   1747 d4c87ab2 21:05:03 ?           0:02 /usr/lib/ssh/sshd<br />
0 S     root   812   809   0  40 20 d418a270   1746 d50402f2 22:09:00 ?           0:00 /usr/lib/ssh/sshd<br />
0 S     root   809   356   0  40 20 d4189a10   1801 d4c874f2 22:08:47 ?           0:00 /usr/lib/ssh/sshd<br />
# pstop 356<br />
# ssh localhost<br />
(here i stop with ctrl-C ssh client after 5 minutes of waiting)<br />
# prun 356<br />
# ssh localhost<br />
The authenticity of host &#8216;localhost (127.0.0.1)&#8217; can&#8217;t be established.<br />
RSA key fingerprint is da:14:db:bc:2f:e0:0f:ef:f6:3f:12:0e:f4:77:0c:00.<br />
Are you sure you want to continue connecting (yes/no)? yes<br />
Warning: Permanently added &#8216;localhost&#8217; (RSA) to the list of known hosts.<br />
Password:<br />
Last login: Wed Jun 13 22:09:00 2007 from gateway<br />
Sun Microsystems Inc.   SunOS 5.10      Generic January 2005<br />
#<br />
Command is interest, but i see no so much reason of usage in daily tasks</p>
<p><strong>ptree<br />
</strong># ptree<br />
7     /lib/svc/bin/svc.startd<br />
253   /usr/lib/saf/sac -t 300<br />
264   /usr/lib/saf/ttymon<br />
260   /usr/lib/saf/ttymon -g -d /dev/console -l console -T sun-color -m ldterm,ttcomp<br />
9     /lib/svc/bin/svc.configd<br />
55    /sbin/dhcpagent<br />
96    /usr/lib/sysevent/syseventd<br />
117   /usr/lib/picl/picld<br />
122   /usr/lib/power/powerd<br />
123   /usr/lib/crypto/kcfd<br />
175   /usr/sbin/in.routed<br />
202   /usr/sbin/cron<br />
232   /usr/sbin/rpcbind<br />
241   /usr/lib/nfs/statd<br />
244   /usr/lib/nfs/lockd<br />
261   /usr/lib/inet/inetd start<br />
263   /usr/lib/utmpd<br />
339   /usr/lib/autofs/automountd<br />
356   /usr/lib/ssh/sshd<br />
554   /usr/lib/ssh/sshd<br />
560   /usr/lib/ssh/sshd<br />
562   -sh<br />
577   ksh -o vi<br />
771   ptree<br />
696   /usr/lib/ssh/sshd<br />
699   /usr/lib/ssh/sshd<br />
701   -sh<br />
359   /usr/sbin/syslogd<br />
361   /usr/lib/fm/fmd/fmd<br />
366   /usr/sbin/nscd<br />
411   /usr/sadm/lib/smc/bin/smcboot<br />
412   /usr/sadm/lib/smc/bin/smcboot<br />
413   /usr/sadm/lib/smc/bin/smcboot<br />
457   /usr/dt/bin/dtlogin -daemon<br />
466   /usr/openwin/bin/fbconsole -n -d :0<br />
468   /usr/X11/bin/Xorg :0 -depth 24 -nobanner -auth /var/dt/A:0-Zgai5a<br />
533   /usr/dt/bin/dtlogin -daemon<br />
550   dtgreet -display :0<br />
458   /usr/lib/snmp/snmpdx -y -c /etc/snmp/conf<br />
476   /usr/lib/dmi/dmispd<br />
481   /usr/lib/dmi/snmpXdmid -s unknown<br />
506   /usr/sfw/sbin/snmpd<br />
532   /usr/sbin/vold -f /etc/vold.conf<br />
538   devfsadmd<br />
636   /usr/sbin/named<br />
Not need much comments <img src='http://www.sunwfrk.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p><strong>pwait<br />
</strong># ps -efl|grep name<br />
0 S     root   875     1   0  45 20 d4188950   1298 d553ab16 22:17:58 ?           0:00 /usr/sbin/named<br />
# pwait 875<br />
(in this moment form other terminal i execute svcadm disable dns/server)<br />
#<br />
Maybe this command will be great in some specific scripts</p>
<p><strong>pwdx<br />
</strong># pwdx 636<br />
636:    /var/named<br />
Can be helpful in case of strange errors when unmount some filesystem</p>
<p><strong>truss<br />
</strong># truss ls<br />
execve(&#8220;/usr/bin/ls&#8221;, 0&#215;08047E40, 0&#215;08047E48)  argc = 1<br />
resolvepath(&#8220;/usr/lib/ld.so.1&#8243;, &#8220;/lib/ld.so.1&#8243;, 1023) = 12<br />
resolvepath(&#8220;/usr/bin/ls&#8221;, &#8220;/usr/bin/ls&#8221;, 1023) = 11<br />
sysconfig(_CONFIG_PAGESIZE)                     = 4096<br />
xstat(2, &#8220;/usr/bin/ls&#8221;, 0&#215;08047C38)             = 0<br />
open(&#8220;/var/ld/ld.config&#8221;, O_RDONLY)             Err#2 ENOENT<br />
xstat(2, &#8220;/lib/libsec.so.1&#8243;, 0&#215;080474D0)        = 0<br />
resolvepath(&#8220;/lib/libsec.so.1&#8243;, &#8220;/lib/libsec.so.1&#8243;, 1023) = 16<br />
open(&#8220;/lib/libsec.so.1&#8243;, O_RDONLY)              = 3<br />
mmap(0&#215;00010000, 4096, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_ALIGN, 3, 0) = 0xD27C0000<br />
mmap(0&#215;00010000, 139264, PROT_NONE, MAP_PRIVATE|MAP_NORESERVE|MAP_ANON|MAP_ALIGN, -1, 0) = 0xD2790000<br />
mmap(0xD2790000, 49071, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_TEXT, 3, 0) = 0xD2790000<br />
mmap(0xD27AC000, 12169, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_INITDATA, 3, 49152) = 0xD27AC000<br />
mmap(0xD27AF000, 8536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANON, -1, 0) = 0xD27AF000<br />
munmap(0xD279C000, 65536)                       = 0<br />
memcntl(0xD2790000, 8776, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0<br />
close(3)                                        = 0</p>
<p>mmap(0&#215;00000000, 4096, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANON, -1, 0) = 0xD2780000<br />
xstat(2, &#8220;/lib/libc.so.1&#8243;, 0&#215;080474D0)          = 0<br />
resolvepath(&#8220;/lib/libc.so.1&#8243;, &#8220;/lib/libc.so.1&#8243;, 1023) = 14<br />
open(&#8220;/lib/libc.so.1&#8243;, O_RDONLY)                = 3<br />
mmap(0xD27C0000, 4096, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xD27C0000<br />
mmap(0&#215;00010000, 856064, PROT_NONE, MAP_PRIVATE|MAP_NORESERVE|MAP_ANON|MAP_ALIGN, -1, 0) = 0xD26A0000<br />
mmap(0xD26A0000, 754581, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_TEXT, 3, 0) = 0xD26A0000<br />
mmap(0xD2769000, 24239, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_INITDATA, 3, 757760) = 0xD2769000<br />
mmap(0xD276F000, 5656, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANON, -1, 0) = 0xD276F000<br />
munmap(0xD2759000, 65536)                       = 0<br />
memcntl(0xD26A0000, 120300, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0<br />
close(3)                                        = 0<br />
xstat(2, &#8220;/lib/libavl.so.1&#8243;, 0&#215;080474D0)        = 0<br />
resolvepath(&#8220;/lib/libavl.so.1&#8243;, &#8220;/lib/libavl.so.1&#8243;, 1023) = 16<br />
open(&#8220;/lib/libavl.so.1&#8243;, O_RDONLY)              = 3<br />
mmap(0xD27C0000, 4096, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xD27C0000<br />
mmap(0&#215;00010000, 73728, PROT_NONE, MAP_PRIVATE|MAP_NORESERVE|MAP_ANON|MAP_ALIGN, -1, 0) = 0xD2680000<br />
mmap(0xD2680000, 2788, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_TEXT, 3, 0) = 0xD2680000<br />
mmap(0xD2691000, 204, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_INITDATA, 3, 4096) = 0xD2691000<br />
munmap(0xD2681000, 65536)                       = 0<br />
memcntl(0xD2680000, 1056, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0<br />
close(3)                                        = 0<br />
munmap(0xD27C0000, 4096)                        = 0<br />
mmap(0&#215;00010000, 24576, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANON|MAP_ALIGN, -1, 0) = 0xD27C0000<br />
getcontext(0&#215;080479D0)<br />
getrlimit(RLIMIT_STACK, 0&#215;080479C8)             = 0<br />
getpid()                                        = 786 [785]<br />
lwp_private(0, 1, 0xD27C2000)                   = 0&#215;000001C3<br />
setustack(0xD27C2060)<br />
sysi86(SI86FPSTART, 0xD276FCD8, 0&#215;0000133F, 0&#215;00001F80) = 0&#215;00000001<br />
brk(0&#215;080651E8)                                 = 0<br />
brk(0&#215;080671E8)                                 = 0<br />
time()                                          = 1181761288<br />
ioctl(1, TCGETA, 0&#215;08047B9C)                    = 0<br />
ioctl(1, TIOCGWINSZ, 0&#215;08064460)                = 0<br />
brk(0&#215;080671E8)                                 = 0<br />
brk(0&#215;080711E8)                                 = 0<br />
lstat64(&#8220;.&#8221;, 0&#215;08046A70)                        = 0<br />
openat(-3041965, &#8220;.&#8221;, O_RDONLY|O_NDELAY|O_LARGEFILE) = 3<br />
fcntl(3, F_SETFD, 0&#215;00000001)                   = 0<br />
fstat64(3, 0&#215;08047AC0)                          = 0<br />
getdents64(3, 0xD27C4000, 8192)                 = 992<br />
getdents64(3, 0xD27C4000, 8192)                 = 0<br />
close(3)                                        = 0<br />
ioctl(1, TCGETA, 0&#215;08045E44)                    = 0<br />
fstat64(1, 0&#215;08045DB0)                          = 0<br />
TT_DB       cdrom       etc         kernel      mnt         platform    system      var<br />
write(1, &#8221; T T _ D B              &#8220;.., 88)      = 88<br />
bin         dev         export      lib         net         proc        tmp         vol<br />
write(1, &#8221; b i n                  &#8220;.., 88)      = 88<br />
boot        devices     home        lost+found  opt         sbin        usr<br />
write(1, &#8221; b o o t                &#8220;.., 76)      = 76<br />
_exit(0)<br />
Show you system calls done by command and you can see parameters of the function, very good for program execution traces</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunwfrk.com/blog/2009/03/04/process_management/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
