Archive for April, 2003

Club Card

Posted in Carnival of The Vanities on April 30th, 2003 by Bigwig – Comments Off

The 32nd edition of the Carnival of the Vanities is at Clubbeaux this week.

Upcoming Carnival stops include;

May 7th Common Sense and Wonder
May 14th The Inscrutable American
May 21st Cut On The Bias
May 28th Dean’s World
June 4th Drumwaster’s Rants
June 11th Overtaken by Events
June 18th Real Women Online
June 25th Single Southern Guy
July 2nd Amish Tech Support
July 9th Winds Of Change

If you’d like to host the Carnival, drop us a line. Information on how to join the Carnival can be found here.

Tricks of the Trade

Posted in Uncategorized on April 30th, 2003 by Bigwig – Comments Off

Just had to kill multiple Java threads spawned by a hanging database query, or something so similar to a hanging db query that it makes no difference. On Solaris, this would be comparatively simple, as all the threads would have been represented by a single process id. One kill -9 &lt pid &gt would have done the trick. On Linux, or at least the 7.2 Redhat version we run, each thread has it’s own pid, so before I could restart the Tomcat servlet engine I would have had to kill each one individually. It’s not difficult, typing “kill -9 &lt pid &gt ” over and over again, but it is onerous, or at least as onerous as my job gets.

Here’s where I tell you a secret. The best sysadmins are lazy bastards, so lazy that typing in even just 10 “kill -9 &lt pid &gt ” commands seems an overwhelming task. I am not a great sysadmin; I’m not quite lazy enough*. Most of the time I’ll just type in the multiple commands. Today I decided not to.

Here’s what the processes that needed killing looked like; (I’ve broken them up so that they won’t screw up viewers with small monitors. Normally everything in the 2 entries below would appear on one line)

root 18935 0.0 6.7 236880 86704 ? S Apr28 0:00
/usr/Java/jdk1.3.1_07/bin/i386/native_threads/Java -Djava.endorsed.dirs=/usr/local/tomcat-smartask/bin:/usr/local/tomcat-smartask/common/lib – classpath /usr/Java/jdk1.3.1_07/lib/tools.jar:/usr/local/tomcat-smartask/bin/bootstrap.jar -Dcatalina.base=/usr/local/tomcat-smartask -Dcatalina.home=/usr/local/tomcat-smartask -Djava.io.tmpdir=/usr/local/tomcat-smartask/temp org.apache.catalina.startup.Bootstrap start

root 18936 0.0 6.7 236880 86704 ? S Apr28 0:00
/usr/Java/jdk1.3.1_07/bin/i386/native_threads/Java -Djava.endorsed.dirs=/usr/local/tomcat-smartask/bin:/usr/local/tomcat-smartask/common/lib -classpath /usr/Java/jdk1.3.1_07/lib/tools.jar:/usr/local/tomcat-smartask/bin/bootstrap.jar -Dcatalina.base=/usr/local/tomcat-smartask -Dcatalina.home=/usr/local/tomcat-smartask -Djava.io.tmpdir=/usr/local/tomcat-smartask/temp org.apache.catalina.startup.Bootstrap start

There were about 50 just like the above, and this command took care of all of them at once, once I took the two minutes needed to puzzle it out;

kill -9 `ps -auxwww | grep smart | cut -c10-16`

I’m going to assume that most everyone who made it this far understands the above, and is wondering why it took me to this point in my career before I used such a simple damn command.

My answer? Because I never needed it before, so there.

For the rest of you, who must have a masochistic streak a mile wide somewhere in your makeup, the command above is actually 3 commands, enclosed in backquotes and separated by pipes (|), that output a number (the pid) to the fourth command, the kill -9

Commands:

ps -auxwww – is part of the Berkeley implementation of the the ps command, found inn /usr/ucb for an Solaris users out there. It gives me the entire process entry, instead of cutting it off after display line. If passes that information to

grep smart – grep looks at all the process entries and filters out all the ones where the word “smart” doesn’t appear. I can’t use “Java” because I have lots of processes with that word in the entry, and I don’t want to kill them all. However, if I could have used “Java” then I could have gotten away with the much simpler and more familiar “ps -ef” command at the beginning, rather than the more cumbersome “ps -auxwww”. The filtered processes are passed to

cut -c10-16 – which cuts out the characters in the 10th thru 16th spaces in the filtered process entry and serves them to

kill -9 – end a process, and do it now. It is the UNIX equivalent of your mother calling you by your entire name, and telling you to drop whatever you are doing and get in the house now.

I copied the entire command to a text file so that rather than having to type multiple kill -9′s in future, I can just change “smart” to whatever identifies the processes I want and run it again. Two minutes expended now, 30 minutes saved over the course of the next few months. The entire course of a system administration career can be traced in minutes of activity saved. Like I said, lazy

