What is RSS?

I had someone today ask me what RSS was, especially since we have all seen RSS all over the ‘net in the last couple years.  For anyone that doesn’t know, RSS is an acronym that stands for Really Simple Syndication, and it represents a standard format for sharing, or syndicating data.  You create an XML file in this standard RSS format, that has the data in it you want to syndicate, then the client side can grab that file and process the data to display it on a web page or in a RSS reader or aggregator program.

Rather than re-invent the wheel so to speak, I’ll send you to Wikipedia for more information, they have a great writeup on RSS, and other similar formats past, present and future.  In short, RSS is a great way to very easily syndicate or share data elements from one source to many destinations.

Read more about it at Wikipedia.

Solaris 10 Zone Creation Script

One of the best things about Solaris 10, from Sun Microsystems, is Zones or Containers.  They allow you to create virtual OS installs on the same box, yet have them quite separate from each other.  Processes are segregated, resources can be capped, the options go on and on.  Here I have a PERL script (have I mentioned that I love PERL lately?), that makes the creation of zones a snap.  The only thing to edit in the script is at the top, where you set your zone base directory, as in the directory that will hold the zones your create.  I am a simple man, and usually just stick them all in /data/zones, with /data usually being a separate mount point and thus separate I/O path.

***NOTE: This script was written a few years ago and I have no Solaris 10 machine to test it on NOW, so I offer this script AS IS with NO WARRANTY AT ALL! I hope it will help you, but if problems arise from it’s use, you cannot hold me responsible. That being said, if you find it useful (as I did when I wrote it) please let me know that it is still working.***

#!/usr/bin/perl

# This will be the base zone dir used with zonedir below
$bzd="/data/zones";

system(clear);
print "\nSolaris Zone Maker\n";
print "---------------------\n\n";

print "What is the name of the new zone to be created? ";
$newzone = ;
chomp($newzone);

print "\nWhat is the name of the directory to be used for this zone? [$newzone] ";
$zonedir = ;
chomp($zonedir);
if (!$zonedir) {
 $zonedir = $newzone;
}

print "\nWhat is the IP address to use? ";
$newip = ;
chomp($newip);

print "\nWhat is name of the ethernet interface to bind the IP address to? (ex: bge0) ";
$ethint = ;
chomp($ethint);

print "\nDo you want to inherit standard directories (lib,platform,sbin,usr) from the global zone? [yN] ";
$inh = ;
chomp($inh);
if (!$inh) {
  $inh = "n";
}
if (($inh eq "y") || ($inh eq "Y")) {
  $isw = "1";
} else {
  $isw = "0";
}

print "\n\nPlease verify the following information:\n\n";
print "           Zone Name: $newzone\n";
print "      Zone Directory: $zonedir\n";
print "     Zone IP Address: $newip\n";
print "  Ethernet Interface: $ethint\n";
print " Inherit Directories: $inh\n";

print "\nAre these entries correct? [Yn] ";
$yn = ;
chomp($yn);
if (!$yn) { $yn = "y"; }
if (($yn == "y") || ($yn == "Y")) {

 $of = "/tmp/zccfs10.tmp";

 # Create the zonecfg command file
 `echo "create -b" > $of`;
 `echo "set zonepath=$bzd/$zonedir" >> $of`;
 `echo "set autoboot=true" >> $of`;
 if ($isw == "1") {
   `echo "add inherit-pkg-dir" >> $of`;
   `echo "set dir=/lib" >> $of`;
   `echo "end" >> $of`;
   `echo "add inherit-pkg-dir" >> $of`;
   `echo "set dir=/platform" >> $of`;
   `echo "end" >> $of`;
   `echo "add inherit-pkg-dir" >> $of`;
   `echo "set dir=/sbin" >> $of`;
   `echo "end" >> $of`;
   `echo "add inherit-pkg-dir" >> $of`;
   `echo "set dir=/usr" >> $of`;
   `echo "end" >> $of`;
 }
 `echo "add net" >> $of`;
 `echo "set address=$newip" >> $of`;
 `echo "set physical=$ethint" >> $of`;
 `echo "end" >> $of`;

 # Make the dir that the zone will live in
 `mkdir $bzd/$zonedir`;
 `chmod 700 $bzd/$zonedir`;

 # Now, create the zone dude!
 print "\nCreating the zone ... \n";
 `zonecfg -z $newzone -f $of`;
 print "Done!\n";

 # Install the zone
 print "Installing the zone, this will take awhile ... \n";
 `zoneadm -z $newzone install`;
 print "Done!\n";

 # Boot the zone
 print "Now booting the zone ... \n";
 `zoneadm -z $newzone boot`;
 print "Done!\n";

 # Remove the config file
 `rm $of`;

 print "\nZone setup complete, connect to the virtual console with the following command: \n";
 print "  -> zlogin -C -e\\@ $newzone <- *Exit by typing @.\n\n";

} else {
 die("Script execution halted.\n");
}

Port Ping in PERL

One tool that I haven’t seen on *nix that I see my Windows brethren using, is called portping. There is a little freeware app called portping for Windows, that is really a misnomer as it doesn’t ping anything really, but simply does a tcp connection attempt to see if the port on the destination side is answering. This is actually a really cool tool in my book, so I wrote my own in PERL since I couldn’t find something similar. Basically, you call the script, give it a destination, a protocol (TCP is used by default), and a payload to deliver if you want to send something, otherwise it simply tries to connect to the port specified. I have used it for a while now, and it has come in handy for troubleshooting network connections.

The script was posted in our forums, why don’t you take a look for yourself, and let us know what you think!

Where is your disk space going?

Here is something really cool for all of us that work with Windows based machines, that goes for servers and desktops alike.   Have you ever been looking at your free disk space, wondering where the heck all of your ruttin space went to?  I know I have.  You are left wondering what the heck is using up all your space, and now you can see it very clearly.

There is a tool called Windirstat, that scans the drive of your choice and gives you various report options that show you quite clearly what is using up all your binary real estate.  It has a nice and intuitive interface, plus some cool reporting options.  Best of all, it really does give you a good idea of where all your free space went, and the ability to work with it within the program.  I give it 5 stars!

Check out Windirstat right now!

Improve Windows Explorer

If you are using Windows Explorer to do your file browsing on your machine, and you are tired of Explorer, by default opening to My Documents, try putting this in the shortcut target line:

%windir%\explorer.exe /e,/n,::{20D04FE0-3AEA-1069-A2D8-08002B30309D}

This will make Explorer open up to your list of drives instead!

*Note: This tip was also posted in our forums.