<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Mondo Nefasto</title>
	<atom:link href="http://richizo.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://richizo.wordpress.com</link>
	<description>Just another gëëk weblog</description>
	<lastBuildDate>Tue, 03 Mar 2009 23:10:55 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='richizo.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/802dcd67b97fd34d3cba2edf3ee8305a?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Mondo Nefasto</title>
		<link>http://richizo.wordpress.com</link>
	</image>
			<item>
		<title>Boosting your Kernel on Gentoo</title>
		<link>http://richizo.wordpress.com/2009/03/03/boosting-your-kernel-on-gentoo/</link>
		<comments>http://richizo.wordpress.com/2009/03/03/boosting-your-kernel-on-gentoo/#comments</comments>
		<pubDate>Tue, 03 Mar 2009 23:10:55 +0000</pubDate>
		<dc:creator>richizo</dc:creator>
				<category><![CDATA[Gentoo]]></category>
		<category><![CDATA[compiling kernel with icc]]></category>
		<category><![CDATA[icc]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[linuxdna]]></category>
		<category><![CDATA[optimizing kernel on gentoo]]></category>

		<guid isPermaLink="false">http://richizo.wordpress.com/?p=226</guid>
		<description><![CDATA[Everybody knows that Gentoo is a performance-architeture-oriented Linux. You can optimize your entire system changing the compiler (gcc) flags to attend the hardware specificities.
Example: I have a Sony VAIO with Intel Core 2 Duo processor, then I can use this flags on my make.conf (I unmasked sys-devel/gcc to use gcc-4.3.3 that have native support to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=richizo.wordpress.com&blog=4322475&post=226&subd=richizo&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Everybody knows that <a href="http://www.gentoo.org/" target="_blank">Gentoo</a> is a <em>performance-architeture-oriented</em> Linux. You can optimize your entire system changing the compiler (<em>gcc</em>) flags to attend the hardware specificities.</p>
<p>Example: I have a Sony VAIO with <strong>Intel Core 2 Duo</strong> processor, then I can use this flags on my <strong>make.conf</strong> (I unmasked <em>sys-devel/gcc</em> to use <strong>gcc-4.3.3</strong> that have native support to <em>core2</em> technology)</p>
<pre>CFLAGS="-O3 -march=core2 -pipe -fomit-frame-pointer -mfpmath=sse -mmmx -msse -msse2 -msse3 -mssse3"</pre>
<p>Then, all binaries in your system will be optimized&#8230;but and the kernel ???</p>
<p>Well, when you compile the kernel it uses itself compiler flags. And how to optimize it ?</p>
<p>Good news to you&#8230;If you have a Intel processor and use <em>Gentoo</em> Linux in your machine you are a lucky man. You must know the <a href="http://www.linuxdna.com/" target="_blank"><strong><span style="color:#cc99ff;">LinuxDNA</span></strong></a> project. The idea of the project is optimize the kernel to Intel architecture using the <a href="http://www.intel.com/cd/software/products/asmo-na/eng/compilers/clin/277618.htm" target="_blank">icc</a> (<strong>Intel Compiler</strong>).</p>
<p>Currently, I&#8217;m working on  Gentoo <em>ebuild</em> to <strong>linuxdna</strong> package. You&#8217;ll have more news about it soon&#8230;</p>
<p><img class="aligncenter size-full wp-image-228" title="larry" src="http://richizo.files.wordpress.com/2009/03/larry.png?w=80&#038;h=80" alt="larry" width="80" height="80" /></p>
Posted in Gentoo Tagged: compiling kernel with icc, Gentoo, icc, kernel, Linux, linuxdna, optimizing kernel on gentoo <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/richizo.wordpress.com/226/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/richizo.wordpress.com/226/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/richizo.wordpress.com/226/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/richizo.wordpress.com/226/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/richizo.wordpress.com/226/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/richizo.wordpress.com/226/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/richizo.wordpress.com/226/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/richizo.wordpress.com/226/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/richizo.wordpress.com/226/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/richizo.wordpress.com/226/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=richizo.wordpress.com&blog=4322475&post=226&subd=richizo&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://richizo.wordpress.com/2009/03/03/boosting-your-kernel-on-gentoo/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8e44ea854fd251d929394d6b80e9d2fa?s=96&#38;d=identicon" medium="image">
			<media:title type="html">richizo</media:title>
		</media:content>

		<media:content url="http://richizo.files.wordpress.com/2009/03/larry.png" medium="image">
			<media:title type="html">larry</media:title>
		</media:content>
	</item>
		<item>
		<title>Memory Debugging on (Open)Solaris</title>
		<link>http://richizo.wordpress.com/2009/03/02/memory-debugging-on-opensolaris/</link>
		<comments>http://richizo.wordpress.com/2009/03/02/memory-debugging-on-opensolaris/#comments</comments>
		<pubDate>Tue, 03 Mar 2009 00:56:47 +0000</pubDate>
		<dc:creator>richizo</dc:creator>
				<category><![CDATA[OpenSolaris]]></category>
		<category><![CDATA[finding memory leak on solaris]]></category>
		<category><![CDATA[memory debuggin solaris]]></category>
		<category><![CDATA[memory debugging opensolaris]]></category>
		<category><![CDATA[memory leak]]></category>
		<category><![CDATA[memory leak solaris]]></category>
		<category><![CDATA[solaris]]></category>

		<guid isPermaLink="false">http://richizo.wordpress.com/?p=214</guid>
		<description><![CDATA[We know there are many commercial tools to debug memory on Solaris systems as Dynamic Suite and Purify. But I prefer to use open source tools always it is possible.
Well, Linux has many open source tools and the best in my opinion is Valgrind, but Valgrind will not be ported to sparc architecture as well [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=richizo.wordpress.com&blog=4322475&post=214&subd=richizo&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>We know there are many commercial tools to debug memory on Solaris systems as <a href="http://www.dynamic-memory.com/" target="_blank">Dynamic Suite</a> and <a href="http://www-01.ibm.com/software/awdtools/purify/" target="_blank">Purify</a>. But I prefer to use <strong>open source</strong> tools always it is possible.</p>
<p>Well, Linux has many open source tools and the best in my opinion is <a href="http://valgrind.org/" target="_blank">Valgrind</a>, but Valgrind <a href="http://valgrind.org/gallery/survey_03/q7.html" target="_blank">will not be ported</a> to sparc architecture as well to (open)solaris. Then, what tool I should use ?</p>
<p>(Open)Solaris has useful tools to debug memory, the most known is <strong>DTrace</strong>, but I&#8217;ll talk of two important and easiest tools to use: <a href="http://docs.sun.com/app/docs/doc/816-5173/libumem-3lib?a=view" target="_blank">libumem</a> and <a href="http://docs.sun.com/app/docs/doc/806-0627/6j9vhfnas?a=view" target="_blank">watchmalloc</a> (equivalent to <em>MALLOC_CHECK</em> from linux).</p>
<h3><span style="color:#ff0000;"><span style="text-decoration:underline;"><strong>Using libumem</strong></span></span></h3>
<p>It&#8217;s not need to recompile your application. The library is loaded dynamically by <em>LD_PRELOAD</em> environment variable.</p>
<ul>
<li>Prepare your environment</li>
</ul>
<pre style="padding-left:30px;">$ setenv UMEM_DEBUG default</pre>
<pre style="padding-left:30px;">$ setenv UMEM_LOGGING transaction</pre>
<pre style="padding-left:30px;">$ setenv LD_PRELOAD libumem.so.1</pre>
<ul>
<li>Run the application normally</li>
</ul>
<pre style="padding-left:30px;"> $ ./myapp</pre>
<ul>
<li>After the program has passed by all fluxes, generate a core to analyze with <strong>mdb</strong></li>
</ul>
<pre style="padding-left:30px;">$ gcore `pgrep myapp`</pre>
<ul>
<li><strong>mdb</strong> means <a href="http://docsun.cites.uiuc.edu/sun_docs/C/solaris_9/SUNWdev/MODDEBUG/toc.html" target="_blank"><em>Solaris Modular Debugger</em></a></li>
</ul>
<pre style="padding-left:30px;">$ mdb myapp core.pid</pre>
<ul>
<li>With <strong>mdb</strong> opened, just run a simple command (<em>findleaks</em>):</li>
</ul>
<pre style="padding-left:30px;">&gt; ::findleaks -dvf
CACHE     LEAKED   BUFCTL CALLER
0014f12f       1 00067000 libumem.so.1`malloc+0x0
----------------------------------------------------------------------
 Total       1 buffer, 48 bytes</pre>
<h3><span style="color:#ff0000;"><strong><span style="text-decoration:underline;">Using watchmalloc</span></strong></span></h3>
<p><strong>Watchmalloc</strong> is the linux equivalent to <em>MALLOC_CHECK</em>. The use is most simple than <em>libumem</em>. See it:</p>
<ul>
<li>Prepare your environment</li>
</ul>
<pre style="padding-left:30px;">$ setenv MALLOC_DEBUG=WATCH,RW</pre>
<pre style="padding-left:30px;">$ setenv LD_PRELOAD watchmalloc.so.1</pre>
<ul>
<li>Run the application normally</li>
</ul>
<pre style="padding-left:30px;">$ ./myapp</pre>
<ul>
<li>When a leakage happens the program will generate a core dumped and will be possibly to analyze with <strong>gdb</strong>.</li>
</ul>
<p><img class="aligncenter size-full wp-image-221" title="bug" src="http://richizo.files.wordpress.com/2009/03/bug.png?w=100&#038;h=100" alt="bug" width="100" height="100" /></p>
Posted in OpenSolaris Tagged: finding memory leak on solaris, memory debuggin solaris, memory debugging opensolaris, memory leak, memory leak solaris, OpenSolaris, solaris <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/richizo.wordpress.com/214/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/richizo.wordpress.com/214/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/richizo.wordpress.com/214/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/richizo.wordpress.com/214/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/richizo.wordpress.com/214/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/richizo.wordpress.com/214/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/richizo.wordpress.com/214/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/richizo.wordpress.com/214/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/richizo.wordpress.com/214/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/richizo.wordpress.com/214/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=richizo.wordpress.com&blog=4322475&post=214&subd=richizo&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://richizo.wordpress.com/2009/03/02/memory-debugging-on-opensolaris/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8e44ea854fd251d929394d6b80e9d2fa?s=96&#38;d=identicon" medium="image">
			<media:title type="html">richizo</media:title>
		</media:content>

		<media:content url="http://richizo.files.wordpress.com/2009/03/bug.png" medium="image">
			<media:title type="html">bug</media:title>
		</media:content>
	</item>
		<item>
		<title>Brazilian Planet OpenSolaris</title>
		<link>http://richizo.wordpress.com/2009/02/18/brazilian-planet-opensolaris/</link>
		<comments>http://richizo.wordpress.com/2009/02/18/brazilian-planet-opensolaris/#comments</comments>
		<pubDate>Thu, 19 Feb 2009 01:07:11 +0000</pubDate>
		<dc:creator>richizo</dc:creator>
				<category><![CDATA[OpenSolaris]]></category>
		<category><![CDATA[brazilian planet opensolaris]]></category>
		<category><![CDATA[planet opensolaris in pt_br]]></category>

		<guid isPermaLink="false">http://richizo.wordpress.com/?p=206</guid>
		<description><![CDATA[Born Planet OpenSolaris in PT_BR !!!
Posted in OpenSolaris Tagged: brazilian planet opensolaris, OpenSolaris, planet opensolaris in pt_br      <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=richizo.wordpress.com&blog=4322475&post=206&subd=richizo&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Born <strong>Planet OpenSolaris</strong> in <strong>PT_BR</strong> !!!</p>
<div id="attachment_208" class="wp-caption aligncenter" style="width: 172px"><a href="http://planet.opensolaris.org/pt_BR/"><img class="size-full wp-image-208" title="posbr1" src="http://richizo.files.wordpress.com/2009/02/posbr1.png?w=162&#038;h=73" alt="Planet OpenSolaris BR" width="162" height="73" /></a><p class="wp-caption-text">Planet OpenSolaris BR</p></div>
Posted in OpenSolaris Tagged: brazilian planet opensolaris, OpenSolaris, planet opensolaris in pt_br <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/richizo.wordpress.com/206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/richizo.wordpress.com/206/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/richizo.wordpress.com/206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/richizo.wordpress.com/206/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/richizo.wordpress.com/206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/richizo.wordpress.com/206/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/richizo.wordpress.com/206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/richizo.wordpress.com/206/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/richizo.wordpress.com/206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/richizo.wordpress.com/206/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=richizo.wordpress.com&blog=4322475&post=206&subd=richizo&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://richizo.wordpress.com/2009/02/18/brazilian-planet-opensolaris/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8e44ea854fd251d929394d6b80e9d2fa?s=96&#38;d=identicon" medium="image">
			<media:title type="html">richizo</media:title>
		</media:content>

		<media:content url="http://richizo.files.wordpress.com/2009/02/posbr1.png" medium="image">
			<media:title type="html">posbr1</media:title>
		</media:content>
	</item>
		<item>
		<title>Setting keyboard on XWindow</title>
		<link>http://richizo.wordpress.com/2009/02/14/setting-keyboard-on-xwindow/</link>
		<comments>http://richizo.wordpress.com/2009/02/14/setting-keyboard-on-xwindow/#comments</comments>
		<pubDate>Sat, 14 Feb 2009 11:33:00 +0000</pubDate>
		<dc:creator>richizo</dc:creator>
				<category><![CDATA[X11]]></category>
		<category><![CDATA[keyboard layout]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[setting keyboard layout on XWindow]]></category>
		<category><![CDATA[setxkbmap]]></category>

		<guid isPermaLink="false">http://richizo.wordpress.com/?p=194</guid>
		<description><![CDATA[It&#8217;s a little tip showing how you can change your keyboard layout on X11 when you are not root and you cannot use the console (when you are able to use the console, you can use yourself X11 config file through the startx command).
Well, forget KDE, GNOME and modern X11 clients. Think you are using [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=richizo.wordpress.com&blog=4322475&post=194&subd=richizo&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>It&#8217;s a little tip showing how you can change your keyboard layout on X11 when you are not <strong>root</strong> and you cannot use the console (when you are able to use the console, you can use yourself X11 config file through the <strong>startx</strong> command).</p>
<p>Well, forget <em>KDE, GNOME</em> and modern X11 clients. Think you are using a simple client as <em>Fluxbox</em> and <em>OpenBox</em>&#8230;How do you can change your keyboard layout ?</p>
<p>It&#8217;s simple&#8230;use <em>setxkbmap</em>. In my case (I have a Sony Vaio with Spanish layout):</p>
<pre style="padding-left:30px;"><strong>setxkbmap es</strong></pre>
<p><em>My two cents</em> <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
Posted in X11 Tagged: keyboard layout, Linux, setting keyboard layout on XWindow, setxkbmap, X11 <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/richizo.wordpress.com/194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/richizo.wordpress.com/194/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/richizo.wordpress.com/194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/richizo.wordpress.com/194/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/richizo.wordpress.com/194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/richizo.wordpress.com/194/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/richizo.wordpress.com/194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/richizo.wordpress.com/194/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/richizo.wordpress.com/194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/richizo.wordpress.com/194/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=richizo.wordpress.com&blog=4322475&post=194&subd=richizo&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://richizo.wordpress.com/2009/02/14/setting-keyboard-on-xwindow/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8e44ea854fd251d929394d6b80e9d2fa?s=96&#38;d=identicon" medium="image">
			<media:title type="html">richizo</media:title>
		</media:content>
	</item>
		<item>
		<title>Listing Shared Memory Segments in C</title>
		<link>http://richizo.wordpress.com/2009/02/11/listing-shared-memory-segments-in-c/</link>
		<comments>http://richizo.wordpress.com/2009/02/11/listing-shared-memory-segments-in-c/#comments</comments>
		<pubDate>Thu, 12 Feb 2009 00:08:20 +0000</pubDate>
		<dc:creator>richizo</dc:creator>
				<category><![CDATA[OpenSolaris]]></category>
		<category><![CDATA[C]]></category>
		<category><![CDATA[ipc]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[listing shared memory segments on Solaris]]></category>
		<category><![CDATA[shared memory]]></category>
		<category><![CDATA[shared memory on solaris]]></category>

		<guid isPermaLink="false">http://richizo.wordpress.com/?p=189</guid>
		<description><![CDATA[In this week I had to write a little code to remove all IPC Shared Memory segments that were created by one process.
I had already done it on Linux and *BSD systems, but never on (Open)Solaris. Then, I tried to search (googling) some method to do it but without successful.
Linux and *BSD&#8217;s have a syscall [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=richizo.wordpress.com&blog=4322475&post=189&subd=richizo&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>In this week I had to write a little code to remove all <strong><span style="text-decoration:underline;">IPC Shared Memory</span></strong> segments that were created by one process.</p>
<p>I had already done it on <em>Linux</em> and <em>*BSD</em> systems, but never on <em>(Open)Solaris</em>. Then, I tried to search (<em>googling</em>) some method to do it but without successful.</p>
<p>Linux and *BSD&#8217;s have a syscall named <strong>sysctl()</strong> to interface it, but sunos kernel has not.</p>
<p>Well, after some minutes breaking my brain, I discover a <em>syscall</em> easiest to use than <em>sysctl</em>&#8230;look the code below:</p>
<pre>#include &lt;stdlib.h&gt;
#include &lt;sys/types.h&gt;
#include &lt;sys/ipc.h&gt;
#include &lt;sys/shm.h&gt;
void show_shm (void)
{
  int i;
  int     *buf;
  uint_t  nids;
  uint_t  pnids;
  for (;;)
  {
    if (shmids(buf, nids, &amp;pnids) != 0)
      exit(1);
    if (pnids &lt;= nids)
      break;
    buf = realloc(buf, (nids = pnids) * sizeof (int));
  }
  for (i = 0; i &lt; pnids; i++)
    printf ("%dn", buf[i]);
}

<img class="aligncenter size-full wp-image-190" title="link2_os_blk_125" src="http://richizo.files.wordpress.com/2009/02/link2_os_blk_125.gif?w=125&#038;h=125" alt="link2_os_blk_125" width="125" height="125" /></pre>
Posted in OpenSolaris Tagged: C, ipc, kernel, listing shared memory segments on Solaris, OpenSolaris, shared memory, shared memory on solaris <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/richizo.wordpress.com/189/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/richizo.wordpress.com/189/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/richizo.wordpress.com/189/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/richizo.wordpress.com/189/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/richizo.wordpress.com/189/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/richizo.wordpress.com/189/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/richizo.wordpress.com/189/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/richizo.wordpress.com/189/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/richizo.wordpress.com/189/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/richizo.wordpress.com/189/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=richizo.wordpress.com&blog=4322475&post=189&subd=richizo&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://richizo.wordpress.com/2009/02/11/listing-shared-memory-segments-in-c/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8e44ea854fd251d929394d6b80e9d2fa?s=96&#38;d=identicon" medium="image">
			<media:title type="html">richizo</media:title>
		</media:content>

		<media:content url="http://richizo.files.wordpress.com/2009/02/link2_os_blk_125.gif" medium="image">
			<media:title type="html">link2_os_blk_125</media:title>
		</media:content>
	</item>
		<item>
		<title>Calling C functions inside Python</title>
		<link>http://richizo.wordpress.com/2009/01/25/calling-c-functions-inside-python/</link>
		<comments>http://richizo.wordpress.com/2009/01/25/calling-c-functions-inside-python/#comments</comments>
		<pubDate>Mon, 26 Jan 2009 00:56:06 +0000</pubDate>
		<dc:creator>richizo</dc:creator>
				<category><![CDATA[OpenSolaris]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[c functions in python]]></category>
		<category><![CDATA[c inside python]]></category>
		<category><![CDATA[ctypes]]></category>

		<guid isPermaLink="false">http://richizo.wordpress.com/?p=176</guid>
		<description><![CDATA[In my current work, I&#8217;m developing new ways to test a Telecom framework. Firstly, I was building automation tests with cgreen to blackbox/unit test model. But the development stages were going a little more slow than I thought because write and debug C code is not so easy.  
Suddenly, I though&#8230;&#8221;Hey, why do I [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=richizo.wordpress.com&blog=4322475&post=176&subd=richizo&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>In my current work, I&#8217;m developing new ways to test a Telecom framework. Firstly, I was building automation tests with <a href="http://www.lastcraft.com/cgreen.php" target="_blank">cgreen</a> to blackbox/unit test model. But the development stages were going a little more slow than I thought because write and debug C code is not so easy. <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<p>Suddenly, I though&#8230;&#8221;Hey, why do I not build these tests with python scripts ???&#8221;. And my response was: &#8220;<a href="http://starship.python.net/crew/theller/ctypes/" target="_blank">Ctypes</a> is your friend!&#8221; <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Ctypes permits you call C functions inside python code. It&#8217;s wonderful. Let&#8217;s see how to do it in <strong>OpenSolaris</strong> environment:</p>
<p>First, download ctypes:</p>
<pre style="padding-left:30px;">$ wget -c \
http://ufpr.dl.sourceforge.net/sourceforge/ctypes/ctypes-1.0.2.tar.gz</pre>
<p>Install ctypes in a local path (as <em>normal</em> user):</p>
<pre style="padding-left:30px;">$ tar -zxvf ctypes-1.0.2.tar.gz</pre>
<pre style="padding-left:30px;">$ cd ctypes-1.0.2</pre>
<pre style="padding-left:30px;">$ python setup.py install --prefix=$HOME/python</pre>
<p>Export your <em>PYTHONPATH</em> environment variable:</p>
<pre style="padding-left:30px;">$ export PYTHONPATH=$HOME/python/lib/python2.4/site-packages</pre>
<p>Testing ctypes:</p>
<pre style="padding-left:30px;">$ python</pre>
<pre style="padding-left:30px;">&gt;&gt;&gt; import ctypes</pre>
<p>OK ! Ctypes is there, but how do I use it ???</p>
<p>See a little example that I made to explain how to use ctypes:</p>
<ul>
<li>A file named <strong>test.c</strong> with a function (<em>sum</em>) that returns a sum of two values:</li>
</ul>
<pre style="padding-left:60px;">int sum (int a, int b)
{
    return (a+b);
}</pre>
<ul>
<li>Compile it as a shared library:</li>
</ul>
<pre style="padding-left:60px;">$ gcc -fPIC -c test.c</pre>
<pre style="padding-left:60px;">$ gcc -shared -o test.o libtest.so</pre>
<ul>
<li>Make sure that our library will be found</li>
</ul>
<pre style="padding-left:60px;">$ cp test.so $HOME/example</pre>
<pre style="padding-left:60px;">$ export LD_LIBRARY_PATH=$HOME/example</pre>
<ul>
<li>Let&#8217;s call the function sum through a Python script</li>
</ul>
<pre style="padding-left:60px;">$ python</pre>
<pre style="padding-left:60px;">&gt;&gt;&gt; from ctypes import *
&gt;&gt;&gt; cdll.LoadLibrary('libtest.so')
&lt;CDLL 'libtest.so', handle fe7806e0 at 80dfcec&gt;
&gt;&gt;&gt; libc = CDLL('libtest.so')
&gt;&gt;&gt; libc.sum()
112710980
&gt;&gt;&gt; libc.sum(1,2)
3</pre>
<p>I can see a <strong><em>smile</em></strong> in your face. Yeah! Ctypes is a great trick to C programmers <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Enjoy it!</p>
<p><strong>Useful links</strong>:</p>
<ol>
<li>http://docs.python.org/library/ctypes.html</li>
</ol>
<p><img class="aligncenter size-full wp-image-183" title="python-powered" src="http://richizo.files.wordpress.com/2009/01/python-powered.png?w=140&#038;h=56" alt="python-powered" width="140" height="56" /></p>
Posted in OpenSolaris, Python Tagged: c functions in python, c inside python, ctypes, Python <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/richizo.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/richizo.wordpress.com/176/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/richizo.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/richizo.wordpress.com/176/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/richizo.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/richizo.wordpress.com/176/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/richizo.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/richizo.wordpress.com/176/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/richizo.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/richizo.wordpress.com/176/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=richizo.wordpress.com&blog=4322475&post=176&subd=richizo&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://richizo.wordpress.com/2009/01/25/calling-c-functions-inside-python/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8e44ea854fd251d929394d6b80e9d2fa?s=96&#38;d=identicon" medium="image">
			<media:title type="html">richizo</media:title>
		</media:content>

		<media:content url="http://richizo.files.wordpress.com/2009/01/python-powered.png" medium="image">
			<media:title type="html">python-powered</media:title>
		</media:content>
	</item>
		<item>
		<title>Enabling a Marvel Yukon NIC on OpenSolaris</title>
		<link>http://richizo.wordpress.com/2009/01/11/enabling-a-marvel-yukon-nic-on-opensolaris/</link>
		<comments>http://richizo.wordpress.com/2009/01/11/enabling-a-marvel-yukon-nic-on-opensolaris/#comments</comments>
		<pubDate>Sun, 11 Jan 2009 22:49:29 +0000</pubDate>
		<dc:creator>richizo</dc:creator>
				<category><![CDATA[OpenSolaris]]></category>
		<category><![CDATA[marvel yukon]]></category>
		<category><![CDATA[marvel yukon driver opensolaris]]></category>
		<category><![CDATA[sony vaio]]></category>
		<category><![CDATA[vaio opensolaris]]></category>

		<guid isPermaLink="false">http://richizo.wordpress.com/?p=170</guid>
		<description><![CDATA[When I installed OpenSolaris 2008.05 in my laptop (Sony Vaio), the operating system does not recognized my ethernet card (marvel yukon), but identified my wireless NIC.
I don&#8217;t use ethernet card frequently because I have a Wireless Access Point. But, some days ago I had to enable my Marvel Yukon.
Let&#8217;s see how did I do this:
By [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=richizo.wordpress.com&blog=4322475&post=170&subd=richizo&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>When I installed <b>OpenSolaris 2008.05</b> in my laptop (<b>Sony Vaio</b>), the operating system does not recognized my ethernet card (<i>marvel yukon</i>), but identified my wireless NIC.</p>
<p>I don&#8217;t use ethernet card frequently because I have a Wireless Access Point. But, some days ago I had to enable my <i>Marvel Yukon</i>.</p>
<p><u>Let&#8217;s see how did I do this</u>:</p>
<p>By default, <b>snv_86 build </b>does not come with the <i>Marvel Yukon</i> driver enabled in the kernel<b>. </b>But<b> </b>you can download it at:<b><br />
</b></p>
<p style="padding-left:30px;"><a href="http://homepage2.nifty.com/mrym3/taiyodo/myk-2.6.5.tar.gz" target="_blank">http://homepage2.nifty.com/mrym3/taiyodo/myk-2.6.5.tar.gz</a></p>
<p>Done that, I take these steps:</p>
<ol>
<li>
<pre>tar -zxvf myk-2.6.5.tar.gz</pre>
</li>
<li>
<pre>cd myk-2.6.5</pre>
</li>
<li>
<pre>rm -Rf obj Makefile</pre>
</li>
<li>
<pre>ln -s Makefile.i386_gcc Makefile</pre>
</li>
<li>
<pre>ln -s i386 obj</pre>
</li>
<li>
<pre>export PATH=/usr/ccs/bin:$PATH</pre>
</li>
<li>
<pre>which gcc (<i>/usr/ccs/bin/gcc</i> expected)</pre>
</li>
<li>
<pre>which make (<i>/usr/ccs/bin/make</i> expected)</pre>
</li>
<li>
<pre>pfexec make install</pre>
</li>
<li>
<pre>pfexec ./adddrv.sh (should says ok!)</pre>
</li>
<li>
<pre>ifconfig myk0 plumb</pre>
</li>
<li>
<pre>ifconfig -a (wow ! I see my ethernet card!!!&nbsp; <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> )</pre>
</li>
</ol>
<p><b>PS</b>: Before try my tips, please, read the installation document in tarball &#8217;cause you can have to do different steps.</p>
<p><u>Links</u>:</p>
<p><a href="http://homepage2.nifty.com/mrym3/taiyodo/eng/" target="_blank">http://homepage2.nifty.com/mrym3/taiyodo/eng/</a></p>
Posted in OpenSolaris Tagged: marvel yukon, marvel yukon driver opensolaris, OpenSolaris, sony vaio, vaio opensolaris <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/richizo.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/richizo.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/richizo.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/richizo.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/richizo.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/richizo.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/richizo.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/richizo.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/richizo.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/richizo.wordpress.com/170/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=richizo.wordpress.com&blog=4322475&post=170&subd=richizo&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://richizo.wordpress.com/2009/01/11/enabling-a-marvel-yukon-nic-on-opensolaris/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8e44ea854fd251d929394d6b80e9d2fa?s=96&#38;d=identicon" medium="image">
			<media:title type="html">richizo</media:title>
		</media:content>
	</item>
		<item>
		<title>Jailing OpenBSD</title>
		<link>http://richizo.wordpress.com/2008/12/31/jailing-openbsd-in-5-steps/</link>
		<comments>http://richizo.wordpress.com/2008/12/31/jailing-openbsd-in-5-steps/#comments</comments>
		<pubDate>Wed, 31 Dec 2008 03:59:12 +0000</pubDate>
		<dc:creator>richizo</dc:creator>
				<category><![CDATA[OpenBSD]]></category>
		<category><![CDATA[jailing openbsd]]></category>
		<category><![CDATA[openbsd chroot]]></category>
		<category><![CDATA[openbsd jail]]></category>
		<category><![CDATA[sysjail]]></category>
		<category><![CDATA[systrace]]></category>

		<guid isPermaLink="false">http://richizo.wordpress.com/?p=156</guid>
		<description><![CDATA[Jail system is well known by FreeBSD users. But the super-hyper-ultra security OpenBSD has not a jail-like system ???
A few weeks ago, I and my friend were talking about security and how to expose a OpenBSD host in the wild Internet&#8230;One of his ideas was to use the ChrootDirectory option in OpenSSH&#8230;but I wanted a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=richizo.wordpress.com&blog=4322475&post=156&subd=richizo&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p style="padding-left:30px;">Jail system is well known by FreeBSD users. But the super-hyper-ultra security OpenBSD has not a jail-like system ???</p>
<p style="padding-left:30px;">A few weeks ago, I and my friend were talking about security and how to expose a OpenBSD host in the wild Internet&#8230;One of his ideas was to use the <a href="http://www.openbsd.org/cgi-bin/man.cgi?query=sshd_config" target="_blank">ChrootDirectory</a> option in OpenSSH&#8230;but I wanted a plus&#8230;</p>
<p style="padding-left:30px;">As I knew the FreeBSD and Jail system very well (I started with this stuff in 5 years past)&#8230;I tried to search something equal to OpenBSD&#8230;and then I found the incredible <a href="http://sysjail.bsd.lv/" target="_blank">sysjail</a>.</p>
<p style="padding-left:30px;">
<p style="padding-left:30px;">Well, let&#8217;s see how to install <strong>sysjail in OpenBSD 4.4:</strong></p>
<ul style="padding-left:30px;">
<li>Download the tarball port:</li>
</ul>
<pre style="padding-left:90px;">wget http://sysjail.bsd.lv/dist/sysjail-obsd-1.2.34.tar.gz</pre>
<ul style="padding-left:30px;">
<li>Decompress into <span style="text-decoration:underline;">ports directory:</span></li>
</ul>
<pre style="padding-left:90px;">tar -zxvf sysjail-obsd-1.2.34.tar.gz -C /usr/ports/security</pre>
<ul style="padding-left:30px;">
<li>Try your best (just <em>make)</em></li>
</ul>
<pre style="padding-left:90px;">(cd /usr/ports/security/sysjail &amp;&amp; make)</pre>
<ul style="padding-left:30px;">
<li>How you could see, it needs a patch, because currently version works only in OpenBSD 4.3 and earlier</li>
</ul>
<p style="padding-left:90px;"><strong><span style="text-decoration:underline;">patch.txt</span></strong>:</p>
<pre style="padding-left:90px;"><em>--- intercepts.h    Fri Jul 18 11:01:50 2008
+++ intercepts.h.new    Tue Dec 30 21:54:10 2008
@@ -1714,7 +1714,7 @@

 #if defined(__OpenBSD__)
 # if OpenBSD == 200711 || OpenBSD == 200705 || \
-         OpenBSD == 200805
+         OpenBSD == 200805 || OpenBSD == 200811
 #  define sj_inttbl    { { sj_obsd_4_0_native, \
                NULL, NULL, \
                sj_obsd_4_1_freebsd, \
</em>
cd w-sysjail-1.2.34/sysjail-1.2.34/
patch -p0 &lt; patch.txt</pre>
<ul style="padding-left:30px;">
<li>Try again and be happy <strong> <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </strong></li>
</ul>
<pre style="padding-left:90px;">make &amp;&amp; make install</pre>
<p style="padding-left:30px;">
<p style="padding-left:30px;"><span style="text-decoration:underline;">Now, it&#8217;s time to action!!!</span></p>
<ul style="padding-left:30px;">
<li>Preparing the environment:</li>
</ul>
<pre style="padding-left:90px;">mkdir -p /usr/local/jail/cerberus</pre>
<ul style="padding-left:30px;">
<li>Getting the binaries:</li>
</ul>
<pre style="padding-left:90px;">wget -c \
    ftp://ftp.openbsd.org/pub/OpenBSD/4.4/`uname -m`/\*.tgz</pre>
<pre style="padding-left:90px;">for i in *.tgz;
do
    tar -zxvf $i -C /usr/local/jail/cerberus/;
done</pre>
<ul style="padding-left:30px;">
<li>Essential devices:</li>
</ul>
<pre style="padding-left:90px;">cd /usr/local/jail/cerberus/dev</pre>
<pre style="padding-left:90px;">sh ./MAKEDEV std random</pre>
<ul style="padding-left:30px;">
<li>Preparing network (NIC alias)</li>
</ul>
<pre style="padding-left:90px;">ifconfig ne3 inet 172.16.0.2 netmask 255.255.255.0 alias</pre>
<ul style="padding-left:30px;">
<li>Creating the jail</li>
</ul>
<pre style="padding-left:90px;">/usr/local/sbin/sysjail --quiet --allow-sysvipc \</pre>
<pre style="padding-left:90px;">    --cmd-enable /usr/local/jail/cerberus cerberus \
    172.16.0.2 /bin/sh /etc/rc</pre>
<ul style="padding-left:30px;">
<li>Testing
<ul>
<li>
<pre>jls</pre>
</li>
<li>
<pre>ssh 172.16.0.2</pre>
</li>
<li>
<pre>jail /usr/local/jail/cerberus cerberus 172.16.0.2 /bin/sh</pre>
</li>
</ul>
</li>
</ul>
<p>PS.: take care using <a href="http://secunia.com/advisories/26479/" target="_blank">Sysjail + Systrace</a></p>
<p style="padding-left:30px;"><img class="aligncenter size-full wp-image-157" title="openbsd" src="http://richizo.files.wordpress.com/2008/12/openbsd.jpg?w=118&#038;h=98" alt="openbsd" width="118" height="98" /></p>
Posted in OpenBSD Tagged: jailing openbsd, openbsd chroot, openbsd jail, sysjail, systrace <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/richizo.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/richizo.wordpress.com/156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/richizo.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/richizo.wordpress.com/156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/richizo.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/richizo.wordpress.com/156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/richizo.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/richizo.wordpress.com/156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/richizo.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/richizo.wordpress.com/156/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=richizo.wordpress.com&blog=4322475&post=156&subd=richizo&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://richizo.wordpress.com/2008/12/31/jailing-openbsd-in-5-steps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8e44ea854fd251d929394d6b80e9d2fa?s=96&#38;d=identicon" medium="image">
			<media:title type="html">richizo</media:title>
		</media:content>

		<media:content url="http://richizo.files.wordpress.com/2008/12/openbsd.jpg" medium="image">
			<media:title type="html">openbsd</media:title>
		</media:content>
	</item>
		<item>
		<title>History in sqlplus</title>
		<link>http://richizo.wordpress.com/2008/10/18/history-in-sqlplus/</link>
		<comments>http://richizo.wordpress.com/2008/10/18/history-in-sqlplus/#comments</comments>
		<pubDate>Sat, 18 Oct 2008 11:37:03 +0000</pubDate>
		<dc:creator>richizo</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[history]]></category>
		<category><![CDATA[history in sqlplus]]></category>
		<category><![CDATA[rlwrap]]></category>
		<category><![CDATA[rman history]]></category>
		<category><![CDATA[sqlplus]]></category>

		<guid isPermaLink="false">http://richizo.wordpress.com/?p=150</guid>
		<description><![CDATA[I think the sqlplus command is the better app to Oracle DBA&#8217;s daily work. Since I do not working with complex pl/sql scripts, I prefer sqlplus too. However, sqlplus has not a history feature as psql (PostgreSQL) and mysql (MySQL) &#8211; when these tools are compiled with readline library.
It exits a trick to enable history [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=richizo.wordpress.com&blog=4322475&post=150&subd=richizo&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I think the <strong>sqlplus</strong> command is the better app to Oracle DBA&#8217;s daily work. Since I do not working with complex pl/sql scripts, I prefer sqlplus too. However, sqlplus has not a <em>history</em> feature as <strong>psql</strong> (PostgreSQL) and <strong>mysql</strong> (MySQL) &#8211; when these tools are compiled with <a href="http://en.wikipedia.org/wiki/GNU_readline" target="_blank">readline library</a>.</p>
<p>It exits a trick to enable history in sqlplus. The &#8220;<em>workaround</em>&#8221; is known as <a href="http://utopia.knoware.nl/~hlub/uck/rlwrap/" target="_blank">rlwrap</a>. So, how do I do it ?</p>
<p>&lt;&#8212;&#8212;&#8212;&#8211;</p>
<pre style="padding-left:30px;">rlwrap sqlplus</pre>
<p style="padding-left:60px;">or</p>
<pre style="padding-left:30px;">alias sqlplus='rlwrap sqlplus'</pre>
<p>&#8212;&#8212;&#8212;&#8211;&gt;</p>
<p>Try it also with <strong>rman</strong> command. <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>You will save your time and your patience.</p>
<p><strong>rlwrap</strong>: <a href="http://utopia.knoware.nl/~hlub/uck/rlwrap/" target="_blank">http://utopia.knoware.nl/~hlub/uck/rlwrap/</a></p>
<p><strong>sqlplus documentation</strong>: <a href="http://download-west.oracle.com/docs/cd/B12037_01/server.101/b12170/toc.htm" target="_blank">http://download-west.oracle.com/docs/cd/B12037_01/server.101/b12170/toc.htm</a></p>
Posted in Database, Oracle Tagged: history, history in sqlplus, Oracle, rlwrap, rman history, sqlplus <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/richizo.wordpress.com/150/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/richizo.wordpress.com/150/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/richizo.wordpress.com/150/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/richizo.wordpress.com/150/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/richizo.wordpress.com/150/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/richizo.wordpress.com/150/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/richizo.wordpress.com/150/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/richizo.wordpress.com/150/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/richizo.wordpress.com/150/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/richizo.wordpress.com/150/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=richizo.wordpress.com&blog=4322475&post=150&subd=richizo&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://richizo.wordpress.com/2008/10/18/history-in-sqlplus/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8e44ea854fd251d929394d6b80e9d2fa?s=96&#38;d=identicon" medium="image">
			<media:title type="html">richizo</media:title>
		</media:content>
	</item>
		<item>
		<title>Decompiling Python Bytecodes</title>
		<link>http://richizo.wordpress.com/2008/10/16/decompiling-python-bytecodes/</link>
		<comments>http://richizo.wordpress.com/2008/10/16/decompiling-python-bytecodes/#comments</comments>
		<pubDate>Fri, 17 Oct 2008 00:33:28 +0000</pubDate>
		<dc:creator>richizo</dc:creator>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[byte code]]></category>
		<category><![CDATA[decompiling]]></category>
		<category><![CDATA[python bytecode]]></category>

		<guid isPermaLink="false">http://richizo.wordpress.com/?p=146</guid>
		<description><![CDATA[Oh no ! I lost my python source code !!! And now ?
You can use an online Python Bytecode Decompiler (DePython) made by Team509, a chinese group (I guess).
Recently, I received this tip/trick site by Python-Brasil mailing list.
Online Decompiler: http://www.depython.net/
Author(s): http://www.team509.com/
Posted in Python Tagged: byte code, decompiling, Python, python bytecode      [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=richizo.wordpress.com&blog=4322475&post=146&subd=richizo&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Oh no ! I lost my python source code !!! And now ?</p>
<p>You can use an online Python Bytecode Decompiler (DePython) made by Team509, a chinese group (I guess).</p>
<p>Recently, I received this <em>tip/trick</em> site by Python-Brasil mailing list.</p>
<p><strong>Online Decompiler:</strong> <a href="http://www.depython.net/" target="_blank">http://www.depython.net/</a></p>
<p><strong>Author(s):</strong> <a href="http://www.team509.com/" target="_blank">http://www.team509.com/</a></p>
Posted in Python Tagged: byte code, decompiling, Python, python bytecode <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/richizo.wordpress.com/146/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/richizo.wordpress.com/146/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/richizo.wordpress.com/146/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/richizo.wordpress.com/146/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/richizo.wordpress.com/146/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/richizo.wordpress.com/146/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/richizo.wordpress.com/146/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/richizo.wordpress.com/146/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/richizo.wordpress.com/146/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/richizo.wordpress.com/146/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=richizo.wordpress.com&blog=4322475&post=146&subd=richizo&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://richizo.wordpress.com/2008/10/16/decompiling-python-bytecodes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8e44ea854fd251d929394d6b80e9d2fa?s=96&#38;d=identicon" medium="image">
			<media:title type="html">richizo</media:title>
		</media:content>
	</item>
	</channel>
</rss>