The best sysadmins, the ones whose praises are sung in story and song, are entirely sessile, or invisible, having saved enough time that they need never come to work, which of course is the goal of every sysadmin.

Just think how much blogging I’ll be able to do then.

Update: Aside from the sloth, another nice thing about thing a sysadmin is that there are always more elegant sysadmins around to point out inefficiencies in one’s code**, like Jeff of Caerdroia, who wrote to point out that

kill -9 `ps -auxwww | grep smart | grep -v grep | awk ‘{print $2}’`

is a much better solution, as it proscribes the possibility (admittedly remote) that I would kill my own command before it had run its course. After all, “smart” would be found in its process entry as well. That’s where the grep -v grep command comes in, as it filters out the word “grep.” awk ‘{print $2}’ pulls out everything in the second field of the process entry, rather than a set number of characters, useful in case the pids that need killing Re not all of the same length. As my “cut” would only pull out spaces in the case of a shorter pid and extra spaces are ignored in commands, it doesn’t actually matter, but it is a more elegant solution, and thus better.

*The sysadmin at Medfusion is, though, and both he and his boss read the site regularly. Heh.

** all it takes is a willingness to expose one’s shortcomings to the world, and I posses both the willingness and the shortcomings in ample measure.

These Boots Were Made For

Posted in Uncategorized on April 30th, 2003 by Bigwig – Comments Off

These Boots Were Made For Sculpture


Photo and blurb from Yahoo, where link half life is measured in minutes

A creation by Iraqi artist Zerak Mera made from Iraqi army boots is seen where a statue of toppled Iraqi president Saddam Hussein once stood, in the center of Kirkuk, April 29, 2003.

A Primer For Frances

Posted in Parental on April 30th, 2003 by Bigwig – Comments Off

Since we checked out of the library two weeks ago, Bedtime for Frances has been near or at the top of Ngnat’s bedtime story list. I assume because the book has suggested several new stratagems for Ngnat to try in order to delay bedtime each night. Circle Dogs has also been popular, but Frances is the clear winner.

It’s interesting to read her books from a generation or two ago, before the PC lobby placed its claws on the throat of children’s publishing. Frances is threatened with a spanking, something I have never seen in a recently published book, and Doctor Dan features not only toy guns, but a fight between cowboys and Indians. I’m thinking about writing a children’s book that features both guns and spanking, perhaps with a smoker just to give it flavor ; say something where a boy gets spanked by his uncle the Marlboro man after practicing poor gun safety on a deer hunt. I’ll throw the PC industry a bone and make the Uncle a member of the Pink Pistols; surely it’ll be more saleable that way.

Among the other attractions Frances has for Ngnat is a song she sings at one point;

A is for apple pie, B is for bear,
C is for crocodile, combing his hair,
D is for dumplings…..

The book then skips E to R, as Frances goes to tell her father about yet another reason she is not asleep yet, then finishes with

S is for sailboat, T is for tiger,
U is for underwear, down in the drier

It has the feel of something that the author (Russell Hoban) cut for space, rather than never wrote, but I’ve been unable to find a complete version, or even a suggestion that there ever was a complete version. Since Ngnat has started to sing that particular passage along with me each night, I felt it behooved me to make up my own for her. The original, slight as it is, suggests a combination of the familiar and the surreal, which I’ve tried to keep.

A is for apple pie,
B is for bear,
C is for crocodile, combing his hair.
D is for dumplings,
E is for egg,
F is for Flamingo, shaving a leg.
G is for Garbage can,
H is for Ham,
I is for Icicle, dipped in jam.
J is for jelly fish,
K is for key,
L is for lobster, drinking his tea.
M is for monkey paw,
N is for nails,
O is for omelet, stuffed with snails.
P is for pangolin,
Q is for queen,
R is for rhyming skills, mine are keen.
S is for sailboat,
T is for tiger,
U is for underwear, down in the drier.
V is for vortex,
W is weird,
X is for xylophone, growing a beard.
Y is for yogurt,
Z is for zoo,
I’ll sing this song, again for you!

I should tender my thanks to the Picture Dictionary at Enchanted Learning. It had a plethora of primer examples for every letter, which made the above much easier to come up with. I’ll stick a copy into the book before I return it, and save the next patron the trouble of coming up with his own.

The Compleat Dumbass PETA activists

Posted in Uncategorized on April 30th, 2003 by Bigwig – Comments Off

The Compleat Dumbass

PETA activists are demanding that anglers stop fishing after a British study determined that fish can feel pain after all.

So fish can feel pain. Who cares? Of course they can feel pain. Worms feel pain too, as anyone who has ever watched one writhe on a hook could tell you, but I don’t see any PETA protests for them. Every organism above a certain level of complexity can feel pain. Pain is an evolutionary defense against things like swimming into an underwater lava flow, or repeatedly ramming into sharp coral in an attempt to catch a particularly tasty shrimp.

