<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="http://www.eight-cubed.com/blog/rss2html.xsl"?>
<rss version="2.0" 
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
    xmlns:admin="http://webns.net/mvcb/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
    xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/"
    xmlns:wfw="http://wellformedweb.org/CommentAPI/">

  <channel>
    <title>e i g h t - c u b e d . c o m</title>
    <link>http://www.eight-cubed.com/blog/</link>
    <description>A day in the life of an OpenVMS systems specialist.  Articles and tutorials on Systems Management and Programming for OpenVMS.</description>
    <dc:language>en-us</dc:language>
    <dc:creator>James F. Duff</dc:creator>
    <dc:rights>Copyright 2010 James F. Duff</dc:rights>
    <dc:date>2010-02-02T15:36:30+11:00</dc:date>
    <admin:generatorAgent rdf:resource="http://www.movabletype.org/?v=3.34" />
    <admin:errorReportsTo rdf:resource="mailto:jim@eight-cubed.com"/>
    <sy:updatePeriod>daily</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>

        <item>
      <title>Polling Samba</title>
      <link>http://www.eight-cubed.com/blog/archives/001178.html?from=rss</link>
      <guid isPermaLink="true">http://www.eight-cubed.com/blog/archives/001178.html</guid>
      <description>Is Samba polling killing your CPU on OpenVMS?  This could be the solution.</description>
      <body xmlns="http://www.w3.org/1999/xhtml"><p>A while ago, I was on contract for my now current employer.  They wanted me to port all the functionality of their application from OpenVMS on Alpha to OpenVMS on IA64.  As part of the port, we had to switch from Advanced Server (Pathworks) to Samba on IA64.</p>

<p>I set up the Samba shares for them and ensured it worked in testing, but by the time my contract ended, the switch still hadn't been made, and was not made until about 4 months later.</p>

<p>Now I find myself looking at a machine that's completely CPU bound dealing with Samba polls from the Windows Server world out there.</p>

<p>Looking at the scripts that run in Windows land, we find that the majority of them are something like:</p>

<pre class="code>
<code class="language-dos">
if exist \\sambaserver\somedir\*.txt copy \\sambaserver\somedir\*.txt c:/somewhere/
</code>
</pre>

<p>Now, let's think about what this does.  The script asks the Samba server to connect to a share point and determine if a file is present, and copy it locally if so.  Simple, right?  But what's happening on the (OpenVMS based) Samba server?</p>

<p>Well, Samba connections are created in response to the client opening a port (139 or 445).  That is, there is no persistant server like Advanced Server.  Each time you connect to a Samba share, OpenVMS created a new process.  Now, Samba <del>is</del> tries to be smart, and assumes that the connection will be around for a while.  So it goes and reads INDEXF.SYS for the directory you connected to so as to cache file information such as the create date and size of the file (which Windows expects each time you do a directory lookup).  Unfortunately, the way the script is connecting, if there are no files to process (or even if there are) this action is a complete waste of CPU time and I/O as the share is disconnected at the end of the script.</p>

<p>The appropriate way to do this is to connect the server/directory combination as a network drive and then refer to the local drive letter in the script.  Assuming the server/directory is mapped to drive N:, the script then becomes:</p>

