<?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>Tech Debug &#187; unix</title>
	<atom:link href="http://techdebug.com/blog/category/unix/feed/" rel="self" type="application/rss+xml" />
	<link>http://techdebug.com</link>
	<description>Why talk when you can fly</description>
	<lastBuildDate>Thu, 26 Aug 2010 07:30:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Clearcase 7.1.x install on Solaris X64/x86</title>
		<link>http://techdebug.com/blog/2010/07/21/clearcase-7-1-x-install-on-solaris-x64x86/</link>
		<comments>http://techdebug.com/blog/2010/07/21/clearcase-7-1-x-install-on-solaris-x64x86/#comments</comments>
		<pubDate>Wed, 21 Jul 2010 07:58:20 +0000</pubDate>
		<dc:creator>lantrix</dc:creator>
				<category><![CDATA[clearcase]]></category>
		<category><![CDATA[unix]]></category>
		<category><![CDATA[7.1]]></category>
		<category><![CDATA[ibm]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[solaris]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[x64]]></category>
		<category><![CDATA[x86]]></category>

		<guid isPermaLink="false">http://techdebug.com/?p=667</guid>
		<description><![CDATA[I&#8217;ve been struggling to install the beast that is Clearcase 7.1.1 on a proof of concept server. In this case the server is a Solaris 10 64bit install running on VMware Fusion 3. One of the initial mistakes I made was to try and run the installation from a network mount. DON&#8217;T. Solaris must block [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been struggling to install the beast that is Clearcase 7.1.1 on a proof of concept server.<br />
In this case the server is a Solaris 10 64bit install running on VMware Fusion 3.</p>
<p>One of the initial <a href="http://www.ibm.com/developerworks/forums/thread.jspa?threadID=257695">mistakes I made</a> was to try and run the installation from a network mount. <strong>DON&#8217;T</strong>. Solaris must block the execution of code on some types of removable drives, which in this case was a VMWare Fusion shared folder.</p>
<p>A second thing that is not clear in the README files: Clearcase 7.1.1 <em>on Solaris x86</em> does <strong><a href="http://www.ibm.com/developerworks/forums/thread.jspa?threadID=257695">NOT</a></strong> support the GUI installation. Therefore, for me as much as any readers of this blog, I&#8217;ll document the steps to kick off a fresh/silent installation.</p>
<p>The install will be/have:</p>
<ul>
<li>A local install</li>
<li>Clearcase Atria <a href="http://www-01.ibm.com/software/rational/support/licensing/">Licencing</a>, local</li>
<li>IBM Installation Manager installed first</li>
<li>ClearCase installed second</li>
</ul>
<ol>
<li>Download your <a href="https://www-112.ibm.com/software/howtobuy/softwareandservices/">entitled product</a> for Solaris X86, for CC7.1.1 which is:
<ul>
<li>CZ9XKML</li>
<li>IBM Rational ClearCase V7.1.1 Solaris x86 Platform Edition Multilingual</li>
</ul>
<p>If you need an evaluation copy, they are <a href="https://www14.software.ibm.com/webapp/iwm/web/preLogin.do?source=rational">also available</a>.</li>
<li>Copy the archive to your server, and extract it. I&#8217;ll use <em>/var/ccinstall</em> for my install source, but adjust as required:<br />
<pre><code>
mkdir -p /var/ccinstall
cp -p CZ9XKML.zip /var/ccinstall
cd /var/ccinstall
unzip CZ9XKML.zip
cd disk1
</code></pre></li>
<li>Follow the <a href="https://publib.boulder.ibm.com/infocenter/cchelp/v7r1m0/index.jsp?topic=/com.ibm.rational.clearcase.cc_ms_install.doc/topics/c_non_gui_inst.htm">IBM documented steps</a> for preparing a silent install. For my steps the dir <em>/var/ccinstall/disk1</em> will be <em>esd_image_root</em>.</li>
<li>Kick off the install:<br />
<pre><code>
/var/ccinstall/disk1/InstallerImage_*/install \
--launcher.ini \
/var/ccinstall/disk1/InstallerImage_*/silent-install.ini \
-silent \
-input clearcase_response_sol_x86.xml \
-log silentinstall.log
</code></pre><br />
If you want to also show the progress, include the switch <code>-showVerboseProgress</code></li>
</ol>
<p>At this point kick back and make a few coffees.<br />
Enjoy.</p>
]]></content:encoded>
			<wfw:commentRss>http://techdebug.com/blog/2010/07/21/clearcase-7-1-x-install-on-solaris-x64x86/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BOE XIR2 cmsdbsetup failure on Oracle10g</title>
		<link>http://techdebug.com/blog/2009/09/23/boe-xir2-cmsdbsetup-failure-on-oracle10g/</link>
		<comments>http://techdebug.com/blog/2009/09/23/boe-xir2-cmsdbsetup-failure-on-oracle10g/#comments</comments>
		<pubDate>Wed, 23 Sep 2009 08:00:54 +0000</pubDate>
		<dc:creator>lantrix</dc:creator>
				<category><![CDATA[apps]]></category>
		<category><![CDATA[unix]]></category>
		<category><![CDATA[10g]]></category>
		<category><![CDATA[32bit]]></category>
		<category><![CDATA[boe]]></category>
		<category><![CDATA[business objects]]></category>
		<category><![CDATA[clntsh]]></category>
		<category><![CDATA[lib32]]></category>
		<category><![CDATA[libclntsh.so]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[solaris]]></category>

		<guid isPermaLink="false">http://techdebug.com/?p=569</guid>
		<description><![CDATA[If you use Unix, and need to migrate your Business objects CMS from one database to another database, you will probably use the cmsdbsetup.sh script. This script migrates and manages your database connection in a Unix environment using Business Objects Enterprise (BOE). In my case I am Using Solaris 9, and have Oracle 10g databases [...]]]></description>
			<content:encoded><![CDATA[<p>If you use Unix, and need to migrate your Business objects CMS from one database to another database, you will probably use the <em>cmsdbsetup.sh</em> script. This script migrates and manages your database connection in a Unix environment using Business Objects Enterprise (BOE).</p>
<p>In my case I am Using Solaris 9, and have Oracle 10g databases and client files for use by BOE.</p>
<p>When running the <em>cmsdbsetup.sh</em> script you get the following error pertaining to <strong>clntsh</strong>:<br />
<pre><pre>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Business Objects 

Current CMS Data Source: DBNAME 

err: Error: Failed to get cluster name. 
err: Error description: Unable to load clntsh 

select (Select a Data Source) 
reinitialize (Recreate the current Data Source) 
copy (Copy data from another Data Source) 
changecluster (Change current cluster name) 
selectaudit (Select an Auditing Data Source) 

[select(6)/reinitialize(5)/copy(4)/changecluster(3)/selectaudit(2)/back(1)/quit(0)] 
----------------------------------------------------------
</pre></pre></p>
<p>This error &#8220;<em>Unable to load clntsh</em>&#8221; refers to the <strong>libclntsh.so</strong> library used by the Oracle client. Since BOE runs as 32bit, the 32bit Oracle client libraries should be accessible by the user running BOE.</p>
<p>If you are running a 64 bit Unix and a 64bit Oracle install check that the environment for the user running BOE (user that will run the CMS) has the 32bit libraries in the path:<br />
<code>LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib:$ORACLE_HOME/lib32</code></p>
<p>Then check that either the user is a member of the Oracle dba Unix group or everyone has permissions to access the 32bit libraries under Oracle 10g:</p>
<p><pre><code>su - oracle
chmod o+rx $ORACLE_HOME/lib32/*</code></pre></p>
<p>Feel free to leave any comments if you need help with this.</p>
]]></content:encoded>
			<wfw:commentRss>http://techdebug.com/blog/2009/09/23/boe-xir2-cmsdbsetup-failure-on-oracle10g/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP5 Zip Support on OpenBSD 4.5</title>
		<link>http://techdebug.com/blog/2009/08/18/php5-zip-support-on-openbsd-4-5/</link>
		<comments>http://techdebug.com/blog/2009/08/18/php5-zip-support-on-openbsd-4-5/#comments</comments>
		<pubDate>Mon, 17 Aug 2009 15:37:59 +0000</pubDate>
		<dc:creator>lantrix</dc:creator>
				<category><![CDATA[openbsd]]></category>
		<category><![CDATA[unix]]></category>
		<category><![CDATA[webdev]]></category>
		<category><![CDATA[CiviCRM]]></category>
		<category><![CDATA[pear]]></category>
		<category><![CDATA[pecl]]></category>
		<category><![CDATA[php5]]></category>
		<category><![CDATA[zip]]></category>
		<category><![CDATA[zziplib]]></category>

		<guid isPermaLink="false">http://techdebug.com/?p=545</guid>
		<description><![CDATA[This is a cheat sheet on getting PHP5 on OpenBSD to have zip support. I needed this to get CiviCRM to work with Joomla. First off install some require packages, including the zziplib package: &#160;&#160;export PKG_PATH=http://mirror.aarnet.edu.au/pub/OpenBSD/4.5/packages/i386/ &#160;&#160;pkg_add -v zziplib &#160;&#160;pkg_add -v autoconf-2.62 Now download and extract the PECL zip package: &#160;&#160;mkdir /usr/local/src/ &#160;&#160;cd /usr/local/src/ &#160;&#160;wget [...]]]></description>
			<content:encoded><![CDATA[<p>This is a cheat sheet on getting PHP5 on OpenBSD to have zip support. I needed this to get <a href="http://wiki.civicrm.org/confluence/display/CRMDOC/CiviCRM+Documentation" title="CiviCRM Documentation - CiviCRM 2.2 Documentation - CiviCRM Wiki">CiviCRM</a> to work with Joomla.</p>
<p>
	First off install some require packages, including the zziplib package:<br />
<pre><code>
&nbsp;&nbsp;export PKG_PATH=http://mirror.aarnet.edu.au/pub/OpenBSD/4.5/packages/i386/
&nbsp;&nbsp;pkg_add -v zziplib
&nbsp;&nbsp;pkg_add -v autoconf-2.62
</code></pre><br />
Now download and extract the PECL zip package:<br />
<pre><code>
&nbsp;&nbsp;mkdir /usr/local/src/
&nbsp;&nbsp;cd /usr/local/src/
&nbsp;&nbsp;wget http://pecl.php.net/get/zip
&nbsp;&nbsp;tar zxvf zip
&nbsp;&nbsp;cd zip-1.10.2/ 
</code></pre><br />
Compile PECL zip, making sure you set your <a href="http://marc.info/?l=openbsd-misc&amp;m=116524888816542&amp;w=2" title="'Re: autoconf error message suggestion' - MARC">correct autoconf</a> to use:<br />
<pre><code>
&nbsp;&nbsp;export AUTOCONF_VERSION=2.62
&nbsp;&nbsp;phpize
&nbsp;&nbsp;./configure
&nbsp;&nbsp;make
&nbsp;&nbsp;make install
</code></pre><br />
Finally setup php5 and restart httpd:<br />
<pre><code>
&nbsp;&nbsp;cat &amp;lt;&amp;lt; EOF &amp;gt;&amp;gt; /var/www/conf/php.ini
&nbsp;&nbsp;extension=zip.so
&nbsp;&nbsp;EOF
&nbsp;&nbsp;sudo apachectl stop
&nbsp;&nbsp;sudo apachectl start
</code></pre>
</p>
<p>Of course, this will go stale over time as new releases and versions come out, so YMMV.</p>
]]></content:encoded>
			<wfw:commentRss>http://techdebug.com/blog/2009/08/18/php5-zip-support-on-openbsd-4-5/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>awk oneliner to find large files</title>
		<link>http://techdebug.com/blog/2009/03/20/awk-oneliner-to-find-large-files/</link>
		<comments>http://techdebug.com/blog/2009/03/20/awk-oneliner-to-find-large-files/#comments</comments>
		<pubDate>Fri, 20 Mar 2009 05:48:59 +0000</pubDate>
		<dc:creator>lantrix</dc:creator>
				<category><![CDATA[unix]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[solaris]]></category>

		<guid isPermaLink="false">http://techdebug.com/?p=370</guid>
		<description><![CDATA[A mega geeky awk one-liner today. Tested on Solaris under bash, so YMMV. Have you ever found that a filesystem is filling up fast, and dont know what is causing it? This one liner (which can be placed in a cron job if you like) is best run as a super user. It will: Search [...]]]></description>
			<content:encoded><![CDATA[<p>A mega geeky awk one-liner today. Tested on Solaris under bash, so <a href="http://en.wikiepedia.org/wiki/YMMV">YMMV</a>.</p>
<p>Have you ever found that a filesystem is filling up fast, and dont know what is causing it? This one liner (which can be placed in a cron job if you like) is best run as a super user.</p>
<p>It will:</p>
<ol>
<li>Search for all files in the current dir and subdirs that are modified in the last 3 days;</li>
<li>list them, filtering just the filesize and name/path;</li>
<li>sort/order by the largest file; and</li>
<li>Email you a copy of the report.</li>
</ol>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">find</span> <span style="color: #000000; font-weight: bold;">/</span> <span style="color: #660033;">-type</span> f <span style="color: #660033;">-mtime</span> <span style="color: #660033;">-3</span> <span style="color: #660033;">-exec</span> <span style="color: #c20cb9; font-weight: bold;">ls</span> <span style="color: #660033;">-l</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #7a0874; font-weight: bold;">&#125;</span> \; <span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">&gt;/</span>dev<span style="color: #000000; font-weight: bold;">/</span>null \
<span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #ff0000;">'{print $5 &quot; &quot; $9}'</span> \
<span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #ff0000;">'{printf &quot;%12d\t%s\n&quot;, $1, substr($0,index($0,$2),80)}'</span> \
<span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sort</span> <span style="color: #660033;">-r</span> <span style="color: #000000; font-weight: bold;">&gt;/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>largefiles.txt <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> \
<span style="color: #7a0874; font-weight: bold;">&#40;</span> uuencode <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>largefiles.txt largefiles.txt <span style="color: #7a0874; font-weight: bold;">&#41;</span> \
<span style="color: #000000; font-weight: bold;">|</span> mailx <span style="color: #660033;">-s</span> <span style="color: #ff0000;">'Large Files Report'</span> <span style="color: #660033;">-r</span> mail2<span style="color: #000000; font-weight: bold;">@</span>youremail.com <span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>mailrecipients<span style="color: #000000; font-weight: bold;">`</span> <span style="color: #000000; font-weight: bold;">&amp;</span></pre></div></div>

<p>Nice. If you just want to see the response on stdout then try this:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">find</span> <span style="color: #000000; font-weight: bold;">/</span> <span style="color: #660033;">-type</span> f <span style="color: #660033;">-mtime</span> <span style="color: #660033;">-3</span> <span style="color: #660033;">-exec</span> <span style="color: #c20cb9; font-weight: bold;">ls</span> <span style="color: #660033;">-l</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #7a0874; font-weight: bold;">&#125;</span> \; <span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">&gt;/</span>dev<span style="color: #000000; font-weight: bold;">/</span>null \
<span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #ff0000;">'{print $5 &quot; &quot; $9}'</span> \
<span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #ff0000;">'{printf &quot;%12d\t%s\n&quot;, $1, substr($0,index($0,$2),80)}'</span> \
<span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sort</span> <span style="color: #660033;">-r</span></pre></div></div>

<p>Have fun.</p>
]]></content:encoded>
			<wfw:commentRss>http://techdebug.com/blog/2009/03/20/awk-oneliner-to-find-large-files/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Compiling readline on an OSX 10.5 intel x86_64</title>
		<link>http://techdebug.com/blog/2009/01/03/compiling-readline-on-an-osx-105-intel-x86_64/</link>
		<comments>http://techdebug.com/blog/2009/01/03/compiling-readline-on-an-osx-105-intel-x86_64/#comments</comments>
		<pubDate>Fri, 02 Jan 2009 15:33:13 +0000</pubDate>
		<dc:creator>lantrix</dc:creator>
				<category><![CDATA[apple]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[unix]]></category>
		<category><![CDATA[10.5]]></category>
		<category><![CDATA[architecure]]></category>
		<category><![CDATA[compile]]></category>
		<category><![CDATA[i386]]></category>
		<category><![CDATA[intel]]></category>
		<category><![CDATA[leopard]]></category>
		<category><![CDATA[readline]]></category>
		<category><![CDATA[x86_64]]></category>

		<guid isPermaLink="false">http://techdebug.com/?p=295</guid>
		<description><![CDATA[I&#8217;m stuck with a whole bunch of problems getting code to compile and co-operate nicely on my new MacBookPro. I&#8217;m compiling my own PHP, but it defaults to compiling for the i386 (32bit) architecure, which then fails when Apache2 running in 64bit mode tries to use the 32bit DSO for PHP5. Compiling PHP5 as 64bit [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m stuck with a whole bunch of problems getting code to compile and co-operate nicely on my new MacBookPro. I&#8217;m compiling my own PHP, but it defaults to compiling for the i386 (32bit) architecure, which then fails when Apache2 running in 64bit mode tries to use the 32bit DSO for PHP5. Compiling PHP5 as 64bit then fails linking against the i386 pgsql lib, and so on. I really need everything using the x86_64 architecture.</p>
<p>How does this all relate to readline under Leopard?<br />
<span id="more-295"></span><br />
The problem is the Intel Core2 Duo is a 64bit CPU. Apple supplied apps like Apache2 are compiled as Universal binary AND for 32/64bits. This means there are 4 architectures in the binaries.<br />
<pre><pre>
lantrix@lexx:~ $ file /usr/sbin/httpd
/usr/sbin/httpd: Mach-O fat file with 4 architectures
</pre></pre><br />
When I compile PHP as x86_64 of course it complains that the pgsql libs are also not x86_64, and when I compile postgresql as x86_64, it complains the fink readline library I use is not x86_64. Talk about architectural dependancies! I will need to do another post in depth on the fun had with that whole set of dependancies.</p>
<p><strong>This is how and why I arrived at compiling readline on my Mac 64bit intel under Leopard</strong>.  </p>
<p>On to the readline problems. I start the compile of readline as x86_64 architecture, and this occurs:<br />
<pre><pre>
gcc -dynamic -arch x86_64 -bind_at_load -arch_only `/usr/bin/arch` -install_name /usr/local/lib/libreadline.5.2.dylib -current_version 5.2 -compatibility_version 5 -v -o libreadline.5.2.dylib readline.so vi_mode.so funmap.so keymaps.so parens.so search.so rltty.so complete.so bind.so isearch.so display.so signals.so util.so kill.so undo.so macro.so input.so callback.so terminal.so text.so nls.so misc.so xmalloc.so history.so histexpand.so histfile.so histsearch.so shell.so mbutil.so tilde.so compat.so -lncurses
Using built-in specs.
Target: i686-apple-darwin9
Configured with: /var/tmp/gcc/gcc-5465~16/src/configure --disable-checking -enable-werror --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.0/ --with-gxx-include-dir=/include/c++/4.0.0 --with-slibdir=/usr/lib --build=i686-apple-darwin9 --with-arch=apple --with-tune=generic --host=i686-apple-darwin9 --target=i686-apple-darwin9
Thread model: posix
gcc version 4.0.1 (Apple Inc. build 5465)
i686-apple-darwin9-gcc-4.0.1: -compatibility_version only allowed with -dynamiclib
make[1]: *** [libreadline.5.2.dylib] Error 1
make: [shared] Error 2 (ignored)
</pre></pre></p>
<p>Google is your friend, and MacOSXHints forum user <a href="http://forums.macosxhints.com/showpost.php?p=421408&#038;postcount=3">dmacks has an answer</a> why this occurs.</p>
<blockquote><p>
The readline compile scripting is ugly (doesn&#8217;t use standard build tools, then fakes it&#8230;poorly at times). You need -dynamiclib not -dynamic to compile a shared library on OS X, but this indicates a deeper problem: need to patch support/shobj-conf to know darwin9* as a Darwin/MacOS system if you&#8217;re on Leopard (I think readline5.2 only recognizes darwin8*, i.e., Tiger).
</p></blockquote>
<p>Still this is not a fix&#8230;. But some further searching and I find a <a href="http://rubyforge.org/pipermail/wtr-general/2007-February/009632.html">Christopher Rasch on a Watir mailing list</a> who shows how to get around this. Effectivly you need to change the makefile for <a href="http://tiswww.case.edu/php/chet/readline/rltop.html#CurrentStatus">readlines</a> shlibs to use the <em>-dynamiclib</em> switch when compiling.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">tar</span> zxvf readline-5.2.tar.gz 
<span style="color: #7a0874; font-weight: bold;">cd</span> readline-<span style="color: #000000;">5.2</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">MACOSX_DEPLOYMENT_TARGET</span>=<span style="color: #000000;">10.5</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">CFLAGS</span>=<span style="color: #ff0000;">&quot;-arch x86_64 -g -Os -pipe -no-cpp-precomp&quot;</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">CCFLAGS</span>=<span style="color: #ff0000;">&quot;-arch x86_64 -g -Os -pipe&quot;</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">CXXFLAGS</span>=<span style="color: #ff0000;">&quot;-arch x86_64 -g -Os -pipe&quot;</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">LDFLAGS</span>=<span style="color: #ff0000;">&quot;-arch x86_64 -bind_at_load&quot;</span>
.<span style="color: #000000; font-weight: bold;">/</span>configure
<span style="color: #7a0874; font-weight: bold;">cd</span> shlib
<span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">'s/-dynamic/-dynamiclib/'</span> Makefile <span style="color: #000000; font-weight: bold;">&gt;</span> Makefile.good
<span style="color: #c20cb9; font-weight: bold;">mv</span> Makefile.good Makefile
<span style="color: #7a0874; font-weight: bold;">cd</span> ..
<span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span></pre></div></div>

<p>This gave me a local x86_64 architecure readline library under Leopard. I was able to successfully compile PostgreSQL as <em>-arch x86_64</em> against the readline library as well.</p>
<p><pre><pre>
lantrix@lexx:/usr/local/src/readline-5.2 $ ls -l /usr/local/lib/libreadline.*
-r-xr-xr-x&nbsp;&nbsp;1 root&nbsp;&nbsp;lantrix&nbsp;&nbsp;272480&nbsp;&nbsp;3 Jan 02:06 /usr/local/lib/libreadline.5.2.dylib
lrwxr-xr-x&nbsp;&nbsp;1 root&nbsp;&nbsp;lantrix&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;21&nbsp;&nbsp;3 Jan 02:06 /usr/local/lib/libreadline.5.dylib -&gt; libreadline.5.2.dylib
-rw-r--r--&nbsp;&nbsp;1 root&nbsp;&nbsp;lantrix&nbsp;&nbsp;934864&nbsp;&nbsp;3 Jan 02:06 /usr/local/lib/libreadline.a
lrwxr-xr-x&nbsp;&nbsp;1 root&nbsp;&nbsp;lantrix&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;21&nbsp;&nbsp;3 Jan 02:06 /usr/local/lib/libreadline.dylib -&gt; libreadline.5.2.dylib
</pre></pre></p>
<p>Do what you will with them <img src='http://techdebug.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://techdebug.com/blog/2009/01/03/compiling-readline-on-an-osx-105-intel-x86_64/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using your MacBookPro to PXEBoot OpenBSD</title>
		<link>http://techdebug.com/blog/2008/12/08/using-your-macbookpro-to-pxeboot-openbsd/</link>
		<comments>http://techdebug.com/blog/2008/12/08/using-your-macbookpro-to-pxeboot-openbsd/#comments</comments>
		<pubDate>Sun, 07 Dec 2008 16:07:05 +0000</pubDate>
		<dc:creator>lantrix</dc:creator>
				<category><![CDATA[mac]]></category>
		<category><![CDATA[openbsd]]></category>
		<category><![CDATA[tech]]></category>
		<category><![CDATA[unix]]></category>
		<category><![CDATA[dhcp]]></category>
		<category><![CDATA[pxe]]></category>
		<category><![CDATA[tftp]]></category>

		<guid isPermaLink="false">http://techdebug.com/?p=272</guid>
		<description><![CDATA[This post does not show a successful outcome in case that&#8217;s what you where hoping for. I was trying to get OpenBSD bootstrapped using the PXEBoot NIC in a server. I decided to use my Mac which has tftp and bootpd installed. This post is quite in depth and technical so if you are game [...]]]></description>
			<content:encoded><![CDATA[<p><strong>This post does not show a successful outcome in case that&#8217;s what you where hoping for.</strong></p>
<p>I was trying to get OpenBSD bootstrapped using the PXEBoot NIC in a server. I decided to use my Mac which has tftp and bootpd installed. This post is quite in depth and technical so if you are game then read on.<br />
<span id="more-272"></span></p>
<p>The quick and short of it was I turned it all on, and copied my pxeboot image, like this from the Terminal:</p>
<p><pre><code>sudo apachectl start
sudo service tftp start
sudo cp /Library/WebServer/Documents/pub/OpenBSD/4.4/i386/pxeboot&nbsp;&nbsp;/private/tftpboot/
</code></pre></p>
<p>Then I neeed to setup the bootp server which comes with Internet Sharing. The idea was to add the pxeboot filename needed by OpenBSD (the file copied to tftpboot above) to the bootp (AKA dhcp) server options. The important file here is <em>/etc/bootpd.plist</em>. If this file doesn&#8217;t exist when Internet Sharing starts then bootpd will create it, removing it when it stops. But courtesy of <a href="http://www.jules.fm/Logbook/files/mac_squeezebox_connection_sharing.html">Jules.FM</a> &#8220;if the file already exists when it starts, the Mac will leave it alone and not overwrite or remove it&#8221;. So to add new dhcp options you perform these steps:</p>
<ol>
<li>Start Internet Sharing</li>
<li>Copy the file somewhere safe: &#8220;<code>cp /etc/bootpd.plist /tmp/</code>&#8221;</li>
<li>Stop Internet Sharing</li>
<li>Edit /tmp/bootpd.plist</li>
<li>Add your required options</li>
<li>Copy the file back in place: &#8220;<code>sudo cp /tmp/bootpd.plist /etc/</code>&#8221;</li>
<li>Start Internet Sharing</li>
</ol>
<p>Since the Mac bootpd.plist file has no option for &#8220;filename&#8221; <a href="http://developer.apple.com/documentation/Darwin/Reference/Manpages/man8/bootpd.8.html">documented</a> and since there appears to be a <a href="http://discussions.apple.com/thread.jspa?messageID=6021307&#6021307">bug in the bootpd implementation</a> with respect to supplying dhcp_options I added these <em>data</em> options to the <em>bootpd.plist</em> file:<br />
<pre><code>
&lt;key&gt;dhcp_option_66&lt;/key&gt;
&lt;data&gt;
wKgCAQ==
&lt;/data&gt;
&lt;key&gt;dhcp_option_67&lt;/key&gt;
&lt;data&gt;
cHhlYm9vdA==
&lt;/data&gt;
&lt;key&gt;dhcp_option_93&lt;/key&gt;
&lt;data&gt;
AA==
&lt;/data&gt;
</code></pre></p>
<p>In <a href="http://www.networksorcery.com/enp/rfc/rfc2132.txt">RFC2132</a> (Paragraphs 9.4 and 9.5) it specifies that options 66 and 67 are for the tftp server and boot filename. However the bootpd bug meant I had to <a href="http://www.vortex.prodigynet.co.uk/misc/ascii_conv.html">encode</a> the string &#8220;<em>pxeboot</em>&#8221; to hexadecimal &#8220;<em>0x707865626F6F74</em>&#8221; then Base64 <a href="http://hogehoge.tk/tool-i/">encode</a> it being &#8220;<em>cHhlYm9vdA==</em>&#8221; and that is way too time consuming to stuff around and try something else everytime the tftp file retrieval fails.</p>
<p>Don&#8217;t try using the dhcp_option_66 I had either as it is an encoded IP of my tftp server, not yours.</p>
<p>I got it all going, and the MacBookPro worked as planned, but the bootp server offered a filename of &#8220;<em>pxeboot</em>&#8221; and the silly Intel 10/100 card decided to fail due to missing files on the tftp server. Many hours later and I figured I should use a network sniffer instead of trying to turn on tftpd logging.</p>
<p>A packet dump showed \377 or 0xff being appended to the filename by the boot client (intel Nic on remote server) when using tftp to request the file. This made the filename &#8220;<em>pxeboot</em>&#8221; look like &#8220;<em>pxeboot\377</em>&#8221; in <a href="http://www.wireshark.org/">Wireshark&#8217;s</a> view of the packet, as <a href="http://osdir.com/ml/hardware.soekris.technical/2002-06/msg00016.html">discussed here</a> by other pioneers in netbooting.</p>
<p>If I get a full working implementation of dhcpd/tftp/pxe using the Mac &#8211; and actually working independent of the intel nic problem on the server, I&#8217;ll update this entry or write a complete run down.</p>
<p><strong>Don&#8217;t hold your breath though</strong>. I rebuilt the OpenBSD server using bsd.rd (being a ramdisk installation) so my need is no longer a driver.</p>
]]></content:encoded>
			<wfw:commentRss>http://techdebug.com/blog/2008/12/08/using-your-macbookpro-to-pxeboot-openbsd/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>MySQL on OpenBSD 4.3 using the Apache Chroot</title>
		<link>http://techdebug.com/blog/2008/09/29/mysql-on-openbsd-43-using-the-apache-chroot/</link>
		<comments>http://techdebug.com/blog/2008/09/29/mysql-on-openbsd-43-using-the-apache-chroot/#comments</comments>
		<pubDate>Mon, 29 Sep 2008 07:26:11 +0000</pubDate>
		<dc:creator>lantrix</dc:creator>
				<category><![CDATA[openbsd]]></category>
		<category><![CDATA[unix]]></category>
		<category><![CDATA[webdev]]></category>
		<category><![CDATA[openbsd 4.3 mysql chroot apache]]></category>

		<guid isPermaLink="false">http://techdebug.com/blog/2008/09/29/mysql-on-openbsd-43-using-the-apache-chroot/</guid>
		<description><![CDATA[I&#8217;m back with some more tech geek goodness for anyone who uses MySQL and OpenBSD. OpenBSD by default apache runs in a chroot jail, thereby making it more secure in case the www server is compromised. I have talked about this before. However if you use wordpress or some other web application that needs MySQL [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m back with some more tech geek goodness for anyone who uses <a href="http://www.sun.com/software/products/mysql/">MySQL</a> and <a href="http://www.openbsd.org">OpenBSD</a>.</p>
<p>OpenBSD by default apache runs in a <a href="http://en.wikipedia.org/wiki/Chroot">chroot jail</a>, thereby making it more secure in case the www server is compromised. I have talked about this before.</p>
<p>However if you use wordpress or some other web application that needs MySQL (and I&#8217;m talking where apache and MySQL reside on the same host), then the chroot jail will not allow your webapp access to the mysql socket file which is by default located in <em>/var/run/mysql/</em></p>
<p>There are various solutions available online to wait x number of seconds and then to create symlinks, etc &#8211; but this was not always working for me &#8211; with the result the server would sometimes be up without database availability.</p>
<p>Here is my solution (thanks to <a href="http://nomoa.com/bsd/mysql.htm">NoMoa</a> for the idea) &#8211; very simple, no postfix symlink but there is a symlink to allow other applications to access MySQL locally via the default socket location.</p>
<p>
First I create the run dirs in the apache jail:<br />
<pre><pre>
mkdir -p /var/www/var/run/mysql
chown _mysql:_mysql /var/www/var/run/mysql
chmod 711 /var/www/var/run/mysql
</pre></pre></p>
<p>Then I add this to the bottom of <em>/etc/rc.local</em> on the webhost.<br />
<pre><pre>
#mySQL
if [ X&quot;${mysql}&quot; == X&quot;YES&quot; -a -x /usr/local/bin/mysqld_safe ]; then
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo -n &quot; mysqld&quot;; /usr/local/bin/mysqld_safe --user=_mysql --log --open-files-limit=256 --socket=/var/www/var/run/mysql/mysql.sock &amp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if [ ! -L /var/run/mysql/mysql.sock ]; then
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mkdir -p /var/run/mysql
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;chown _mysql:_mysql /var/run/mysql
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;chmod 711 /var/run/mysql
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ln -fs /var/www/var/run/mysql/mysql.sock /var/run/mysql/mysql.sock
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fi
fi
</pre></pre><br />
Lastly I add this to my <em>/etc/rc.conf.local</em><br />
<pre><pre>
mysql=YES
</pre></pre></p>
<p><strong>Note:</strong> you may need to change the open-files-limit to suit, but the above paths are as per a standard OpenBSD 4.3 install using the supplied MySQL pkgs.</p>
<p>I tested this all out on OpenBSD 4.3 and it now works fine for me. Whenever the server comes up I never get the dreaded word press DB failure screen. <strong>Good luck</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://techdebug.com/blog/2008/09/29/mysql-on-openbsd-43-using-the-apache-chroot/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Vim Split tips</title>
		<link>http://techdebug.com/blog/2008/05/22/vim-split-tips/</link>
		<comments>http://techdebug.com/blog/2008/05/22/vim-split-tips/#comments</comments>
		<pubDate>Wed, 21 May 2008 23:16:30 +0000</pubDate>
		<dc:creator>lantrix</dc:creator>
				<category><![CDATA[apps]]></category>
		<category><![CDATA[unix]]></category>
		<category><![CDATA[diff]]></category>
		<category><![CDATA[split]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://techdebug.com/blog/2008/05/22/vim-split-tips/</guid>
		<description><![CDATA[I use vim a lot of the time, mostly with splits and diffs, so the following key mappings and functions really helped me with managing the split windows. Maybe they will help you too. (Thanks to the Vim tips wiki for these). If you use vertical splits, this will help move left and right across [...]]]></description>
			<content:encoded><![CDATA[<p>I use vim a lot of the time, mostly with splits and diffs, so the following key mappings and functions really helped me with managing the split windows. Maybe they will help you too. (Thanks to the <a href="http://vim.wikia.com/wiki/Main_Page">Vim tips wiki</a> for these).</p>
<ul>
<li>If you use vertical splits, this will help move left and right across the split. Put in your ~/.vimrc<br />
<pre><pre>
&quot; Map multi window keys
set wmw=0
&quot; CTRL-H move to left window
nmap &lt;c -h&gt; &lt;/c&gt;&lt;c -w&gt;h&lt;/c&gt;&lt;c -w&gt;&lt;bar&gt;
&quot; CTRL-L move to right window
nmap &lt;c -l&gt; &lt;/c&gt;&lt;c -w&gt;l&lt;/c&gt;&lt;c -w&gt;&lt;bar&gt;
&lt;/bar&gt;&lt;/c&gt;&lt;/bar&gt;&lt;/c&gt;</pre></pre></li>
<li>When scrolling up and down a window, you can use zz to jump the current line to the middle of the window. If you want this on always ala <strong>Scroll locking</strong>, then you can use this function. It is a toggle option. use \zz to toggle it. Put in your ~/.vimrc<br />
<pre><pre>
&quot; Map \zz to lock scroll to middle of window
map &lt;leader&gt;zz :let &amp;scrolloff=999-&amp;scrolloff&lt;cr&gt;
&lt;/cr&gt;&lt;/leader&gt;</pre></pre></li>
<li>In a window split (of any sort) if you want to maximise to the current window, this will do it for you. When you press CTRL-W then o it will maximise the current view, then when pressed again will return your split arrangement! Put in your ~/.vimrc<br />
<pre><pre>
&quot; Max/unmax splits
nnoremap &lt;c -W&gt;O :call MaximizeToggle ()&lt;cr&gt;
nnoremap &lt;c -W&gt;o :call MaximizeToggle ()&lt;cr&gt;
nnoremap &lt;c -W&gt;&lt;/c&gt;&lt;c -O&gt; :call MaximizeToggle ()&lt;cr&gt;

function! MaximizeToggle()
&nbsp;&nbsp;if exists(&quot;s:maximize_session&quot;)
&nbsp;&nbsp;&nbsp;&nbsp;exec &quot;source &quot; . s:maximize_session
&nbsp;&nbsp;&nbsp;&nbsp;call delete(s:maximize_session)
&nbsp;&nbsp;&nbsp;&nbsp;unlet s:maximize_session
&nbsp;&nbsp;&nbsp;&nbsp;let &amp;hidden=s:maximize_hidden_save
&nbsp;&nbsp;&nbsp;&nbsp;unlet s:maximize_hidden_save
&nbsp;&nbsp;else
&nbsp;&nbsp;&nbsp;&nbsp;let s:maximize_hidden_save = &amp;hidden
&nbsp;&nbsp;&nbsp;&nbsp;let s:maximize_session = tempname()
&nbsp;&nbsp;&nbsp;&nbsp;set hidden
&nbsp;&nbsp;&nbsp;&nbsp;exec &quot;mksession! &quot; . s:maximize_session
&nbsp;&nbsp;&nbsp;&nbsp;only
&nbsp;&nbsp;endif
endfunction
&lt;/cr&gt;&lt;/c&gt;&lt;/cr&gt;&lt;/c&gt;&lt;/cr&gt;&lt;/c&gt;</pre></pre></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://techdebug.com/blog/2008/05/22/vim-split-tips/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Always encrypt your ssh private key</title>
		<link>http://techdebug.com/blog/2008/05/08/always-encrypt-your-ssh-private-key/</link>
		<comments>http://techdebug.com/blog/2008/05/08/always-encrypt-your-ssh-private-key/#comments</comments>
		<pubDate>Thu, 08 May 2008 02:44:31 +0000</pubDate>
		<dc:creator>lantrix</dc:creator>
				<category><![CDATA[unix]]></category>
		<category><![CDATA[cryptography]]></category>
		<category><![CDATA[keypair]]></category>
		<category><![CDATA[openssh]]></category>
		<category><![CDATA[putty]]></category>

		<guid isPermaLink="false">http://techdebug.com/blog/2008/05/08/always-encrypt-your-ssh-private-key/</guid>
		<description><![CDATA[Recently someone I know advised other IT people to generate their SSH keypair using the default options &#8220;using just enter to answer all the questions&#8221;. This means that the Private Key generated has no password against it (and is unencrypted). In this case your private key is stored unprotected on your own computer, and anybody [...]]]></description>
			<content:encoded><![CDATA[<p>Recently someone I know advised other IT people to generate their SSH <a href="http://en.wikipedia.org/wiki/Keypair">keypair</a> using the default options &#8220;using just enter to answer all the questions&#8221;. This means that the Private Key generated has no password against it (and is unencrypted). </p>
<p>In this case your private key is stored unprotected on your own computer, and anybody who gains access to that will be able to generate signatures (login to servers) as if they were you They will be able to log in to your server under your account.<br />
<strong>I&#8217;ll reiterate that</strong>: This will allow <em>ANYONE</em> holding this file to <em>access ANY server AS YOU where you have uploaded the public keys</em>.</p>
<p>This means that in the case your laptop or computer is lost or stolen, your unix accounts are effectively compromised.</p>
<p>For this reason, your private key is recommended to be encrypted when it is stored on your local machine, using a pass phrase of your choice. To minimise this risk you should <strong>choose a strong pass phrase</strong> to be applied to the private key when generation occurs.</p>
<p>There are two ways to generate a key pair.</p>
<ol>
<li>
If you are using openssh then generate the keypair under your unix login as follows:<br />
<pre><pre>
$ ssh-keygen -C &quot;My development key 05 May 2008&quot; -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/lantrix/.ssh/id_rsa): 
Enter passphrase (empty for no passphrase): **type in a strong password here**
Enter same passphrase again: **retype in your strong password here**
Your identification has been saved in /home/lantrix/.ssh/id_rsa.
Your public key has been saved in /home/lantrix/.ssh/id_rsa.pub.
The key fingerprint is:
1a:aa:bb:44:09:38:ec:1d:1c:2d:27:c8:cc:dd:ee:ff My development key 05 May 2008
$ cat ~/.ssh/id_rsa.pub &gt;&gt; ~/.ssh/authorized_keys
</pre></pre><br />
Then copy ~/.ssh/id_rsa the <em>password protected and encrypted</em> private key to a secure place on your client machine to use (placing it in your ~/.ssh/ folder &#8211; remember to set permissions to 600).</p>
<p>If you want to use this openssh keypair with putty on a windows client, you will need to follow <a href="http://the.earth.li/~sgtatham/putty/0.60/htmldoc/Chapter8.html#puttygen-conversions">an extra step</a>. Use PuttyGen menu to load your generated &#8220;id_rsa&#8221; file you transferred to your windows client.
</li>
<li>
If you are only going to use putty to connect to UNIX servers it is better to generate the keypair in putty<br />
See the <a href="http://the.earth.li/~sgtatham/putty/0.60/htmldoc/Chapter8.html#pubkey-puttygen">putty documentation</a> for instructions on generating your key pair.<br />
Ensure you export the public keyfile to ~/.ssh/authorized_keys on each UNIX server you want to login (and chmod 600 on the file).
</li>
</ol>
<h4>A Helpful tip</h4>
<p>You can use putty to &#8220;cache&#8221; your key (to prevent constant retyping of your password when logging into servers) in a secure fashion using <a href="http://the.earth.li/~sgtatham/putty/0.60/htmldoc/Chapter9.html#pageant">this component</a> of putty.</p>
<p>Dont think of SSH keypairs as a means of easier logins. <strong>When used correctly it will in fact provide a more secure login</strong>; as your password is never passed over the network.</p>
]]></content:encoded>
			<wfw:commentRss>http://techdebug.com/blog/2008/05/08/always-encrypt-your-ssh-private-key/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>OpenBSD, postgresql and semaphore failures during initdb</title>
		<link>http://techdebug.com/blog/2008/04/22/openbsd-postgresql-and-semaphore-failures-during-initdb/</link>
		<comments>http://techdebug.com/blog/2008/04/22/openbsd-postgresql-and-semaphore-failures-during-initdb/#comments</comments>
		<pubDate>Mon, 21 Apr 2008 14:54:13 +0000</pubDate>
		<dc:creator>lantrix</dc:creator>
				<category><![CDATA[openbsd]]></category>
		<category><![CDATA[unix]]></category>
		<category><![CDATA[SEMMNI]]></category>
		<category><![CDATA[SEMMNS]]></category>
		<category><![CDATA[postgresql]]></category>
		<category><![CDATA[semaphores]]></category>

		<guid isPermaLink="false">http://techdebug.com/blog/2008/04/22/openbsd-postgresql-and-semaphore-failures-during-initdb/</guid>
		<description><![CDATA[Today I upgraded my postgresql database instance on OpenBSD. Did a pg_dumpall, removed the old packages and then added the new ones (latest version 8.1.9 for OpenBSD 4.0 &#8211; yes I&#8217;m behind). During the initialisation of the new DB, I got the following error: creating directory /var/postgresql/data/pg_tblspc ... ok selecting default max_connections ... 10 selecting [...]]]></description>
			<content:encoded><![CDATA[<p>Today I upgraded my postgresql database instance on <a href="http://www.openbsd.com/">OpenBSD</a>. Did a pg_dumpall, removed the old packages and then added the new ones (latest version 8.1.9 for OpenBSD 4.0 &#8211; yes I&#8217;m behind).</p>
<p>During the initialisation of the new DB, I got the following error:<br />
<pre><pre>
creating directory /var/postgresql/data/pg_tblspc ... ok
selecting default max_connections ... 10
selecting default shared_buffers ... 50
creating configuration files ... ok
creating template1 database in /var/postgresql/data/base/1 ... FATAL:&nbsp;&nbsp;could not create semaphores: No space left on device
DETAIL:&nbsp;&nbsp;Failed system call was semget(1, 17, 03600).
</pre></pre><br />
The PostgreSQL documentation talks about this <a href="http://www.postgresql.org/docs/8.1/static/kernel-resources.html#SYSVIPC">extensively</a>. However I don&#8217;t want to recompile my kernel away from <a href="http://www.openbsd.org/faq/faq5.html#BldKernel">GENERIC</a>. What else can I do?<br />
<span id="more-198"></span><br />
AFAIK It is not possible to pass the max_connections to initdb.</p>
<p>After some searching, I found the solution. It looks like the problem is that the semaphores from the old installation are still hanging around, and never got cleaned up. You can use ipcs and ipcrm to clean then up and run your initdb again.</p>
<p>First list the existing semaphores:<br />
<pre><pre>
server:~# ipcs&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Message Queues:
T&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ID&nbsp;&nbsp;&nbsp;&nbsp; KEY&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MODE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OWNER&nbsp;&nbsp;&nbsp;&nbsp;GROUP

Shared Memory:
T&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ID&nbsp;&nbsp;&nbsp;&nbsp; KEY&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MODE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OWNER&nbsp;&nbsp;&nbsp;&nbsp;GROUP
m&nbsp;&nbsp;&nbsp;&nbsp;65536&nbsp;&nbsp;&nbsp;&nbsp;5432001 --rw------- _postgresql _postgresql

Semaphores:
T&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ID&nbsp;&nbsp;&nbsp;&nbsp; KEY&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MODE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OWNER&nbsp;&nbsp;&nbsp;&nbsp;GROUP
s&nbsp;&nbsp;1376256&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0 --rw-------&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;www&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;www
s&nbsp;&nbsp;1245185&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0 --rw-------&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;www&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;www
s&nbsp;&nbsp;&nbsp;&nbsp;65538&nbsp;&nbsp;&nbsp;&nbsp;5432001 --rw------- _postgresql _postgresql
s&nbsp;&nbsp;&nbsp;&nbsp;65539&nbsp;&nbsp;&nbsp;&nbsp;5432002 --rw------- _postgresql _postgresql
s&nbsp;&nbsp;&nbsp;&nbsp;65540&nbsp;&nbsp;&nbsp;&nbsp;5432003 --rw------- _postgresql _postgresql
s&nbsp;&nbsp;&nbsp;&nbsp;65541&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 5419 --rw-r--r--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;www&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;www
</pre></pre><br />
You want to remove the semaphore sets according to the <a href="http://www.openbsd.org/cgi-bin/man.cgi?query=ipcrm&#038;apropos=0&#038;sektion=0&#038;manpath=OpenBSD+Current&#038;arch=i386&#038;format=html">ipcrm man page</a>:<br />
<pre><pre>
server:~# ipcrm -s 65538&nbsp;&nbsp; 
server:~# ipcrm -s 65539 
server:~# ipcrm -s 65540 
</pre></pre><br />
Running <em>ipcs</em> again shows the _postgresql semaphores gone:<br />
<pre><pre>
Semaphores:
T&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ID&nbsp;&nbsp;&nbsp;&nbsp; KEY&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MODE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OWNER&nbsp;&nbsp;&nbsp;&nbsp;GROUP
s&nbsp;&nbsp;1376256&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0 --rw-------&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;www&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;www
s&nbsp;&nbsp;1245185&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0 --rw-------&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;www&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;www
s&nbsp;&nbsp;&nbsp;&nbsp;65541&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 5419 --rw-r--r--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;www&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;www
</pre></pre><br />
Now you can switch to the postgres account and run your initdb:<br />
<pre><pre>
server:/usr/local/share/postgresql# su - _postgresql 
#initdb&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
The files belonging to this database system will be owned by user &quot;_postgresql&quot;.
This user must also own the server process.

The database cluster will be initialized with locale C.

creating directory /var/postgresql/data ... ok
creating directory /var/postgresql/data/global ... ok
creating directory /var/postgresql/data/pg_xlog ... ok
creating directory /var/postgresql/data/pg_xlog/archive_status ... ok
creating directory /var/postgresql/data/pg_clog ... ok
creating directory /var/postgresql/data/pg_subtrans ... ok
creating directory /var/postgresql/data/pg_twophase ... ok
creating directory /var/postgresql/data/pg_multixact/members ... ok
creating directory /var/postgresql/data/pg_multixact/offsets ... ok
creating directory /var/postgresql/data/base ... ok
creating directory /var/postgresql/data/base/1 ... ok
creating directory /var/postgresql/data/pg_tblspc ... ok
selecting default max_connections ... 40
selecting default shared_buffers ... 1000
creating configuration files ... ok
creating template1 database in /var/postgresql/data/base/1 ... ok
</pre></pre><br />
And so on it goes successfully creating your initial DB.<br />
I hope this helps someone else!</p>
]]></content:encoded>
			<wfw:commentRss>http://techdebug.com/blog/2008/04/22/openbsd-postgresql-and-semaphore-failures-during-initdb/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Coral Content Distributed network</title>
		<link>http://techdebug.com/blog/2008/04/20/coral-distributed-dns-network/</link>
		<comments>http://techdebug.com/blog/2008/04/20/coral-distributed-dns-network/#comments</comments>
		<pubDate>Sun, 20 Apr 2008 11:06:28 +0000</pubDate>
		<dc:creator>lantrix</dc:creator>
				<category><![CDATA[Musings]]></category>
		<category><![CDATA[tech]]></category>
		<category><![CDATA[unix]]></category>
		<category><![CDATA[webdev]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[content distribution]]></category>
		<category><![CDATA[slashdot]]></category>

		<guid isPermaLink="false">http://techdebug.com/blog/2008/04/20/coral-distributed-dns-network/</guid>
		<description><![CDATA[Have you ever had your website hit on a topic that people find conflicting? When the site gets viewed by the masses, you need to be prepared. If you have access to modify your web server .htaccess file then go and have a read of the Coral CDN Overview For those interested in the techie [...]]]></description>
			<content:encoded><![CDATA[<p>Have you ever had your website hit on a topic that people find conflicting? When the site gets viewed by the masses, you need to be prepared. If you have access to modify your web server .htaccess file then go and have a read of the <a href="http://www.coralcdn.org/overview/">Coral CDN Overview</a><br />
For those interested in the techie bits, here is my .htaccess for news site flood protection, and to allow CDN to serve up all my site images &#8211; thus offloading from my puny connection the bandwidth burden for images.<br />
<pre><code>
&lt;ifmodule mod_rewrite.c&gt;
RewriteEngine On
#prevent slashdot effect
RewriteCond %{HTTP_USER_AGENT} !^CoralWebPrx
RewriteCond %{HTTP_REFERER} blogspot\.com [NC,OR]
RewriteCond %{HTTP_REFERER} reddit\.com [NC,OR]
RewriteCond %{HTTP_REFERER} digg\.com [NC,OR]
RewriteCond %{HTTP_REFERER} news\.slashdot\.org [NC,OR]
RewriteCond %{HTTP_REFERER} slashdot\.org
RewriteRule ^(.*)$ http://techdebug.com.nyud.net/$1 [R,L]
#Rewrite images to allow CDN to serve them
RewriteCond %{HTTP_USER_AGENT} !^CoralWebPrx
RewriteRule ^(.*)/(.*\.(gif|png|jpe?g))$ http://techdebug.com.nyud.net/$1/$2 [R,L]
#Wordpress rewites
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
&lt;/ifmodule&gt;
</code></pre><br />
mod_rewrite is your <a href="http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html">friend</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://techdebug.com/blog/2008/04/20/coral-distributed-dns-network/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mailing attachments from the Solaris Shell</title>
		<link>http://techdebug.com/blog/2008/04/01/mailing-attachments-from-the-solaris-shell/</link>
		<comments>http://techdebug.com/blog/2008/04/01/mailing-attachments-from-the-solaris-shell/#comments</comments>
		<pubDate>Tue, 01 Apr 2008 07:00:55 +0000</pubDate>
		<dc:creator>lantrix</dc:creator>
				<category><![CDATA[unix]]></category>
		<category><![CDATA[attachments]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[mailx]]></category>
		<category><![CDATA[solaris]]></category>
		<category><![CDATA[uuencode]]></category>

		<guid isPermaLink="false">http://techdebug.com/blog/2008/04/01/mailing-attachments-from-the-solaris-shell/</guid>
		<description><![CDATA[I needed a quick way to send some files from the command line when logged into a Solaris server via ssh. This assumes the server is already configured to deliver your smtp mail. I also used mailx for the sending client. Here is how I did it, for your geeky reference. First write your message: [...]]]></description>
			<content:encoded><![CDATA[<p>I needed a quick way to send some files from the command line when logged into a Solaris server via ssh.<br />
This assumes the server is already configured to deliver your smtp mail. I also used mailx for the sending client.<br />
Here is how I did it, for your geeky reference.</p>
<p>First write your message:<br />
<pre><code>cat &lt;&lt; EOF &gt; /tmp/mailmsg
Hi this is a message
And this is the second line
EOF</code></pre></p>
<p>Then populate your recipient list, comma delimited as per the <a href="http://docs.sun.com/app/docs/doc/816-0210/6m6nb7mej?a=view">mailx(1) man page:</a><br />
<pre><code>cat &lt;&lt; EOF &gt; /tmp/mailrecipients
john.doe@nodomain.com.it,jack.black@someplace.co.za
EOF</code></pre></p>
<li>Then the actual command that will send your mail</li>
<p>. You need to uuencode your binary attachments, and you can send as many as you need.<br />
<code>(cat /tmp/mailmsg ; uuencode /path/to/file.txt file.txt ; uuencode /location/of/otherfile otherfile) | mailx -s &#039;Subject&#039; -r myemail@some.place.mx `cat /tmp/mailrecipients`</code></p>
<p>You need to specify each file name twice, once for source file to encode, and once for the encoded file name; as per the <a href="http://docs.sun.com/app/docs/doc/816-0210/6m6nb7mop?a=view">uuencode(1C) man page</a>. If you are sending from some local account on the server, the -r switch allows you to specify an alternate return address for the recipients (in other words your normal email address).</p>
<p><strong>PS: </strong>watch for the quotes and backticks. Dont mix them up!</p>
<p>Hope this helps you out someday.</p>
]]></content:encoded>
			<wfw:commentRss>http://techdebug.com/blog/2008/04/01/mailing-attachments-from-the-solaris-shell/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Clearcase Tips Number 03 &#8211; managing label conventions with perl</title>
		<link>http://techdebug.com/blog/2008/01/21/clearcase-tips-number-03-managing-label-conventions-with-perl/</link>
		<comments>http://techdebug.com/blog/2008/01/21/clearcase-tips-number-03-managing-label-conventions-with-perl/#comments</comments>
		<pubDate>Mon, 21 Jan 2008 12:23:19 +0000</pubDate>
		<dc:creator>lantrix</dc:creator>
				<category><![CDATA[clearcase]]></category>
		<category><![CDATA[unix]]></category>
		<category><![CDATA[lbtype]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[solaris]]></category>

		<guid isPermaLink="false">http://techdebug.com/blog/2008/01/21/clearcase-tips-number-03-managing-label-conventions-with-perl/</guid>
		<description><![CDATA[I previously showed you how to use a shell script with Rational Clearcase, to alert you when a new branch type was created. In this post, I will show you how to use a Perl script to enforce Clearcase labeling conventions. This example is directed toward Clearcase on UNIX (i.e. Solaris or similar) and assumes [...]]]></description>
			<content:encoded><![CDATA[<p>I <a href="http://techdebug.com/blog/2007/12/18/clearcase-tips-number-02-triggers-and-email/">previously showed you</a> how to use a shell script with Rational Clearcase, to alert you when a new branch type was created.</p>
<p>In this post, I will show you how to use a Perl script to enforce Clearcase labeling conventions. <a href='http://www.perl.org/' title='Perl'><img src='http://techdebug.com/wp-content/uploads/2008/01/perl_republic.png' style="float: right; margin-top: 5px; margin-bottom: 5px; margin-left: 10px" alt='Perl Logo' /></a>This example is directed toward Clearcase on UNIX (i.e. Solaris or similar) and assumes you have Perl installed, working and have a basic knowledge of how to program in Perl. It is a reworked version of the windows script <a href="http://www.ibm.com/developerworks/rational/library/4311.html">supplied by IBM on Developerworks</a>.</p>
<p>This is a long post, but a good one if you are a new clearcase admin who needs to enforce label names.</p>
<p><span id="more-173"></span></p>
<p><em>Lets get into it.</em></p>
<p>For this script we would like to allow only project defined labels. This list shows examples which we will aim to enforce:</p>
<ul>
<li>A user label: USER_ASMITH_NEW</li>
<li>A defect label: DEFECT_12345</li>
<li>A Project label: PROJECTA_PRERELEASE</li>
<li>Another Project label: PROJECTB_FINAL</li>
<li>A release label: REL_1.0</li>
<li>A baseline label: BASELINE_STRATA</li>
</ul>
<p>In all examples you actually want the users to define some part of the label, so for our script we will enforce only the first part up to and including the underscore; i.e. the part in italics <em>ENFORCE_</em>USERINFO. You can change this as needed for your project.</p>
<p>Initially you will need to write a perl script that can be used in a trigger event. The perl script will take the requested label (lbtype) from the clearcase label creation event, and then process that label for you. You can start the script be choosing some preferred label prefixes for your projects (as per our example list of labels above):<br />
<pre><code>
#
# Configuration Variables
#
my $USERPREFIX = &#039;USER&#039;;
my $DEFECTPREFIX = &#039;DEFECT&#039;;
my $PROJ1_PREFIX = &#039;PROJECTA&#039;;
my $PROJ2_PREFIX = &#039;PROJECTB&#039;;
my $REL_PREFIX = &#039;REL&#039;;
my $BASEPREFIX = &#039;BASELINE&#039;;
</code></pre><br />
These variables are chosen to cover potential labels for users, defects, projects, releases and baselines. As already mentioned, change them to suit your needs.</p>
<p>After you have your variables set, put in place a subroutine to gather the current Unix userID. This will prevent a user from creating user labels with other users account names in it. This subroutine will get called later when you break apart the label with <a href="http://en.wikipedia.org/wiki/Regex">regex</a>.<br />
<pre><code>
sub checkUserName {
&nbsp;&nbsp;my $user = shift(@_);

&nbsp;&nbsp;my $currentUser = uc($ENV{CLEARCASE_USER});

 if ($user !~ m/^($currentUser)/) {
&nbsp;&nbsp;&nbsp;&nbsp;`clearprompt proceed -mask proceed -type error -prompt \&quot;Can&#039;t create label for this user\&quot;`;
&nbsp;&nbsp;&nbsp;&nbsp;exit 1;
&nbsp;&nbsp;}
&nbsp;&nbsp;exit 0;
}
</code></pre>
</p>
<p>Next you need to gather the actual lbtype requested from the operation. This script will be run as a pre-operation script, unlike <a href="http://techdebug.com/blog/2007/12/18/clearcase-tips-number-02-triggers-and-email/">tip number 02</a> which was a post operation script. The idea is to check the label BEFORE it is actually created.<br />
<pre><code>
{
&nbsp;&nbsp;my $label = $ENV{CLEARCASE_LBTYPE};

&nbsp;&nbsp;# check, if label is in uppercase format
&nbsp;&nbsp;if ($label ne uc($label)) {
&nbsp;&nbsp;&nbsp;&nbsp;`clearprompt proceed -mask proceed -type error -prompt \&quot;CC Error: Label not in uppercase\&quot;`;
&nbsp;&nbsp;&nbsp;&nbsp;exit 1;
&nbsp;&nbsp;}
</code></pre><br />
Additionally with this code you are enforcing a policy of uppercase labels. If the label is not all uppercase, the script will exit with a return code of 1, causing the label creation to fail with the prompt shown in the script.</p>
<p>It is good practice to have your labels all uppercase to prevent them from being confused with branch type names (which normally you would have all in lowercase).
</p>
<p>Next you can breakdown the label using <a href="http://en.wikipedia.org/wiki/Regex">regex</a> and use some conditional checks to compare the label against all the allowed prefixes. As long as the prefix is valid, we don&#8217;t care what comes after it. The one exception is the chosen user label convention. It will require the user prefix, followed by a username that must match the current unix login name.<br />
<pre><code>
&nbsp;&nbsp;# decompose label
&nbsp;&nbsp;if ($label =~ m/^($USERPREFIX)_(.*)_(.*)$/) {
&nbsp;&nbsp;&nbsp;&nbsp;&amp;checkUserName($2);
&nbsp;&nbsp;} elsif ($label =~ m/^($DEFECTPREFIX)_(.*)$/) {
&nbsp;&nbsp;&nbsp;&nbsp;exit 0;
&nbsp;&nbsp;} elsif ($label =~ m/^($PROJ1_PREFIX)_(.*)$/) {
&nbsp;&nbsp;&nbsp;&nbsp;exit 0;
&nbsp;&nbsp;} elsif ($label =~ m/^($PROJ2_PREFIX)_(.*)$/) {
&nbsp;&nbsp;&nbsp;&nbsp;exit 0;
&nbsp;&nbsp;} elsif ($label =~ m/^($REL_PREFIX)_(.*)$/) {
&nbsp;&nbsp;&nbsp;&nbsp;exit 0;
&nbsp;&nbsp;} elsif ($label =~ m/^($BASEPREFIX)_(.*)$/) {
&nbsp;&nbsp;&nbsp;&nbsp;exit 0;
</code></pre><br />
Note that in all cases where you get a successful match, the script will exit with a return code zero, allowing the label creation to continue. Feel free to modify the <a href="http://en.wikipedia.org/wiki/Regex">regex</a> and configuration variables to test against suffixes or the entire label type.</p>
<p>Lastly should the new label not match any of your regex checks then the script will exit with a return code of one. This will abort the creation of the invalid label type.<br />
<pre><code>
&nbsp;&nbsp;} else {
&nbsp;&nbsp;&nbsp;&nbsp;# no valid prefix found
&nbsp;&nbsp;&nbsp;&nbsp;`clearprompt proceed -mask proceed -type error -prompt \&quot;CC Error: No valid Label specified - please read project guidelines\&quot;`;
&nbsp;&nbsp;&nbsp;&nbsp;exit 1;
&nbsp;&nbsp;}
}
</code></pre><br />
Don&#8217;t forget to close off that last curly bracket we opened earlier.
</p>
<p>You can download the <a href='http://techdebug.com/wp-content/uploads/2008/01/test_label_name.pl' title='Test Label Name'>whole script</a> if you are in a rush.
</p>
<p>In this script you have seen a number of variables starting with $CLEARCASE. These variables will be populated as environment variables when the label creation trigger event occurs and launches the perl script.</p>
<p>The script should be saved somewhere it can be run on the UNIX server hosting the <a href="http://en.wikipedia.org/wiki/Rational_ClearCase#Views">VOB</a>, so when Clearcase triggers it can run the script. An appropriate location would be in the home directory of the VOB owner, for example:<br />
<code>/home/ccadmin/ccscripts/test_label_name.pl</code></p>
<p>One you have saved the script, you need to actually make the trigger in Clearcase. Consider the following on creating this trigger type:</p>
<ul>
<li>We need the trigger to run before the event completes, this is what is known as a &#8220;Pre Operation&#8221;</li>
<li>We want the trigger to be enacted before a new type is made, of type labeltype.</li>
<li>We want the trigger to execute our perl script on the event occurring</li>
</ul>
<p>You can research these options by viewing the man page of the command used to make a new trigger type:<br />
<code>cleartool man mktrtype</code><br />
Once you have read the man page, you should see some examples and options that can be used. Have a go at running the command yourself.</p>
<p>This is how I created the trigger to cover all our considerations:<br />
<pre><code>cleartool mktrtype -c &quot;Trigger to validate new labels on lbtype creation&quot; -type -preop mktype \
-lbtype -all -exec /home/ccadmin/ccscripts/test_label_name.pl new_label_trigger</code></pre><br />
My example shown here is relevant to Clearcase V6, so <a href="http://www.computerhope.com/jargon/y/ymmv.htm">YMMV</a>.</p>
<p>Once that has been run, you can see your new trigger listed in the trigger type list:<br />
<pre><code>cleartool lstype -kind trtype
21-Jan.09:21&nbsp;&nbsp; ccadmin&nbsp;&nbsp;&nbsp;&nbsp; trigger type &quot;new_label_trigger&quot;
&nbsp;&nbsp;&quot;Trigger to validate new labels on lbtype creation&quot;
</code></pre></p>
<p>Next time a user creates a label type, they will either have success if they follow the guidlines you have communicated to them, or they will get an error message explaining why the label type failed.</p>
<p>See if you can tie this in with the previous tip, so that you get an email when a new lbtype is created. Over and out.</p>
]]></content:encoded>
			<wfw:commentRss>http://techdebug.com/blog/2008/01/21/clearcase-tips-number-03-managing-label-conventions-with-perl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Unix Humour</title>
		<link>http://techdebug.com/blog/2007/12/30/unix-humour/</link>
		<comments>http://techdebug.com/blog/2007/12/30/unix-humour/#comments</comments>
		<pubDate>Sat, 29 Dec 2007 15:48:54 +0000</pubDate>
		<dc:creator>lantrix</dc:creator>
				<category><![CDATA[comedy]]></category>
		<category><![CDATA[unix]]></category>
		<category><![CDATA[comic]]></category>
		<category><![CDATA[humour]]></category>

		<guid isPermaLink="false">http://techdebug.com/blog/2007/12/30/unix-humour/</guid>
		<description><![CDATA[I came across (via an old school friend on facebook) something which I just had to share. I know whom will be laughing at this.]]></description>
			<content:encoded><![CDATA[<p>I came across (via an old school friend on facebook) something which I just had to share. I know whom will be laughing at this.</p>
<p><img src="http://imgs.xkcd.com/comics/sandwich.png" alt="Unix Humour" /></p>
]]></content:encoded>
			<wfw:commentRss>http://techdebug.com/blog/2007/12/30/unix-humour/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Clearcase Tips Number 02 &#8211; Triggers and email</title>
		<link>http://techdebug.com/blog/2007/12/18/clearcase-tips-number-02-triggers-and-email/</link>
		<comments>http://techdebug.com/blog/2007/12/18/clearcase-tips-number-02-triggers-and-email/#comments</comments>
		<pubDate>Mon, 17 Dec 2007 22:00:35 +0000</pubDate>
		<dc:creator>lantrix</dc:creator>
				<category><![CDATA[clearcase]]></category>
		<category><![CDATA[unix]]></category>
		<category><![CDATA[brtype]]></category>
		<category><![CDATA[shell script]]></category>
		<category><![CDATA[trigger]]></category>

		<guid isPermaLink="false">http://techdebug.com/blog/2007/12/18/clearcase-tips-number-02-triggers/</guid>
		<description><![CDATA[I was looking for a simple way to have someone emailed when an event occurred in Rational Clearcase, like a new branch type being created. If you run Clearcase on UNIX (i.e. Solaris or similar) you can whip up a simple shell script and create your trigger. I will assume you have sendmail or similar [...]]]></description>
			<content:encoded><![CDATA[<p>I was looking for a simple way to have someone emailed when an event occurred in Rational Clearcase, like a new branch type being created. If you run Clearcase on UNIX (i.e. Solaris or similar) you can whip up a simple shell script and create your trigger. I will assume you have sendmail or similar already configured on your host so that mail utilities can send smtp mail</p>
<p><em>Lets have a go at it.</em></p>
<p>Write a shell script that uses mailx to send a message with some Clearcase trigger variables embedded in it, something like this:<br />
<pre><code>
# Comma delimited email list of mail recipients
adminmail=&quot;youraddress@your.domain.com&quot;
#This gets the host name
host=`uname -a |awk &#039;{print $2}&#039;`

#Begin send of message
echo &quot;\
Creation of brtype \&quot;$CLEARCASE_BRTYPE\&quot;
by: $CLEARCASE_USER
comment: $CLEARCASE_COMMENT&quot; \
| /usr/bin/mailx -s &quot;[$host:CLEARCASE] New branchtype $CLEARCASE_BRTYPE created&quot;
</code></pre><br />
You can download this <a href='http://techdebug.com/wp-content/uploads/2007/12/mail_new_brtype.sh' title='mail_new_brtype.sh'>mail_new_brtype.sh</a> if you are in a rush.</p>
<p>In this script you will see a number of variables starting with $CLEARCASE. These variables will be populated as environment variables when a trigger event occurs and  launches the shell script.</p>
<p>The script should be saved somewhere it can be run on the UNIX server hosting the VOB, so when Clearcase triggers it can run the script. An appropriate location would be in the home directory of the VOB owner, for example:<br />
<code>/home/ccadmin/ccscripts/mail_new_brtype.sh</code></p>
<p>One you have saved the script, you need to actually make the trigger in Clearcase. Consider the following on creating this trigger type</p>
<ul>
<li>We need the trigger to run after the event, this is what is known as a &#8220;Post Operation&#8221;</li>
<li>We want the trigger to be enacted after a new type is made, of type branchtype.</li>
<li>We want the trigger to execute our shell script on the event occurring</li>
</ul>
<p>You can research these options by viewing the man page of the command used to make a new trigger type:<br />
<code>cleartool man mktrtype</code></p>
<p>Once you have had a read of the man page, you should see some examples and options that can be used. Have a go at running the command yourself. This is what I came up with and should cover all our considerations:<br />
<code>cleartool mktrtype -c &quot;Trigger to email cfgmgr on new brtype creation&quot; -type -postop mktype -brtype -all -exec /home/ccadmin/ccscripts/mail_new_brtype.sh new_branch_trigger</code><br />
My example shown here is relevant to Clearcase V6, so YMMV.</p>
<p>Once that has been run, you can see your new trigger listed in the trigger type list:<br />
<pre><code>cleartool lstype -kind trtype
18-Dec.10:27&nbsp;&nbsp; ccadmin&nbsp;&nbsp;&nbsp;&nbsp; trigger type &quot;new_branch_trigger&quot;
&nbsp;&nbsp;&quot;Trigger to email cfgmgr on new brtype creation&quot;
</code></pre></p>
<p>Next time a user creates a branch type, you will receive an email with the branch type name, branch type comment and whom created it!</p>
<p>Look for more upcoming tips; including how to make a trigger use a perl script to validate label names.</p>
]]></content:encoded>
			<wfw:commentRss>http://techdebug.com/blog/2007/12/18/clearcase-tips-number-02-triggers-and-email/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Perl while loop memory hog</title>
		<link>http://techdebug.com/blog/2007/10/30/perl-while-loop-memory-hog/</link>
		<comments>http://techdebug.com/blog/2007/10/30/perl-while-loop-memory-hog/#comments</comments>
		<pubDate>Mon, 29 Oct 2007 23:16:57 +0000</pubDate>
		<dc:creator>lantrix</dc:creator>
				<category><![CDATA[perl]]></category>
		<category><![CDATA[unix]]></category>
		<category><![CDATA[IO::file]]></category>
		<category><![CDATA[cpu]]></category>
		<category><![CDATA[hog]]></category>
		<category><![CDATA[openbsd]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://techdebug.com/blog/2007/10/30/perl-while-loop-memory-hog/</guid>
		<description><![CDATA[I was trying to use someone elses script for logging dansguardian events to an RDBMS.The script was chewing up 99% of my CPU! I got chatting to a friend and a perl coder about this, and got some ideas. He showed me about the perl debugger using the -d switch. Awesome. I finally got my [...]]]></description>
			<content:encoded><![CDATA[<p>I was trying to use <a href="http://dansguardian.org/downloads/kusar/sqllogfifo.pl">someone elses script</a> for logging <a href="http://dansguardian.org/?page=extras">dansguardian</a> events to an RDBMS.The script was chewing up 99% of my CPU! I got chatting <a href="http://90kts.com/blog/">to a friend and a perl coder about this</a>, and got some ideas. He showed me about the perl debugger using the -d switch. Awesome. I finally got my perl script working. Installing the DBI package on OpenBSD was a snap with pkg_add (<code>pkg_add -v p5-DBD-Pg-1.47.tgz</code>). My logical debugging was as follows.</p>
<p>first I read that DBI was a memory hog so I wrote it out and put in a native postgres call, but the pgsql for perl was borked.<br />
(comment from coding friend &#8220;DBI is fine man, works for the massess&#8221;). Next I changed the while loop over the the file to a Tail::File method, but the module was badly documenting and had issues.</p>
<p>I actually ended up using IO::File to tail the log and looped over the lines (in a mad loop), but it was still broken.<br />
So I went back to DBI, which as my friend pointed out was never a problem. It worked!</p>
<p>It turned out the loop was the CPU hog and all I had to do was put in a <code>sleep 1;</code> if there was no new line in the tail.<br />
In the process I rewrote the whole script and it barely resembles the original except for the idea. <em>Now it has 0.5% CPU load at best</em>. A win for coding. I&#8217;ll post the script soon and also send it to dansguardian.</p>
<p>Comment from perl coding friend: of course &#8211;  i guessed that after u left. <img src='http://techdebug.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://techdebug.com/blog/2007/10/30/perl-while-loop-memory-hog/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>chpasswd in an OpenBSD apache chroot jail</title>
		<link>http://techdebug.com/blog/2007/10/19/chpasswd-in-an-openbsd-apache-chroot-jail/</link>
		<comments>http://techdebug.com/blog/2007/10/19/chpasswd-in-an-openbsd-apache-chroot-jail/#comments</comments>
		<pubDate>Fri, 19 Oct 2007 00:37:48 +0000</pubDate>
		<dc:creator>lantrix</dc:creator>
				<category><![CDATA[apps]]></category>
		<category><![CDATA[openbsd]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://techdebug.com/blog/2007/10/19/chpasswd-in-an-openbsd-apache-chroot-jail/</guid>
		<description><![CDATA[I&#8217;ve recently re-installed OpenBSD and had to set-up my squid intranet password changing tool again. The app I use is chpasswd Version 2.2.3. I had some trouble with getting it working in the default apache chroot jail, and found very little information out there on this app in a chroot jail. Here are my notes [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve recently re-installed OpenBSD and had to set-up my squid intranet password changing tool again. The app I use is <a href="http://sarg.sourceforge.net/chpasswd.php" title="chpasswd">chpasswd</a> Version 2.2.3.</p>
<p>I had some trouble with getting it working in the default apache chroot jail, and found very little information out there on this app in a chroot jail. Here are my notes I recorded and and steps I took. Hope it helps someone else, but <a href="http://en.wikipedia.org/wiki/Your_mileage_may_vary" title="Your mileage may vary - Wikipedia, the free encyclopedia">YMMV</a>:</p>
<p>Download chpasswd to /tmp<br />
<pre><code>
&nbsp;&nbsp;cd /tmp&lt;br /&gt;
&nbsp;&nbsp;tar -zxvf chpasswd-2.2.3.tar.gz&lt;br /&gt;
&nbsp;&nbsp;cd chpasswd-2.2.3&lt;br /&gt;
&nbsp;&nbsp;./configure --enable-cgidir=/var/www/cgi-bin/ --prefix=/etc&lt;br /&gt;
&nbsp;&nbsp;make &amp;&amp;&nbsp;&nbsp;make install&lt;br /&gt;
&nbsp;&nbsp;make clean&lt;br /&gt;
</code></pre><br />
Setup apache for CGI running in the chroot jail<br />
<pre><code>
&nbsp;&nbsp;mkdir /var/www/etc&lt;br /&gt;
&nbsp;&nbsp;mkdir /var/www/tmp&lt;br /&gt;
&nbsp;&nbsp;mkdir -p /var/www/var/tmp&lt;br /&gt;
&nbsp;&nbsp;chmod 777 /var/www/tmp&lt;br /&gt;
&nbsp;&nbsp;chmod 777 /var/www/var/tmp&lt;br /&gt;
&nbsp;&nbsp;mv /etc/chpasswd* /var/www/etc/&lt;br /&gt;
</code></pre><br />
Check which libs are compiled against chpasswd<br />
<pre><code>
&nbsp;&nbsp;ldd /var/www/cgi-bin/chpasswd.cgi&lt;br /&gt;
</code></pre><br />
Output should be similar to the following:<br />
<pre><pre>
/var/www/cgi-bin/chpasswd.cgi:
&nbsp;&nbsp;Start&nbsp;&nbsp;&nbsp;&nbsp;End&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Type Ref Name
&nbsp;&nbsp;00000000 00000000 exe&nbsp;&nbsp; 1&nbsp;&nbsp;/var/www/cgi-bin/chpasswd.cgi
&nbsp;&nbsp;03d1e000 23d4f000 rlib&nbsp;&nbsp;1&nbsp;&nbsp;/usr/lib/libc.so.38.2
&nbsp;&nbsp;09e55000 09e55000 rtld&nbsp;&nbsp;1&nbsp;&nbsp;/usr/libexec/ld.so
</pre></pre><br />
Copy the libs that chpasswd.cgi uses, shown from the ldd output, to the jail<br />
<pre><code>
&nbsp;&nbsp;mkdir -p /var/www/usr/lib&lt;br /&gt;
&nbsp;&nbsp;mkdir -p /var/www/usr/libexec&lt;br /&gt;
&nbsp;&nbsp;cp /usr/lib/libc.so.38.2 /var/www/usr/lib/&lt;br /&gt;
&nbsp;&nbsp;cp /usr/libexec/ld.so /var/www/usr/libexec/&lt;br /&gt;
</code></pre><br />
Update chpasswd configuration:<br />
<pre><code>
&nbsp;&nbsp;cd /var/www/etc&lt;br /&gt;
&nbsp;&nbsp;vi chpasswd.conf&lt;br /&gt;
&nbsp;&nbsp;vi ipauth&lt;br /&gt;
</code></pre><br />
Create squid passwd file for chpasswd to update in chroot jail<br />
<pre><code>
&nbsp;&nbsp;mkdir /var/www/etc/squid&lt;br /&gt;
&nbsp;&nbsp;touch /var/www/etc/squid/passwd&lt;br /&gt;
&nbsp;&nbsp;chown root:www /var/www/etc/squid/passwd&lt;br /&gt;
&nbsp;&nbsp;chmod 660 /var/www/etc/squid/passwd&lt;br /&gt;
</code></pre><br />
Update/Modify the auth_param section of squid.conf to use new passwd file and basic authentication (must already have ncsa_auth in place and working)<br />
<pre><code>
&nbsp;&nbsp;vi /etc/squid/squid.conf&lt;br /&gt;
&nbsp;&nbsp;&lt;samp&gt;
&nbsp;&nbsp;&nbsp;&nbsp;auth_param basic program /usr/local/squid/libexec/ncsa_auth /var/www/etc/squid/passwd&lt;br /&gt;
&nbsp;&nbsp;&nbsp;&nbsp;auth_param basic children 5&lt;br /&gt;
&nbsp;&nbsp;&nbsp;&nbsp;auth_param basic realm Home Localnet to Internet access&lt;br /&gt;
&nbsp;&nbsp;&nbsp;&nbsp;auth_param basic credentialsttl 2 hours&lt;br /&gt;
&nbsp;&nbsp;&lt;/samp&gt;
</code></pre><br />
Restart squid<br />
<pre><code>
&nbsp;&nbsp;squid -k reconfigure&lt;br /&gt;
</code></pre><br />
<em>Your app should now be usable at http://&lt;your.squidserver&gt;/cgi-bin/chpasswd.cgi</em></p>
]]></content:encoded>
			<wfw:commentRss>http://techdebug.com/blog/2007/10/19/chpasswd-in-an-openbsd-apache-chroot-jail/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Clearcase Tips number 01</title>
		<link>http://techdebug.com/blog/2007/10/16/clearcase-tips-number-01/</link>
		<comments>http://techdebug.com/blog/2007/10/16/clearcase-tips-number-01/#comments</comments>
		<pubDate>Tue, 16 Oct 2007 08:17:57 +0000</pubDate>
		<dc:creator>lantrix</dc:creator>
				<category><![CDATA[clearcase]]></category>
		<category><![CDATA[unix]]></category>
		<category><![CDATA[find]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://techdebug.com/blog/2007/10/16/clearcase-tips-number-01/</guid>
		<description><![CDATA[I found myself writing down example commands in clearcase (V6), so I thought I would share them. If you have ever needed to find files like you do in UNIX, but want to be clearcase specific, then these commands will give you a quick headstart on using the cleartool find command: How do I list [...]]]></description>
			<content:encoded><![CDATA[<p>I found myself writing down example commands in clearcase (V6), so I thought I would share them. If you have ever needed to find files like you do in UNIX, but want to be clearcase specific, then these commands will give you a quick headstart on using the cleartool find command:</p>
<p>How do I list all files and file versions going into a specific build that is labelled?<br />
Assume your label is <em>TR1_PRE_RELEASE</em><br />
<pre><code>
&nbsp;&nbsp;cleartool find . -version &#039;lbtype (TR1_PRE_RELEASE)&#039; -print
</code></pre><br />
How do I find the latest versions on branch xyz?<br />
In this example, branch xyz is the <em>tst</em> branch<br />
<pre><code>
&nbsp;&nbsp;cleartool find . -version &#039;version (.../tst/LATEST)&#039; -print
</code></pre><br />
How do I find the latest versions on xyz branch WITHOUT a specific label?<br />
For this example the xyz branch is the <em>main</em> (default clearcase) branch, and the label is <em>TR1_PRE_RELEASE</em><br />
<pre><code>
&nbsp;&nbsp;cleartool find . -version &#039;version (/main/LATEST) &amp;&amp; ! lbtype(TR1_PRE_RELEASE)&#039; -print
</code></pre><br />
How do I see what in the filesystem has changed from clearcase?<br />
This example only works if you have set your view on the same machine where the file system to compare is.<br />
<pre><code>
&nbsp;&nbsp;cd /&lt;clearcase mount path&gt;/
&nbsp;&nbsp;clearfsimport -preview -recurse /&lt;your app dir&gt;/* .|grep -v unchan |grep -v identi
</code></pre><br />
I hope that gives you incentive to go and read the <a href="http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m0/index.jsp?topic=/com.ibm.rational.clearcase.cc_ref.doc/topics/ct_find.htm" title="">clearcase find documentation</a> and learn more for yourself by trying.</p>
]]></content:encoded>
			<wfw:commentRss>http://techdebug.com/blog/2007/10/16/clearcase-tips-number-01/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Understanding the effect of MQ persistence on disk performance</title>
		<link>http://techdebug.com/blog/2007/10/09/understanding-the-effect-of-mq-persistence-on-disk-performance/</link>
		<comments>http://techdebug.com/blog/2007/10/09/understanding-the-effect-of-mq-persistence-on-disk-performance/#comments</comments>
		<pubDate>Tue, 09 Oct 2007 04:29:39 +0000</pubDate>
		<dc:creator>lantrix</dc:creator>
				<category><![CDATA[MQ]]></category>
		<category><![CDATA[unix]]></category>
		<category><![CDATA[persistence]]></category>
		<category><![CDATA[solaris]]></category>

		<guid isPermaLink="false">http://techdebug.com/blog/2007/10/09/understanding-the-effect-of-mq-persistence-on-disk-performance/</guid>
		<description><![CDATA[Do you use MQ? do you have performance problems when using persistence? An interesting article on understanding this on a Solaris platform. Koops has always been an informative source on getting my MQ performance under check, and again he comes to the front of the pack on analysis of performance issues. read more &#124; digg [...]]]></description>
			<content:encoded><![CDATA[<p>Do you use MQ? do you have performance problems when using persistence? An interesting article on understanding this on a Solaris platform. Koops has always been an informative source on getting my MQ performance under check, and again he comes to the front of the pack on analysis of performance issues.</p>
<p><a href="http://90kts.com/blog/2007/understanding-mq-persistence-on-disk-performance/">read more</a> | <a href="http://digg.com/linux_unix/Understanding_the_effect_of_MQ_persistence_on_disk_performance">digg story</a></p>
]]></content:encoded>
			<wfw:commentRss>http://techdebug.com/blog/2007/10/09/understanding-the-effect-of-mq-persistence-on-disk-performance/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MQ6 Command Levels on Solaris</title>
		<link>http://techdebug.com/blog/2007/09/13/mq6-command-levels-on-solaris/</link>
		<comments>http://techdebug.com/blog/2007/09/13/mq6-command-levels-on-solaris/#comments</comments>
		<pubDate>Thu, 13 Sep 2007 08:21:16 +0000</pubDate>
		<dc:creator>lantrix</dc:creator>
				<category><![CDATA[MQ]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://techdebug.com/blog/2007/09/13/mq6-command-levels-on-solaris/</guid>
		<description><![CDATA[The MQ command level is an integer used by MQ clients that identify what version the WebSphere MQ servers is running. This in conjunction with the Platform attribute allows a client know what commands the MQ server supports. Both are required attributes to determine usable commands. You may be asked by someone what command level [...]]]></description>
			<content:encoded><![CDATA[<p>The MQ command level is an integer used by MQ clients that identify what version the WebSphere MQ servers is running. This in conjunction with the Platform attribute allows a client know what commands the MQ server supports. Both are required attributes to determine usable commands.</p>
<p>You may be asked by someone what command level your system supports. In the case of MQ V6.0 on Solaris, the following is true:</p>
<blockquote><p><strong>MQCMDL_LEVEL_600</strong><br />
Level 600 of system control commands.<br />
This value is returned by the following: </p>
<p>Websphere MQ for AIX V6.0<br />
Websphere MQ for HP-UX V6.0<br />
Websphere MQ for i/Series V6.0<br />
WebSphere MQ for Linux V6.0<br />
<strong>Websphere MQ for Solaris V6.0 </strong><br />
Websphere MQ for Windows V6.0<br />
Websphere MQ for z/OS V6.0</p></blockquote>
<p>See <a href="http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/index.jsp?topic=/com.ibm.mq.csqzak.doc/js03081.htm">IBM&#8217;s doco</a> for further versions or systems.</p>
]]></content:encoded>
			<wfw:commentRss>http://techdebug.com/blog/2007/09/13/mq6-command-levels-on-solaris/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