PETA is apparently under the misapprehension that the “Fish can’t feel pain” is something all fishermen believe, rather than the convenient lie they tell tenderhearted children so as to get on with the fishing. A species of fish could be pulled screaming out of the surf and it wouldn’t make a difference, except that more fisherman would be angling for them.

“Hooked one of them screaming trout on a No.8 Tsetse fly the other day, Clem. Sucker had perfect pitch, hit a F sharp a hunnert yards out and kept it up all the way in. All I need now is a High C and an A flat, and Billy down to the Taxidermy shop can finish mah organ.”

Once you get down to a particular level of stupidity, PETA is wasting its time, if not undermining previously won victories. Saving monkeys from lab tests may be one thing*, but the lower down the intelligence scale on goes, the less people care, and eventually they’ll start to question you about the monkeys if you keep throwing tantrums about not bothering the clams.

*though not for me. If hooking up Colobus genitals to a car battery has even the slightest chance of curing cancer, teenage acne, or hangnails for that matter, I say shock that monkey.

Rehab Schmeehab I am so

Posted in Uncategorized on April 30th, 2003 by Woundwort – Comments Off

Rehab Schmeehab

I am so surprised by this news. Who could have seen this coming? If only we had seen the signs.

He Says It Like That’s

Posted in Uncategorized on April 29th, 2003 by Bigwig – Comments Off

He Says It Like That’s A Bad Thing

Three

Posted in Parental on April 29th, 2003 by Bigwig – Comments Off

Ngnat is home sick for her birthday today. I’m not positive she’s even that ill, though she is possessed of a cough, and perhaps a slight fever. I’m not planning on telling the better half that she played with a little runny-nosed Chinese girl at the park on Sunday.

She woke up screaming in the wee hours of this morning, within a couple of minutes of the exact time of her birth three years ago. She did the same thing on her first birthday, though not last year that we noticed. The first time it was an interesting coincidence. Last night it graduated to weird. We’ve wondered if she might be dreaming of her birth somehow, but I’m suspicious of that explanation. The timing is a little too “There are more things in heaven and earth, Horatio, Than are dreamt of in your philosophy,” for me.

We got her some water, and calmed her down, mostly to no avail. She stayed up most of the night, which meant that I too stayed up, and the thought of staying home today was very appealing to my bleary and befogged psyche come daybreak.

One of us is feeling much better now. It’s not me, despite the application of three large latte size cups of coffee. Ngnat is walking around on tiptoe and declaiming; something about Dora and apple trees. I may put her down for a nap soon in self defense.

Thrax Tracks An Egyptian man

Posted in Uncategorized on April 29th, 2003 by Bigwig – Comments Off

Thrax Tracks

An Egyptian man in Brazil has died of anthrax after opening a suitcase contaminated by spores of the disease. The suitcase originated in Egypt, and was en route to Canada.

If this story pans out, and if the strain turns out to be the same as the one in the 2001 mailings, then there’s going to be hell to pay domestically after all the assurances that the anthrax mailer was domestic in origin.

Hell to pay in the Middle East as well, as the current American posture in the region will in retrospect be thought of as subtle and light-handed.

Update: Suitcase? What suitcase? Canadian authorities are questioning the suitcase story, though not the cause of the sailor’s death, which begs the question of exactly how the sailor happened to catch anthrax in the middle of the ocean. The mounties seem more intent on dismissing the suitcase’s existence than in determining where it might be .

Which, if it never existed, will be fine. But if it did exist, and vanished before Canadian authorities boarded the ship, where is it now?

More Update: Twasn’t anthrax at all, say Canadian officials, but some unknown disease that caused multiple organ failure and eventually killed the Egyptian sailor, so they have lifted the quarantine on his ship, allowing it to dock. Why doesn’t that make me feel better?

Aftershocks U.S. ends operations in

Posted in Uncategorized on April 29th, 2003 by Bigwig – Comments Off

Aftershocks

U.S. ends operations in Saudi Arabia – the expectation is that this will remove one of the primary provocations Muslim miltants have cited for attacking the U.S., the presence of our forces in the holy land of Islam.

Don’t hold your breath waiting for the level of rhetoric to die down in the mosques, however. Look for the Shiite holy places to gain a whole new level of exposure, even in Sunni mosques, and there’s always the pesky Jews to fulminate against.

Military may lighten its ‘footprint’ in Europe – another knee to the groin of an already ailing German economy. In Iraq, we got a regime change by injecting troops. In Germany, we’ll get a similar result by withdrawing them.

And just in time, too. I’m tired of not buying German beer, and that industry has apparently felt the effects of my boycott.