<pre class="code">
<code class="language-dos">
if exist n:/*.txt copy n:/*.txt c:/somewhere/
</code>
</pre>

<p>By asking the Windows admins to change to this method, I've gone from a machine that was peaking at 100% CPU to one that's now peaking at 50% CPU.  A good win for just "doing it right".</p></body>
      <dc:subject>OpenVMS</dc:subject>
      <dc:date>2010-02-02T15:36:30+11:00</dc:date>
            
      
      <slash:comments>1</slash:comments>
            <trackback:ping>http://www.eight-cubed.com/cgi-bin/mt-tb.cgi/435</trackback:ping>
      
      <wfw:commentRss>http://www.eight-cubed.com/blog/archives/commentrss/001178.rss</wfw:commentRss>
    </item>
        <item>
      <title>Not the Sydney Morning Herald</title>
      <link>http://www.eight-cubed.com/blog/archives/001177.html?from=rss</link>
      <guid isPermaLink="true">http://www.eight-cubed.com/blog/archives/001177.html</guid>
      <description>Do we really need the Java, Apache, and PHP on our production machines to manage them?  What are your views of Systems Management Homepage, a tool that is the &quot;single system management solution for managing OpenVMS&quot;?</description>
      <body xmlns="http://www.w3.org/1999/xhtml"><p>No. <a href="http://h71000.www7.hp.com/openvms/products/smh/">Systems Management Homepage</a>, a tool that is the "single system management solution for managing OpenVMS".  Well, I've heard that before.  Things like the OpenVMS Management Station spring to mind.</p>

<p>As far as I can see, this product is just a bunch of MIB extensions which feed into Insight Manager.</p>

<p>Do we really need the Java, Apache, and PHP on our production machines to manage them?  I thought I was doing pretty well at the command line over the last 25 years.  Perhaps I'm missing something?</p>

<p>I'd love to hear your experiences with this product, pro and con.  Feel free to comment below.</p></body>
      <dc:subject>Systems Management</dc:subject>
      <dc:date>2010-01-21T16:50:55+11:00</dc:date>
            
      
      <slash:comments>2</slash:comments>
            <trackback:ping>http://www.eight-cubed.com/cgi-bin/mt-tb.cgi/434</trackback:ping>
      
      <wfw:commentRss>http://www.eight-cubed.com/blog/archives/commentrss/001177.rss</wfw:commentRss>
    </item>
        <item>
      <title>Single member shadow sets</title>
      <link>http://www.eight-cubed.com/blog/archives/001174.html?from=rss</link>
      <guid isPermaLink="true">http://www.eight-cubed.com/blog/archives/001174.html</guid>
      <description>I wholeheartedly support Bob Gezelter&apos;s proposal that HP change the licensing terms for Host Based Volume Shadowing to allow no-cost single member shadow sets.</description>
      <body xmlns="http://www.w3.org/1999/xhtml"><p><a href="http://www.rlgsc.com/">Bob Gezelter</a> has just published <a href="http://www.openvms.org/stories.php?story=10/01/13/0826890">an article</a> on <a href="http://www.openvms.org/">openvms.org</a> concerning, among other things, the proposal that HP change the licensing terms for <a class="external" href="http://h30266.www3.hp.com/PDFs/SPDVolShad.pdf">Host Based Volume Shadowing</a> to allow no-cost single member shadow sets.</p>

<p>I wholeheartedly support this proposal.  HBVS is to my mind a critical component of redundant and resiliant systems, and reducing the barrier to entry can only be a good thing for customers and HP both.</p>

<p>The benefit to the customer is the ease of adding or transitioning storage with the purchase of the HBVS license to enable more than one physical member.  If the single physical device to be transitioned is already a member of a shadowset, no downtime need result.</p>

<p>This concept is so useful that even at the last large site I worked at that had a full license for HBVS, we still had every disk respresented by a DSA device, even if they were a single physical disk.  The time saved by being able to add and remove shadow members to copy/transition is worth the extra layer of driver code.</p></body>
      <dc:subject>Systems Management</dc:subject>
      <dc:date>2010-01-14T16:16:42+11:00</dc:date>
            
      
      <slash:comments>1</slash:comments>
            <trackback:ping>http://www.eight-cubed.com/cgi-bin/mt-tb.cgi/433</trackback:ping>
      
      <wfw:commentRss>http://www.eight-cubed.com/blog/archives/commentrss/001174.rss</wfw:commentRss>
    </item>
        <item>
      <title>How much faster is FAST I/O?</title>
      <link>http://www.eight-cubed.com/blog/archives/001173.html?from=rss</link>
      <guid isPermaLink="true">http://www.eight-cubed.com/blog/archives/001173.html</guid>
      <description>Quite some time ago, I was asked how much better FAST I/O is than say, accessing the data via reading...</description>
      <body xmlns="http://www.w3.org/1999/xhtml"><p>Quite some time ago, I was asked <a href="http://www.eight-cubed.com/blog/archives/000308.html#c002587">how much better FAST I/O is</a> than say, accessing the data via reading blocks with $QIOW.  I didn't know at the time, and if you've spent any time in this game, you'll know that "I don't know" is an unacceptable answer.  The correct response is <a href="http://bwatwood.edublogs.org/2009/04/21/ill-find-out-sir/">"I'll find out!"</a>.</p>

<p>Here are the results of reading a sequential file block by block with <a href="http://h71000.www7.hp.com/doc/83final/4527/4527pro_080.html#io_perform">$IO_PERFORM</a>W() and <a href="http://h71000.www7.hp.com/doc/83final/4527/4527pro_093.html#jun_423">$QIO</a>W().  The test file is a 500,000 block file marked no_caching residing on a privately mounted disk served up by an EVA 8100.  Two programs access the file with the <a href="http://h71000.www7.hp.com/doc/732final/aa-pv6sf-tk/00/00/11-con.html">QIO/ACP interface</a>, and then perform 500,000 reads of 512 bytes on the file to completely read the file.  Note that the EVA is allowed to cache the disk (for both programs) so we should eliminate a lot of disk latency from the timing after the first couple of runs.  LIB$INIT_TIMER() and LIB$SHOW_TIMER() are used to record results, and the average of ten alternate runs is calculated.</p>

<p>The average elapsed time for FAST I/O verses QIO is 51.3 verses 52.0 seconds.</p>

<p>The average CPU time for FAST I/O verses QIO is 3.63 verses 5.01 seconds.</p>

<p>As we expect, significant time is spent reading the data from the disk, and the difference between the two averages is less than 1.4%  But the difference in CPU time is marked at 27.6%</p>

<p>So in conclusion, if you need to do extensive non-record I/O to a file (or you're looking to implement your own file structure), and you can coerce the systems manager into giving you the VMS$BUFFER_OBJECT_USER identifier, you can save significant CPU time by using the <a href="http://h71000.www7.hp.com/doc/82final/5841/5841pro_069.html#index_x_1899">Fast I/O services</a>.</p></body>
      <dc:subject>OpenVMS</dc:subject>
      <dc:date>2010-01-08T19:44:16+11:00</dc:date>
            
      
      <slash:comments>3</slash:comments>
            <trackback:ping>http://www.eight-cubed.com/cgi-bin/mt-tb.cgi/432</trackback:ping>
      
      <wfw:commentRss>http://www.eight-cubed.com/blog/archives/commentrss/001173.rss</wfw:commentRss>
    </item>
        <item>
      <title>Race condition in SYSTARTUP_VMS.COM</title>
      <link>http://www.eight-cubed.com/blog/archives/001172.html?from=rss</link>
      <guid isPermaLink="true">http://www.eight-cubed.com/blog/archives/001172.html</guid>
      <description>How to avoid temporary file name collisions, and how not to use sysman input files.</description>
      <body xmlns="http://www.w3.org/1999/xhtml"><p>As you know, <a href="http://www.eight-cubed.com/blog/archives/001164.html">I recently accepted permanent employment</a> as an OpenVMS Systems Specialist (yeah, yeah, I know I have to do Un*x/Windoze server support too).  As the technical support team is rather light on the ground at the moment after some positions have become vacant, I was asked if I was contactable over the holidays between Christmas and the New Year.  Well, I could hardly say "no".</p>

<p>Needless to say, I was called multiple times for various application issues that occurred after a blade enclosure was power cycled (eek) to clear a stuck mezzanine card.  Of course, <a href="http://en.wikipedia.org/wiki/Murphy%27s_law">Murphy's Law</a> states that half the production cluster was in that enclosure.</p>

<p>On investigation of the startup issue, it became apparent that the startup on one of the two nodes that rebooted had gone into some sort of infinite loop.  On tracking down the problem, I discovered a wonderful piece of DCL that, if run by multiple nodes at the same time, would undoubtably have temporary filename collisions.  The command procedure created a non-unique temp file, and then deleted all versions of it.</p>

<p>Of course, the temp file was being used for input to <code class="language-dcl">sysman</code> by doing the following horrible hack:</p>

<pre class="code">
<code class="language-dcl">
$ temp_file = "sys$manager:temp.tmp"
$ define/nolog sys$input 'temp_file'
$ mc sysman
$ deassign sys$input
$ delete/nolog 'temp_file';*
</code>
</pre>

<p>Erk.  What happens if the file's not there?  You guessed it - <code class="language-dcl">sysman</code> goes into an infinite loop requesting a command with an alphabetic first character!  What obviously happened in the startup was that one node deleted the file while the other was still creating it.  Bad, bad, bad.</p>

<p>The proper way to do this is of course to use the <code class="language-dcl">f$unique()</code> lexical function to ensure you have no temp file name collisions.  In addition, let's use <code class="language-dcl">sysman</code>'s @ command to input the temp file:</p>

<pre class="code">
<code class="language-dcl">
$ temp_file = "sys$manager:" + f$unique() + ".tmp"
$ mc sysman @'temp_file'
$ delete/nolog 'temp_file';*
</code>
</pre>

<p>Even if the temp file doesn't exist, you at least don't get an infinite loop.  You just get a nice <code>%RMS-E-FNF, file not found</code> message.</p></body>
      <dc:subject>Systems Management</dc:subject>
      <dc:date>2010-01-06T15:29:24+11:00</dc:date>
            
      
      <slash:comments>0</slash:comments>
            <trackback:ping>http://www.eight-cubed.com/cgi-bin/mt-tb.cgi/431</trackback:ping>
      
      <wfw:commentRss>http://www.eight-cubed.com/blog/archives/commentrss/001172.rss</wfw:commentRss>
    </item>
        <item>
      <title>The C Programming Language Section 4.10 Recursion</title>
      <link>http://www.eight-cubed.com/blog/archives/001170.html?from=rss</link>
      <guid isPermaLink="true">http://www.eight-cubed.com/blog/archives/001170.html</guid>
      <description>An extremely funny parody of part of The C Programming Language book, with a special guest author H.P. Lovecraft.</description>
      <body xmlns="http://www.w3.org/1999/xhtml"><p>An extremely funny<sup style="font-size:9px">1</sup> parody of part of "The C Programming Language" book, with a special guest author H.P. Lovecraft can be found at <a href="http://www.bobhobbs.com/files/kr_lovecraft.html">http://www.bobhobbs.com/files/kr_lovecraft.html</a>.  I'm going to reproduce it below the fold in its entirety as this, like <a href="http://cos.polyamory.org/text/T/VAXorcist">The VAXorcist</a>, deserves preservation eternal (plus I'm going to fix the compile error in the original code ;)</p>

<p>[1] Funny if you're into C programming and Lovecraft.  Else avoid it like the plague.</p></body>
      <dc:subject>Web Stuff</dc:subject>
      <dc:date>2009-12-23T15:14:15+11:00</dc:date>
            
      
      <slash:comments>1</slash:comments>
            <trackback:ping>http://www.eight-cubed.com/cgi-bin/mt-tb.cgi/430</trackback:ping>
      
      <wfw:commentRss>http://www.eight-cubed.com/blog/archives/commentrss/001170.rss</wfw:commentRss>
    </item>
        <item>
      <title>The known universe</title>
      <link>http://www.eight-cubed.com/blog/archives/001167.html?from=rss</link>
      <guid isPermaLink="true">http://www.eight-cubed.com/blog/archives/001167.html</guid>
      <description>This video gives a view of the universe with all depicted objects accurate to currently measured scientific data.  Rather amazing.  Via Jason Kottke.</description>
      <body xmlns="http://www.w3.org/1999/xhtml"><!--[if !IE]> -->
<object type="application/x-shockwave-flash"
  data="http://www.youtube.com/v/17jymDn0W6U" width="425" height="344">
<!-- <![endif]-->
<!--[if IE]>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
  codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
  width="425" height="344">
  <param name="movie" value="http://www.youtube.com/v/17jymDn0W6U" />
<!--><!---->
  <param name="wmode" value="transparent"></param>
  <param name="menu" value="false" />

  <p>You do not appear to have a Flash plugin installed.  This movie gives a view of the universe with all depicted objects accurate to currently measured scientific data.</p>
</object>
<!-- <![endif]-->

<p>This video gives a view of the universe with all depicted objects accurate to currently measured scientific data.  Rather amazing.  Via <a href="http://www.kottke.org">Jason Kottke</a>.</p></body>
      <dc:subject>Random Musings</dc:subject>
      <dc:date>2009-12-18T07:02:05+11:00</dc:date>
            
      
      <slash:comments>0</slash:comments>
            <trackback:ping>http://www.eight-cubed.com/cgi-bin/mt-tb.cgi/429</trackback:ping>
      
      <wfw:commentRss>http://www.eight-cubed.com/blog/archives/commentrss/001167.rss</wfw:commentRss>
    </item>
        <item>
      <title>Queue management weirdness</title>
      <link>http://www.eight-cubed.com/blog/archives/001166.html?from=rss</link>
      <guid isPermaLink="true">http://www.eight-cubed.com/blog/archives/001166.html</guid>
      <description>This is weird.  I was trying to come up with a way to let specific users use SMTP to send email off a box, and I thought &quot;ah, there&apos;s a generic queue, and an execution queue.  I can just modify the protection of the execution queue, and add an ACL for the users I want to allow email access.&quot;</description>
      <body xmlns="http://www.w3.org/1999/xhtml"><p>This is weird.  I was trying to come up with a way to let specific users use SMTP to send email off a box, and I thought "ah, there's a generic queue, and an execution queue.  I can just modify the protection of the execution queue, and add an ACL for the users I want to allow email access."</p>

<p>So I set up a test:</p>

<pre class="code">
<code class="language-dcl">
$ write sys$output f$getsyi("arch_name") + " " + f$getsyi("version")
IA64 V8.3-1H1
$ init/que/batch/start test_exe_q/prot=(s:m,o:d,g:r,w:r)/own=system
$ init/que/batch/generic=test_exe_q/start test_gen_q/own=system
$ set acl/obj=que/acl=(ident=[*,*],access=none)
$ sh que/full test_*_q
Batch queue TEST_EXE_Q, idle, on xxxxxx::
  /BASE_PRIORITY=4 /JOB_LIMIT=1 /OWNER=[SYSTEM] /PROTECTION=(S:M,O:D,G:R,W:R)
         (IDENTIFIER=[*,*],ACCESS=NONE)

Generic batch queue TEST_GEN_Q
  /GENERIC=(TEST_EXE_Q) /OWNER=[SYSTEM] /PROTECTION=(S:M,O:D,G:R,W:S)
$
</code>
</pre>

<p>Obviously, I had privileges when I did this.  Note that the execution queue has no world submit, and anyway, the ACL should block <em>anything</em> from using the queue (with the exception of someone holding BYPASS or SYSPRV privileges).</p>

<p>Next, I went and disabled my privileges with authorize.  My default privilege mask consisted of TMPMBX and NETMBX.</p>

<p>Thinking "OK, now to test this", I submitted a batch job, expecting it to hang in the generic queue.  To my utter surprise, it executed.  What was going on here?  I'd assumed (yes, I know what assume stands for, that's why I was doing a test) that the queue manager software would look at the system authorization file and rightslist to determine access before moving the batch queue entry from the generic queue to the execution queue, but apparently not.  I can only guess that some smart programmer coded a check to see if the submitting process was still there, and grabbed the privilege mask from the submitting process as an I/O optimization.</p>

<p>When I logged the submitting process out, then logged back in, everything worked as I expected it to in the first place.</p>

<p>Weird, non-intuitive behaviour.</p></body>
      <dc:subject>Systems Management</dc:subject>
      <dc:date>2009-12-15T15:30:55+11:00</dc:date>
            
      
      <slash:comments>2</slash:comments>
            <trackback:ping>http://www.eight-cubed.com/cgi-bin/mt-tb.cgi/428</trackback:ping>
      
      <wfw:commentRss>http://www.eight-cubed.com/blog/archives/commentrss/001166.rss</wfw:commentRss>
    </item>
        <item>
      <title>CMS API documentation</title>
      <link>http://www.eight-cubed.com/blog/archives/001165.html?from=rss</link>
      <guid isPermaLink="true">http://www.eight-cubed.com/blog/archives/001165.html</guid>
      <description>The documentation for the CMS API is in drastic need of a review.  And have I found a significant memory overrun in the API?  You bet I have.</description>
      <body xmlns="http://www.w3.org/1999/xhtml"><p>
I've recently been been working on a retrofit of a proper source code tracking and build system.  I use CMS and MMS extensively for my own projects, but I'd forgot how tricky it can be for a multi-developer environment.  It's slowly getting there, however.</p>

<p>Unfortunately, none of the forward progress is being helped by the CMS API documentation, which is riddled by cut and paste errors.  You might be reading the section on CMS$REPLACE() and come across the following:</p>

<blockquote>
<p>
"If multiple reservations exist for the element generation, you must specify the
identification number of the exact reservation to be unreserved (canceled)."
</p>
</blockquote>

<p>Unreserved?  Don't you mean "replaced"?  I was reporting these to HP as I came across them, but after 10 or so, I gave up.  The entire manual needs a review.</p>

<p>Speaking of incorrect documentation, as part of the API, the routines require a "Library Data Block" to maintain context.  This is documented as an array of 50 longwords.  There is even an SDL file supplied for the API that defines the structure of this block (which is broken as delivered, but I digress).  Unfortunately, it appears that the software doesn't agree with either the documentation or the SDL.  Witness the following:</p>

<pre class="code">
<code class="language-c">
#include &lt;stdio.h&gt;
#include &lt;stdlib.h&gt;
#include &lt;stsdef.h&gt;
#include &lt;descrip.h&gt;
#include &lt;lib$routines.h&gt;
#include "cms$routines.h"

int main (void) {

static int r0_status;
static int i;
static int overwrite;
static $DESCRIPTOR (lib_d, "CMS$LIB");
static ldb_cntrlblk ldb;
static int guard[20];

    printf ("Variable    Start    Length   End\n"
            "ldb         %08X %08X %08X\n"
            "guard       %08X %08X %08X\n",
            &amp;ldb, sizeof (ldb), (int)&amp;ldb + sizeof (ldb) - 1,
            &amp;guard[0], sizeof (guard), (int)&amp;guard[0] + sizeof (guard) - 1);

    for (i = 0; i &lt; 20; i++) {
        guard[i] = 0xdeadbeef;
    }

    r0_status = cms$set_library (&amp;ldb,
                                 &amp;lib_d,
                                 0,
                                 0,
                                 0,
                                 0,
                                 0,
                                 0,
                                 0);
    if (!$VMS_STATUS_SUCCESS (r0_status)) {
        lib$signal (r0_status);
    }

    overwrite = 0;
    for (i = 0; i &lt; 20; i++) {
        if (guard[i] != 0xdeadbeef) {
            overwrite++;
        }
    }

    if (overwrite) {
        printf ("%d longwords of guard were overwritten by "
                "the call to cms$set_library!\n",
                overwrite);
    }
}
</code>
</pre>

<p>
Running this after defining a CMS library demonstrates what appears to be a memory overrun within the CMS$SET_LIBRARY routine.  What else is lurking, I wonder?</p>

<pre class="code">
<code class="language-dcl">
$ cc/version
HP C V7.2-001 on OpenVMS IA64 V8.3-1H1
$ cc demo
$ link demo
$ cms show version
CMS Version V4.5-2
$ cms set lib my_disk:[cms]
%CMS-I-LIBIS, library is MY_DISK:[CMS]
%CMS-S-LIBSET, library set
$ run demo
Variable    Start    Length   End
ldb         00010000 000000C8 000100C7
guard       000100C8 00000050 00010117
%CMS-I-LIBIS, library is MY_DISK:[CMS]
7 longwords of guard were overwritten by the call to cms$set_library!
$ 
</code>
</pre></body>
      <dc:subject>Programming</dc:subject>
      <dc:date>2009-12-11T14:21:40+11:00</dc:date>
            
      
      <slash:comments>2</slash:comments>
            <trackback:ping>http://www.eight-cubed.com/cgi-bin/mt-tb.cgi/427</trackback:ping>
      
      <wfw:commentRss>http://www.eight-cubed.com/blog/archives/commentrss/001165.rss</wfw:commentRss>
    </item>
        <item>
      <title>Permanent position</title>
      <link>http://www.eight-cubed.com/blog/archives/001164.html?from=rss</link>
      <guid isPermaLink="true">http://www.eight-cubed.com/blog/archives/001164.html</guid>
      <description>I&apos;m very happy to announce that I&apos;ve accepted a permanent position at a company that I&apos;ve done contracting for in the past.  There is a lot of work to do here in the development tool space.  Additionally, I believe the performance of the application could significantly benefit from an analysis of the underlying RMS files.  Now I&apos;ll have time to do that (when I not doing other systems admin-y things).</description>
      <body xmlns="http://www.w3.org/1999/xhtml"><p>I'm very happy to announce that I've accepted a permanent position at a company that I've done contracting for in the past.  There is a lot of work to do here in the development tool space.  Additionally, I believe the performance of the application could significantly benefit from an analysis of the underlying RMS files.  Now I'll have time to do that (when I not doing other systems admin-y things).</p></body>
      <dc:subject>Personal</dc:subject>
      <dc:date>2009-12-09T15:39:45+11:00</dc:date>
            
      
      <slash:comments>1</slash:comments>
            <trackback:ping>http://www.eight-cubed.com/cgi-bin/mt-tb.cgi/426</trackback:ping>
      
      <wfw:commentRss>http://www.eight-cubed.com/blog/archives/commentrss/001164.rss</wfw:commentRss>
    </item>
        <item>
      <title>Porting progress</title>
      <link>http://www.eight-cubed.com/blog/archives/001162.html?from=rss</link>
      <guid isPermaLink="true">http://www.eight-cubed.com/blog/archives/001162.html</guid>
      <description>As of yesterday, all the source compiles on both platforms, and I have the programmers looking at uninitialized decimal data issues at present.</description>
      <body xmlns="http://www.w3.org/1999/xhtml"><p>As some of you perhaps remember, I was engaged to look at <a href="http://www.eight-cubed.com/blog/archives/001151.hml">another port to IA64</a> a while ago.  I haven't been much engaged with this process in recent times, as I've been waiting for the developers to fix some rather important modules that failed to compile initially.</p>

<p>As of yesterday, all the source compiles on both platforms, and I have the programmers looking at <a href="http://www.eight-cubed.com/blog/archives/001118.html">uninitialized decimal data issues</a> at present.</p>

<p>Once the system tests out functionally, I'm sure I'll get called back in to look at the performance issues that inevitably seem to arise in Alpha to IA64 ports.</p></body>
      <dc:subject>Systems Management</dc:subject>
      <dc:date>2009-12-04T16:48:50+11:00</dc:date>
            
      
      <slash:comments>0</slash:comments>
            <trackback:ping>http://www.eight-cubed.com/cgi-bin/mt-tb.cgi/425</trackback:ping>
      
      <wfw:commentRss>http://www.eight-cubed.com/blog/archives/commentrss/001162.rss</wfw:commentRss>
    </item>
        <item>
      <title>Cool DCL tricks</title>
      <link>http://www.eight-cubed.com/blog/archives/001160.html?from=rss</link>
      <guid isPermaLink="true">http://www.eight-cubed.com/blog/archives/001160.html</guid>
      <description>Did you know that is you have the appropriate privileges, you can issue a CTRL-T against another process?  Even another process on another node of the cluster.  Also, how to enhance the output of CTRL-T from a command procedure and compiled code.</description>
      <body xmlns="http://www.w3.org/1999/xhtml"><p>I <a href="http://www.eight-cubed.com/blog/archives/000263.html">mentioned this feature </a> when it was unofficially announced but I haven't mentioned it since.  As it's pretty cool, it deserves a little writeup.</p>

<p>Did you know that is you have the appropriate privileges, you can issue a CTRL-T against another process?  Even another process on another node of the cluster?  All you need to do is define a DCL symbol called <code class="language-dcl">DCL$CTRLT_PID</code> to be the <acronym title="Process ID">PID</acronym> of the target process.  Then hitting CTRL-T returns information on that process rather than your current process.</p>

<p>The second part of this is that you can modify the output that CRTL-T produces.  To do this, you define a DCL symbol called <code class="language-dcl">DCL$CTRLT</code>.  Here's an example of doing this in a DCL command procedure (lifted from the release notes):</p>

<pre class="code">
<code class="language-dcl">
$       inner = 0
$       outer = 0
$loop:
$loop1:
$       if inner .gt. 20000
$       then
$           goto end_loop1
$       endif
$       inner = inner + 1
$       dcl$ctrlt = F$FAO ("Inner count is !SL !/ Outer count is !SL", -
                           inner, outer)
$       goto loop1
$end_loop1:
$       inner = 0
$       outer = outer + 1
$       goto loop
</code>
</pre>

<p>Even more interestingly, you can use this technique from within a program and display variable information:</p>

<pre class="code">
<code class="language-c">
#include &lt;stdio.h&gt;
#include &lt;stdlib.h&gt;
#include &lt;descrip.h&gt;
#include &lt;stsdef.h&gt;
#include &lt;lib$routines.h&gt;

int main (void) {

static int r0_status;
static int count = 0;
static $DESCRIPTOR (symbol_d, "DCL$CTRLT");
static char value[256];
static struct dsc$descriptor_s value_d = { 0,
                                           DSC$K_DTYPE_T,
                                           DSC$K_CLASS_S,
                                           value };

    while (TRUE) {

        value_d.dsc$w_length = sprintf (value, "Count is %d", ++count);
        r0_status = lib$set_symbol (&amp;symbol_d, &amp;value_d);
        if (!$VMS_STATUS_SUCCESS (r0_status)) {
            (void)lib$signal (r0_status);
        }
    }
}
</code>
</pre></body>
      <dc:subject>DCL</dc:subject>
      <dc:date>2009-11-30T14:54:21+11:00</dc:date>
            
      
      <slash:comments>1</slash:comments>
            <trackback:ping>http://www.eight-cubed.com/cgi-bin/mt-tb.cgi/423</trackback:ping>
      
      <wfw:commentRss>http://www.eight-cubed.com/blog/archives/commentrss/001160.rss</wfw:commentRss>
    </item>
        <item>
      <title>Logging verses debugging</title>
      <link>http://www.eight-cubed.com/blog/archives/001159.html?from=rss</link>
      <guid isPermaLink="true">http://www.eight-cubed.com/blog/archives/001159.html</guid>
      <description>Ian Cartwright wrote an interesting piece calling for banning the debugger in the late stages of a development project.  He says that &quot;This usually leads to a big upswing in the amount of logging and it&apos;s logging we know helps to fix issues&quot;.  Previously in the same article he implies that a single exception and its stack trace are not enough information to locate the problem.  I don&apos;t agree with either of these positions.</description>
      <body xmlns="http://www.w3.org/1999/xhtml"><p><a href="http://iancartwright.com">Ian Cartwright</a> wrote a piece calling for <a href="http://iancartwright.com/blog/2009/11/ban-debugger.html">banning the debugger</a> in the late stages of a development project.  He says that "This usually leads to a big upswing in the amount of logging and it's logging we know helps to fix issues".  Previously in the same article he implies that a single exception and its stack trace are not enough information to locate the problem.</p>

<p>Now, obviously Ian is Microsoft focused, but if I can locate the failing line of code  (even down to the line of assembly code that produced the exception) on OpenVMS by <a href="http://www.eight-cubed.com/articles/traceback.html">reading a traceback dump</a>, surely he can do it on his operating system of choice?</p>

<p>Granted, without some logging, you may not have contextual information about what the end user was doing with the software at the time, but I've found you rarely need that once you have the buggy line of code staring you in the face.</p>

<p>Conversely, one engineer I know writes an exception handler that will deal with all unexpected errors produced by each program he writes.  The exception handler dumps appropriate context from the data structures to a file.  Overkill?  He thinks not, as <em>this is first part of the code he writes</em>, and he's convinced having this in place saves him significant development time.</p>

<p>Having said all that, I'm going to have to disagree with Ian.  Taking away the most versatile tool the developer has to examine what's occuring in the code, and then <em>retrofitting</em> logging speaks of poor design up front.</p>

<p>P.S. Before you say "<a href="http://en.wikipedia.org/wiki/Big_Design_Up_Front">Up front design</a>?!?  What are you, a dinosaur?" here's an <a href="http://en.wikipedia.org/wiki/Agile_software_development">Agile</a> <a href="http://en.wikipedia.org/wiki/User_story">story card</a> for you:</p>

<blockquote>
<p>
"The end user will never see an unhandled error, instead they will see a message that an error has occurred and that the development team has automatically been notified of this fact. The program will then save enough contextual information to a text file to establish what the end user was doing when the error occured, and exactly where in the program the error occured.  This text file will then be used to automatically establish a bug report (or increase the priority of an existant bug report) in the bug tracking system."
</p>
</blockquote></body>
      <dc:subject>Programming</dc:subject>
      <dc:date>2009-11-25T06:31:15+11:00</dc:date>
            
      
      <slash:comments>1</slash:comments>
            <trackback:ping>http://www.eight-cubed.com/cgi-bin/mt-tb.cgi/422</trackback:ping>
      
      <wfw:commentRss>http://www.eight-cubed.com/blog/archives/commentrss/001159.rss</wfw:commentRss>
    </item>
        <item>
      <title>MMS dependency files</title>
      <link>http://www.eight-cubed.com/blog/archives/001158.html?from=rss</link>
      <guid isPermaLink="true">http://www.eight-cubed.com/blog/archives/001158.html</guid>
      <description>Recently, I&apos;ve been asked to retrofit a build dependency system, a source versioning system, and redo the code promotion scripts for a rather large code repository.  The obvious choice here is the CMS and MMS tools from the DECset product.  I thought I&apos;d start with the dependency stuff, as I can then use it to test the checkout and checkin, rebuilds, and promotion stuff.</description>
      <body xmlns="http://www.w3.org/1999/xhtml"><p>Recently, I've been asked to retrofit a build dependency system, a source versioning system, and redo the code promotion scripts for a rather large code repository.  The obvious choice here is the CMS and MMS tools from the <a href="http://h71000.www7.hp.com/commercial/decset/brochure.html">DECset</a> product.  I thought I'd start with the dependency stuff, as I can then use it to test the checkout and checkin, rebuilds, and promotion stuff.</p>

<p>The system is a little large (over 1900 standalone executable images) and I sure didn't want to hand code that many MMS files.  So my thought was to use the in-built dependency generator in MMS to do a first cut, and then <a href="http://www.catb.org/~esr/jargon/html/A/automagically.html">automagically</a> <a href="http://www.catb.org/~esr/jargon/html/M/munge.html">munge</a> the files into their final form.</p>

<p>This unfortunately proved to be unworkable due to a number of factors, not the least being that the code repository uses the same file name extension (that is, the bit after the dot) to represent at least five different files types, each type needing a different action to update the target.  So I hand coded a few MMS files, then wrote a program to look for all CALL and COPY statements in the COBOL program tree.</p>

<p>Once the dependencies where detected (and the inevitable special cases dealt with), the code outputs a nicely formatted MMS file based on my hand coded templates, which I'm happy to say built the most complex of the repository's executables on about the second go.</p>

<p>Now to run it for the other 1900+... </p></body>
      <dc:subject>Programming</dc:subject>
      <dc:date>2009-11-20T15:35:05+11:00</dc:date>
            
      
      <slash:comments>0</slash:comments>
            <trackback:ping>http://www.eight-cubed.com/cgi-bin/mt-tb.cgi/421</trackback:ping>
      
      <wfw:commentRss>http://www.eight-cubed.com/blog/archives/commentrss/001158.rss</wfw:commentRss>
    </item>
        <item>
      <title>Karmic Koala</title>
      <link>http://www.eight-cubed.com/blog/archives/001155.html?from=rss</link>
      <guid isPermaLink="true">http://www.eight-cubed.com/blog/archives/001155.html</guid>
      <description>As you all probably are aware, Ubuntu 9.10 was released yesterday.  I took the time to upgrade my server today, and boy, was it easy.  And with a codename of &quot;Karmic Koala&quot;, how could I resist running it?</description>
      <body xmlns="http://www.w3.org/1999/xhtml"><p>As you all probably are aware, Ubuntu 9.10 was released yesterday.  I took the time to upgrade my server today, and boy, was it easy.  And with a codename of "Karmic Koala", how could I resist running it?</p>
<p>If you are connected to the net, all you have to do to upgrade is:</p>
<pre class="code">
<code class="language-bash">
~$ sudo do-release-upgrade
</code>
</pre>
<p>and follow a couple of simple prompts.  The only nonstandard things I had to do was shut down proftpd by hand to allow the upgrade of libc, and redo a minor modification to my php.ini file.</p>
<p>It was all done in less that 20 minutes.  Too cool.</p></body>
      <dc:subject>Linux</dc:subject>
      <dc:date>2009-10-30T15:28:35+11:00</dc:date>
            
      
      <slash:comments>0</slash:comments>
            <trackback:ping>http://www.eight-cubed.com/cgi-bin/mt-tb.cgi/420</trackback:ping>
      
      <wfw:commentRss>http://www.eight-cubed.com/blog/archives/commentrss/001155.rss</wfw:commentRss>
    </item>
    

  </channel>
</rss>