Archive for February 9th, 2004

A Script to Rotate Tomcat’s Catalina.out file

Posted in Uncategorized on February 9th, 2004 by Kehaar – Comments Off

My post on moving tomcat and cocoon logs has begun attracting a surprising number of Google vistors each day, all of whom seem to be searching on some variation of “how to rotate the catalina.out”

I suspect most of the vistors leave bitterly disappointed, as that post doesn’t really deal with rotating the catalina.out file so much as just moving it to a larger file system.

The catalina.out itself is nothing more than the standard output from the Tomcat servlet container. The problem is that Tomcat can be very talkative, which means the file can grow very large very quickly. I have tomcat instances on my Blackboard servers that produce 40+ megabyte files in a day during periods of normal use. A spot of heavy use or an error can cause these files to skyrocket in size, up to 2.5 gigs in one memorable instance. Growth like that can shut down an entire file system in nothing flat, and has.

In order to prevent that from happening, I started rotating the logs daily, keeping only the present and previous day’s logs on the system. This can be done with a fairly simple script. I’d not even put it up save for the fact that I’m getting hits from people who obviously don’t have one of their own.

Here tis:

#!/bin/ksh

#catrotate will copy and timestamp the catalina.out file daily
#in order to prevent it from growing too large.

name=`/bin/uname -n | cut -d. -f1`

case “$name”
in
webh|webi|webl|webm|webn )
cp -f /&lt path to &gt/catalina.out /&lt path to &gt/catalina.out.yest
cat /dev/null > /&lt path to &gt/catalina.out;;

webj )
for i in portal biblio costar hr cps oasis
do
cp -f /var/log/tomcat/$i/catalina.out /var/log/tomcat/$i/catalina.out.yest
cat /dev/null > /var/log/tomcat/$i/catalina.out
done;;
esac

Explanatory Notes: I have Tomcat instances on a number of machines, but for reasons too involved to go into I don’t have the log files in the same location on all of them. The first part of the case statement deals with 4 machines that have catalina.out files in the same place. The second part deals with one machine that has multiple catalina.out files in differing locations. The “for” statement steps through each location, clearing out the previous day’s entries from the catalina.out file and copying them to the catalina.out.yest file.

You getting all this down, Moms?

Postcard From The Edge

Posted in Uncategorized on February 9th, 2004 by Kehaar – 2 Comments

According to the leader of Al Qaeda efforts in Iraq, Abu Musab al-Zarqawi, the group is losing its battle in that land.

The writer contends that the American efforts to set up Iraqi security services have succeeded in depriving the insurgents of allies, particularly in a country where kinship networks are extensive.

“The problem is you end up having an army and police connected by lineage, blood and appearance,” the document says. “When the Americans withdraw, and they have already started doing that, they get replaced by these agents who are intimately linked to the people of this region.”

With some exasperation, the author writes: “We can pack up and leave and look for another land, just like what has happened in so many lands of jihad. Our enemy is growing stronger day after day, and its intelligence information increases.

“By God, this is suffocation!” the writer says.

But there is still time to mount a war against the Shiites, thereby to set off a wider war, he writes, if attacks are well under way before the turnover of sovereignty in June. After that, the writer suggests, any attacks on Shiites will be viewed as Iraqi-on-Iraqi violence that will find little support among the people.

“We have to get to the zero hour in order to openly begin controlling the land by night, and after that by day, God willing,” the writer says. “The zero hour needs to be at least four months before the new government gets in place.”

That is the timetable, the author concludes, because, after that, “How can we kill their cousins and sons?”

“The Americans will continue to control from their bases, but the sons of this land will be the authority,” the letter states. “This is the democracy. We will have no pretexts.”

If the Bush administration follows through on its plans to transfer power to the Iraqis by July 1, that makes Al Qaeda’s zero hour March 1st, just under three weeks from now. Barring Allah reaching down from paradise and rubbing out the Americans personally, al-Zarqawi is going to miss his deadline.

