Ever have to run a program with a variety of options over and over again? If your a Unix, Linux, BSD, Mac etc. programmer and/or sysadmin then... yes you have. The key to success of course is my favorite sysadmin attribute: laziness. In this text a look at one simple wrapper for cron and a Perl library script wrapper.
dnetMany programs come with modules that can registered and loaded. Some are on demand, others compiled in while still others are precompiled and can be loaded on demand (several Operating System kernels come to mind that have such a capability). In this text, an example of a program that allows a module to be written and compiled onto a program with relative ease. The example program is the dnet test program which ships with libdnet written by Dug Song.
Ever had to setup nagios monitoring for a group of very similar systems? Say, perhaps, high performance compute nodes? Well, I have. And being a lazy system admin, I decided instead of having to make (N) changes to the config file I would prefer to simply autogenerate the configurations. Ideally, one might use a base configuration file. Of course, even that was too much work for me, I just jammed it into two shell scripts. Regardless, here is a simple method for quickly generating nagios configurations that should scale quite nicely.
Taken from wikipedia, software prototyping is:
While rapid application development is:
Can these same methods be applied to infrastructure? Or does infrastructure always have to be engineered? The real answer is of course (as usual per my essays) it depends. Instead of conjecturing when it might work this text will look at three examples. One where it did not work, one where it kind of worked until it went off the rails and one where it worked like a champ.
After several years of procrastination I finally sat down and created a personal website. Okay in reality I was bored on a snowy winter day but either way it did finally get done. I don't think the two or three longtime readers of this site will learn anything new. So if you are bored out of your skull please do feel free to visit my personal site to help burn away what would be otherwise productive milliseconds.
In Eric Raymond's "The Art of Unix Programming", within the section called "The Basics of Unix Philosophy" there is a rule quoted by Rob Pike:
Rule 5. Data dominates. If you've chosen the right data structures and organized things well, the algorithms will almost always be self-evident. Data structures, not algorithms, are central to programming
At face value Rob's rule number 5 makes sense. But what is Rob actually saying? In complex software systems it might be difficult to track down and identify how the rule of evolving functions to deal with data worked. So why not use a small microscopic example instead. Taking a small program, a passive network scanner, from data structures to operations on the data structures illustrates Rob's rule number 5 perfectly. This is an interesting experience from my perspective as most of the programs and scripts I have written deal with transitionary data. What I mean by transitionary is simply find it, operate on it and/or print it then move on. Not an unusual trait in system administration centric programs. While working on a passive scanner that could also verify a port I witnessed rule number 5 occur right before by fingertips.
For those who use libdnet on their systems I recently completed another
big merge from Nmap's various patches. So far
all of the BSD/Linux/Unix patches have been making it into the
authoratative dnet tree. We are currently looking into a new
release target but I do not yet have details as to when a release is a for
sure.
There is some interesting news about the site. I ditched the myspace, facebook and twitter feeds. They simply were not being used. The RSS feed accomplishes what external social networking sites had the potential to. In all honesty, this site simply does not generate enough interest to warrant anything but and RSS file. The other interesting news item is I am planning on renting a virtual private server (VPS) solution early next year. The current server does not expire until October 2011 giving me ample time to perform a bleedover instead of cutover. I am hoping that the new server will give me the opportunity to add anonynous git and/or svn (not just for my own projects but some I contribute to) plus more flexibility with this site and possibly a personal site.