Linux versus Windows on System Calls

I found an interesting article on the Interweb today, based on something a peer told me during a service call. It has to do with the differences between how system calls are handled between Linux and Windows performing the same task, in this case, serving up a single web page with a single image. The fellow comparing the two even provided pictures that map out how the different operating systems map those calls, or more simply what is going on under the hood when the system does what is asked of it.

This is a short article, but is a great example of some fundamental differences between Linux and Windows, that are deeply entrenched in the source code levels, This is also a shiny example of one reason why Linux outperforms Windows in most cases (that’s been my experience anyway), and why Windows is harder to secure.

Before I provide linky goodness, let me make a disclaimer. I am not bashing Windows or Microsoft with what I said above. The performance observation is just that, my observation based on my experience. The issue of securing Windows is the same, I am not saying you can’t secure Windows, it’s just a lot harder.

Now, on to the show, take a look and let me know what your thoughts are!

More on RSS

Well now, I got some good info recently, and I felt it was my duty to share with everyone.  I have been a fan of and tinkerer with RSS feeds for years now, so how I missed this one I have no clue.  Regardless, after my last post about “What is RSS?“, my friend Mack mentioned Google Reader in the comments of that post.  Ok, I must be living under a pretty large rock, because despite all of the Google services I use day to day, I had never heard of Google Reader.  I have been using a program called ShardReader as an RSS aggregator on my computer, but hadn’t thought about a web based implamentation.

Actually, say I hadn’t thought about a web based version is not true, I wrote some (IMHO) pretty cool PHP code to categorize, list and display multiple RSS feeds in one place years ago.  However, this was for the purpose of displaying that information to my website visitors, I never thought about using it for myself.

That being said, there is nothing wrong with SharpReader, or any software that works for you.  However, I had to write up something about Google Reader because of the beauty that it is in fact web based.  I came to realize that it’s beautiful because now I can take my feeds with me wherever I go.  If I have access to a web browser, and a few minutes to kill, I can catch up on my news (I am a news junkie you know).  I was able to get started with no fuss using my gmail email account.  Best of all, I can still use SharpReader when I feel like it, and I was able to export my feed list to a standard OPML file from SharpReader, and import it right into Google Reader.  Now that is exactly how open standards are supposed to work!  Good job guys!

So, if you are looking for a very good RSS news reader, plus one that you can use anywhere (even off-line now!), check Google Reader out, I have been genuinely impressed and I bet you would find that you like it.

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.***


# This will be the base zone dir used with zonedir below

print "\nSolaris Zone Maker\n";
print "---------------------\n\n";

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

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

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

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

print "\nDo you want to inherit standard directories (lib,platform,sbin,usr) from the global zone? [yN] ";
$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 = ;
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!