His letter suggests that Al Qaeda has abandoned the struggle in some countries before. If the summer comes and the Americans still rule the night, will Al Qaeda depart Iraq for a more hospitable land?

If so, where? My guess is Pakistan or one of the former Soviet republics in central Asia, but that’s neither here nor there.

The point of the letter, despite all the media-engendered wails to the contrary, is that America is demonstrably winning the peace. Al Qaeda needs chaos to operate effectively, and neither they nor the remaining Saddam fedayeen are able to create that environment–if either could then the letter would never have been written.

The al-Zarqawi letter is a trump card for the United States, in more games than one. For instance, it should have a salutary effect on the Grand Ayatollah Ali al-Husseini al-Sistani, who may soften his stance on direct elections once it becomes clear that the fondest wish of Al Qaeda in Iraq is to see Shia fight Sunni.

Link Exchange Spam

Posted in Uncategorized on February 9th, 2004 by Kehaar – Comments Off

Is anyone else getting link exchange spam? Say, along the lines of:

My name is Mark, and I’m the link manager of http://mywebdreams.blogspot.com* and http://iraqnewsonline.blogspot.com*

I am writing to you to request a link exchange with your blog http://silflayhraka.com

Links to your blog will be placed on all blog’s pages above Archives inscription in the right column.

If you want to swap links e-mail us when you added our codes:

Regards,
Mark.

http://torg.alkar.net*

“Link manager”? How lazy/rich does a blogger have to be to hire a link manager? If something about the email didn’t smell fishy, I’d predict a short career for Mark, as he’s competing against free.

This is the third or fourth copy or close facsimile thereof that I’ve gotten in the last week, all apparently part of a mass-emailing. Sometimes the urls are different, but the message remains the same. I’d put the whole thing down to an overeager and clueless newbie, but neither site has been updated since January 27th, and yet another one of these appeared in my inbox this morning.

At least a couple of actual blogs have links back to one of the sites, among them The Talking Dog and Turkish Torque. I wonder if they actually know this person, or got a letter along the same lines as I did.

*No links for spammers

Meanwhile, In The Warren

Posted in Uncategorized on February 9th, 2004 by Kehaar – Comments Off

Revenge of the Nerds?
One of the top tourist attractions in the state of Utah is not a natural wonder. It is the new Salt Lake City Library. It is ranked second behind Temple Square, but in front of Zion National Park.

Why the remaining Dems irk me…
In short, they want to give us the foreign and defense policy of France, the health care policy of Great Britain, and the court system of Russia.

You just can’t please anybody
Since this is an election year, the Democrats will do anything that they can to embarrass the President and congressional hearings broadcast on C-SPAN are one thing that they want. Now that the President has stolen their thunder, they are madder than wet hens

Running headlong through the minefield
Let’s say you are a descendant of a Gypsy victim of the Holocaust. How would you feel if you heard a Jew say “Pity about your ancestors, but you know it wasn’t as ‘morally unique’ as what happened to us, because Hitler never mentioned you specifically in his speeches”?

Baby on Whale – By Ngnat

Posted in Gallery on February 9th, 2004 by Kehaar – Comments Off

Black Dry Erase Marker on Marker Board

It’s been nearly a year since her first recognizable drawing, and Ngnat’s characters still seem remarkably blas? about life, even when they find themselves in the most outlandish of positions, such as perching on the back of a whale, watching one’s offspring while it is perched on the back of a whale (for that is the mother to the left, already clad in mourning), or having the swaddled infant of hairless monkeys balancing on one’s backside. All still have the Ngnat trademark– a flat line of a mouth. Even her “spooky spider,” which she drew after “baby on whale” had been wiped away forever was remarkably nonchalant for a hundred-eyed spider.

I’ll miss these creatures one day, when Ngnat learns to draw smiles. Smiles, precious as they may be in a child’s drawing, convey an interpretation instead of asking for one.

Though, come to think of it, smiley faces are probably preferable to parenting a Goth kindergartener.

Update: Forgot about the red scribbles. Those are the character’s names, carefully spelled out by Ngnat, using a cursive script known only to her.