OK, I’m back…

I made it back from Ohio, with a little more adventure than I’d planned due to some snow. I’ve got stories to tell, but it’s late and I’m tired. I’ll check in sometime later.

Upgrading a P2-300

Case study: Revitalizing a PII-300
It took me three and a half hours one night to squeeze another year or two of useful life out of a PII-300.

A fellow member of the Board of Directors at my church approached me one night. “Would you reinstall the OS on my computer?” he asked. He had a PII-300, not a barn burner by any modern measure, but not a slouch of a computer either. But as a performer it had been very much an underachiever of late. I had walked him through reinstalling the operating system over the phone back around Christmas and it had solved some problems, but not everything. It appeared his computer needed a clean start.

When I looked at it, I agreed. It wasn’t particularly stable and it definitely wasn’t fast. He had a Castlewood Orb drive to facilitate quick backups, so I had him copy his data directories (named Documents and My Documents), along with his AOL directory, over to the Orb. I also spotted a directory called Drv. As an afterthought, I grabbed that one too.

I proceeded to boot off a CD-ROM-enabled boot floppy. Tepidly, I typed the magic words format c: at the command prompt. Quickly I noticed a problem: the words “Saving current bad sector map” on the screen. As the drive formatted, Rick asked the magic question. “What do you think of partitioning?”

Dirty secret #1: Any time you see bad sectors, you should absolutely FDISK the drive. Bad clusters can be caused by physical problems on the disk, but they can also be caused by corruption of the FAT. No disk utility that I’ve ever seen (not Scandisk, not Disk Doctor, not even SpinRite) fixes that. The only way to fix that (verified by a technicians I talked to at Gibson Research, the makers of SpinRite) is to fdisk and format the drive.

Dirty secret #2: FAT16 is much faster than FAT32. Since Rick wasn’t opposed to partitioning the drive, I created a 2GB FAT16 partition. You do this by answering No when fdisk asks if you want to enable large disk support. This partition holds the operating system.

I exited FDISK, ran it again, and this time answered Y when it asked the cryptic large-disk question. I created a partition that spanned the rest of the drive. Then I rebooted, typed format c: then format d:, and watched for bad clusters. There were none. Excellent.

End result: I had a 2-gig FAT16 C drive and a 6-gig FAT32 D drive.

Dirty secret #3: Never, ever, ever, ever, ever (unless someone’s holding a gun to your head) install Windows as an upgrade. You have a Windows 95 CD and a Windows 98 upgrade CD? So what. Install Windows 98 on the bare drive. Setup will find no Windows installation present and ask for your Windows 95 CD. You insert your Win95 CD, it investigates it to make sure it’s not a blank CD with win.com on it somewhere, then asks for your Win98 CD back. End result: a clean install. Even if you install Win95 immediately followed by Win98, you get extra garbage you don’t need. And it takes twice as long.

Windows took about 30 minutes to install. I tackled his applications. When I installed MS Office, I did a complete install with one exception. I drilled down into Office Tools, found Find Fast, and unchecked it. Find Fast is a resource hog and doesn’t do anything useful.

I installed Office to drive D.

He’d bought Norton Systemworks on sale one weekend, hoping it would help his performance. It didn’t. I showed him a trick. Rather than install Systemworks directly, I explored the CD, drilled into the Norton Utilities directory, and ran Setup from there. I intentionally left out almost everything. Speed Disk and Disk Doctor are the two superstars. I also kept the Optimization Wizard. I left out most of the rest, because the other stuff doesn’t do anything useful but it sure slows down your system. When it asked about running Disk Doctor at startup, I said no. It just slows down startup and doesn’t do anything useful. I did let it replace Scandisk with Disk Doctor. That way if you get an improper shutdown, Disk Doctor can clean up the mess before Windows starts and makes a bigger mess. But Disk Doctor should run when you need it. Not all the time.

Then I drilled down into the Norton Antivirus directory and installed it. Then I did the same for Ghost. I needn’t have done that. Just copying the Ghostpe.exe file out of that directory onto a boot floppy suffices. More on Ghost later.

I installed this stuff to drive D.

Next, I installed his scanner software, Lotus SmartSuite, and his DVD decoder.

I copied the data back over from his Orb disk, noticed his modem wasn’t working, and installed the device driver I found in the Drv directory I’d copied over to the Orb as an afterthought. (I’d much rather back up too much stuff than not enough.) Then I copied his AOL directory over to drive D and installed AOL 5.0 over the top of it. It picked up all his settings.

I cleaned up c:msdos.sys and rebooted, watching the time. It booted in about 45 seconds, including POST. I was happy. Rick was very happy.

I did the other standard Windows optimizations outlined in chapter 2 of Optimizing Windows. I cleared out his root directory on C. Then I ran Norton Speed Disk. I had it do the full file reordering and directory sorting bit (also described in Optimizing Windows). Clearing out the root directory makes disk access much more efficient, but only after Speed Disk discards the now-empty directory entries. Directory sorting makes disk access more efficient by putting the important files early in the list so Windows finds them faster. The results are marvelous.

Finally, I ran Ghost. I copied the Ghost executable to a boot floppy that contained the Castlewood device driver internal.sys, then booted from it and Ghosted his drive to the Orb drive. Fifteen minutes later, he had an image of his system, so he can return back to this state any time he wants.

End result: Rick’s P2-300 with an 8-gig Quantum Bigfoot drive (a notoriously slow hard drive) and 288 MB RAM received a new lease on life. Despite its slow processor and hard drive, it performs better than a lot of consumer-level PCs available today.

That was a good investment of 3 1/2 hours.

Time for some Pakistani justice

“Do you think Daniel Pearl is alive or dead?” my sister asked me last weekend.
“He’s probably dead,” I said. I’d read the reports that he’d been killed in late January trying to escape. To me, it sounded plausible. If he were still alive, wouldn’t his captors still be making demands? They had nothing to gain by staying silent, as long as they had him. Likewise, if they had killed him in accordance to their threats, they’d have said something too. They probably would have offered proof, and made another threat–such as to take another hostage. But they were silent.

Still, I held out hope. I like to be wrong about things like that.

Daniel Pearl was a high-profile case. There have been 11 other journalists killed since the undeclared war broke out. There have been a couple dozen military casualties on our side. I don’t think anybody knows how many Afghans–Taliban, al Queda, or innocent bystanders–have been killed. It’s just that a star reporter for a prominent newspaper with a wife pregnant with their first child makes for a dramatic story. And Daniel Pearl has come to symbolize everything that’s wrong with the present situation.

This isn’t a war. We have troops overseas, yes. We’re building weapons, yes. But the objective is vague. There is no declaration of war. Our way of life is undisturbed. That’s not how it needs to be. Our way of life needs to be disturbed. But temporarily.

What we have right now is a police operation. This is like us chasing Pancho Villa near the beginning of the last century. We talk about protecting American interests, protecting democracy, supporting our troops. That’s nice. What does it all mean? Ask your cubicle neighbor and post it here. I’ll bet your cubicle neighbor and my cubicle neighbor define all of those things differently.

Our presidents over the course of the last 60 years haven’t liked that constitutional provision that only Congress can declare war. It’s hard to get a majority of those 535 people to agree to something like that. So they use a loophole. That’s not a good thing. The Founding Fathers knew that it would be hard to get a large number of people to agree to drastic action, such as passing a law or waging war. That’s how it should be. But if a majority of those 535 people can agree to a set of objectives, it’s probably going to be something pretty worthwhile. We can be pretty certain that they won’t come back with something ridiculous like nuking the entire Middle East until it’s a big sheet of glass.

So. We need to figure out who we’re fighting. Can we wage war only on suspicion? Let Congress sort that out. We have to figure out what we want. We know we want Osama bin Laden’s head. Fine. Anything else? I’m sure there are lots of things. Let Congress sort those out too. Then our generals can come up with a plan to get what Congress decides it wants.

Most importantly, our current way of life, for all we know, is supporting our enemies. I’ve advocated buying more fuel-efficient cars in these pages before. I still stand by that. Do you think a formal statement like that coming from our leadership would rally some people to action? I think so.

The most important thing about figuring out what we want, declaring a war, then getting it over with is that at some point, it’s over. We can go back to something resembling how it was before. We don’t have that now. And we won’t.

All we’re doing now is sitting back, watching helplessly, hoping we’ll stumble across solutions one problem at a time. Sometimes we find three leaders standing outside a vehicle well within range of a missile. More often, we don’t find what we need on time. And someone we want dead gets away. Or someone we want to get away dies.

As long as our faceless enemy knows we’re not serious, nothing’s going to change.

They’ve disrupted our economic system. They’ve made us afraid to travel. We’ve voluntarily given up liberties we wouldn’t have thought of giving up a year ago. We’ve changed our way of life, permanently.

We gave them just what they wanted.

So, what about Danny Pearl?

Pakistan has said they’ll go after his captors. We should let them. Let them be subject to Pakistani justice. If Pakistan lets them go, then we can show them American justice. Our Special Forces are very good at quickly carrying out those kinds of things, without the need of a messy trial. The job of the State is to protect its citizens. Sometimes that means war. And sometimes that means deterring repeat events. So it’s very easy to justify such a position on moral grounds.

Big trouble

Getting in trouble. At work, we use a content-filtering application called Websense to keep people from visiting sports sites and porn sites and checking their stocks at work. Prior to its installation, one of the most commonly visited sites in our firewall logs was ESPN.com. Well, I set off Websense this afternoon:

Status: The Websense category "Sports" is filtered.

URL: http://www.symantec.com/sabu/ghost/compatible_drives.html

As you can pretty clearly see from the URL, I was wanting to see if the CD-R drive we have is compatible with Ghost 7.5. Websense didn’t see it that way.

I printed that message out and hung it on my cubicle wall. That’s what we do with bizarre and amusing Websense messages.

So I just had to do a little research. It would appear that Sabu is the name of a professional wrestler. I learn something new every day. But that raises the debate of whether professional wrestling is a sport. Websense and I disagree once again.

Hey, I never said I learn something useful every day…

And that leads me straight into this:

How I once almost accidentally stole a piano from some Mormons. It was my junior year of college, and I was living next door to the Lutheran church just off campus. I was walking out to my car, which was parked on the church parking lot, when a guy walked up to me.

“Can you get me into that church?” he asked, pointing over his shoulder with his thumb.

“Why do you need in the church?” I asked.

“I’m here to deliver a piano,” he said.

I had no idea what the church would want with a new piano, but seeing as I hadn’t set foot in the place all year, what did I know? I had a key for emergencies, and this seemed like one. “Hang on,” I said. “I’ll run in and get a key.”

So I came back out with a key, unlocked the door, and the guy wheeled the piano off his truck. “Any idea where they want this?” he asked as he wheeled it through the door.

Seeing as I didn’t even know they were getting a piano, I definitely didn’t know where they wanted it.

“We’ll just leave it here in the Narthex,” I said. “That way Pastor will see it first thing when he walks in, and he can move it where he wants it.” (That’d teach him for not being there when a piano was due to be delivered.)

“This is 305 S. College Avenue, isn’t it?”

I paused. I didn’t know the church’s address off the top of my head, but seeing as I lived next door at 206 S. College Ave., I knew the church’s address wasn’t an odd number. So I told him that.

“Where else is there a church on College Avenue?” he asked me.

There was none. I racked my brain for a minute. “Let me step outside and see what the building number is.” This was Columbia, after all. Maybe they did put even- and odd-numbered buildings on the same side of the street, for all I knew. They do everything else screwy in that town. Then a thought hit me out of the blue. “I wonder what the address of that Mormon thing across the street is?”

So I peered across the street at our squarish, utilitarian-styled neighbor. “Institute of Religion. Church of Jesus Christ of Latter-Day Saints,” the sign read. Then I looked for a building number. Indeed, it was the address the piano delivery guy was looking for.

He thanked me and wheeled the piano out the door and back into his truck.

I locked the door back up, then went back inside to put the key away. “Have I ever got a story for you,” I said to the first guy I spotted.

Promise, not powerhouse

I went to a fund-raiser at St. John’s Lutheran Church in Ellisville, Mo., last night. St. John’s is known as the Lutheran Megachurch. Last year it made a list (I forget the source) of 200 outstanding Protestant churches in the United States.
St. John’s does just about everything my home church, Faith Lutheran in Oakville, Mo., does, but it generally does it bigger and better because it has more people and more money. This was the church where I received a quickie crash course in video training about a year ago.

They pretty much blew me away. We’ve got some outstanding musicians at Faith, but St. John’s has dozens of outstanding musicians. On very special occasions we’ll write our own material at Faith (I co-wrote a song a couple of years ago with our now-departed music director) but they do this kind of thing all the time.

“Some day, some day,” I muttered to myself and to the seminary student I went with.

Yeah, I was impressed, but I’m not going to defect. Every time the thought even crosses my mind, a few lines I wrote to someone about four years ago come back. “Sincerity once was everything, and loyalty was absolutely priceless. But you wanted powerhouse, not promise, so now they’re not worth anything.”

I’m not that kind of guy. I’d rather take part in the building of something cool than just have it fall in my lap. There’s something about being able to watch it develop. And when it’s reached powerhouse status, you get the satisfaction of knowing you played a role–however small–in it getting there. Besides, I absolutely hate Manchester Road, which is the street where St. John’s is located.

I need to spend more time at St. John’s, so I may even make a trek up there a monthly thing. We need to learn from them. We’ve worked together in the past, but we ought to do that more.

Oddity of the day

This from Gatermann:

Um, why is your book selling for $55 at ebay and also the normal price? I found this while doing a search for your book to see if they had used copies for sale at Amazon and this popped up.

Then, on my own, I found this.

Yikes! $72.50!? I guess someone really likes it?

And you know what they say, if something saves you a lot of money, then it ought to cost a lot of money as well…

But seriously, it would appear that for some reason, someone’s decided the UK version (or perhaps some variant of the UK version that I’m unaware of) of the book is collectible. Who knows why. Maybe there was a small run with a misprint that was quickly corrected. I can’t imagine anyone collecting O’Reilly books, but I guess if people are going to collect computer books, O’Reilly has more mystique than most publishers.

It kind of makes me wonder what one of the tech-review copies would sell for. After all, there were only a half-dozen or so of those in existence (and even I don’t have one of those–I had it in PDF form). While not substantially different from what ended up on the shelves, there were changes.

Paying two or three times the cover price of a book published in 1999 seems, well, odd. Especially seeing as the book is still available.

I’ve e-mailed the book dealer to ask why that is, because now I’m really curious. Not to mention amused.

More Linux tricks

OK, I gotta tell this joke.
Osama bin Laden gets taken out by a daisy cutter. He’s standing up there at the pearly gates, where he’s met by George Washington. “You tried to harm the country I birthed!” he said. And he sucker-punched him.

“You tried to take Americans’ liberty, so they gave you death!” screamed Patrick Henry, who popped out of nowhere. Then he threw an anvil at him.

Thomas Jefferson and James Madison came out and started tag-teaming him, followed by 68 more freedom-loving Americans wielding assorted large and heavy objects.

Finally, John Randolph decided he’d had enough, so he picked up this bloody pulp that used to be bin Laden, and threw him over to the gate for his fiery judgment.

Bin Laden looks up at an angel standing there. “This isn’t the least bit like what I was promised!” he cried.

“I told you there’d be 72 Virginians waiting for you when you got here!” the angel said. “What’d you think I said, genius?”

Let’s talk about some Unix/Linux tricks. Since yesterday’s mention of top drew some positive response, I might as well talk briefly about a few more tricks.

First, the shell itself. If you can’t remember a command, type the first letter or two and hit the tab key twice. You’ll see all the possible combinations. Tab completion also saves you keystrokes and works on filenames too. Let’s say I’m editing /etc/apache/httpd.conf, here’s the key sequence I’ll probably end up using:

na[tab]/e[tab]apa[tab]h[tab]

It saves me more than half the keystrokes. It also lets me be lazy–as long as I remember roughly where the file is and what letter it starts with, I’ll find it quickly.

Steve DeLassus asked me once a couple of years ago why I didn’t use that trick. I said because I’d get addicted to it and hate not having it in Windows. Out of necessity I started using it. I hate Windows command prompts now.

If you want to see your disk usage, or how much space you have free, use the du and df commands. (I never have problems remembering that last one for some reason.)

If you need to see what’s inside your computer, remember the /proc subdirectory. This is Linux-specific, because each Unix variant has its own nuances about /proc. By viewing the file /proc/pci, you’ll get detailed information on the PCI devices in your computer. By viewing /proc/interrupts, you’ll find out what IRQs are in use and what’s sharing what. The /proc/scsi and /proc/ide trees will give you information on the disk subsystems. By poking around inside /proc, you can find out more about a PC than the old standby Norton Diagnostics for DOS used to tell you. Your Linux installation CD can be a valuable diagnostic tool–just boot a troublesome PC with it and hit ALT-F2 (or CTRL-ALT-F2 if it’s a distribution that uses a GUI-based installer) to switch to a console. Or use a single-floppy Linux distribution.

And as for learning this stuff, the only thing I can recommend is total immersion. I asked Charlie, our Unix sysadmin at work, how he learned Emacs. “I just set my edit variables to emacs and lived with it,” he said. “And after about a month I liked it.”

I think I’ll stick with nano or pico or joe or ee, personally. I know enough vi to be able to use it in an emergency. But his approach works for all things Unix. Either dual-boot the PC you have or pick up a cheap second PC. It’s not difficult to find an old Pentium, complete, for under $100 and a price pressure from cheap LCDs has had the nice side-effect of pushing the price of conventional CRT monitors way down. There’s enough good free Linux software out there now that you can live in Linux for long periods of time and still get the same things done in Linux that you would in Windows while you gain valuable and marketable skills.

While you’re at it, eat lots of salmon and blueberries (not necessarily together). They’re supposed to be good brain food, and that can’t hurt.

Once you’re starting to feel like you know something, pay IBM developerWorks a visit. They’ve got a certification prep series up there. You may not wish to spend the time and money to get certification, but by reading the series, you’ll get a good idea of what you know and don’t know, and you’ll learn some more good stuff in the process.

Linkfest Friday…

Let’s start things off with some links. Web development’s been on my mind the last few days. There’s a whole other world I’ve been wanting to explore for a couple of years, and I’ve finally collected the information that’ll let me do it.
Redirecting virus attacks — Your neighbor’s got Nimda? Here’s how to get his IIS server to quit harassing your Apache server. (Suggests redirecting to a bogus address; I’m inclined to redirect either to 127.0.0.1 or www.microsoft.com, personally.)

DJG’s help setting up MySQL. Apache, MySQL and PHP are a fabulous combination, but bootstrapping it can be a painful process. People talk about writing a sendmail.cf file as their loss of innocence, but I’ve written one of those and I’ve tried to set up the LAMP quartet. The sendmail.cf file was easier because there’s a whole lot more written about it.

Short version: Use Debian. Forget all the other distributions, because they’ll install the pieces, but rarely do they put the conduits in place for the three pieces to talk. It’s much easier to just download and compile the source. If that doesn’t sound like fun to you, use Debian and save some heartache. If you’re stuck with the distro you have, download ApacheToolbox and use it. You’ll probably have to configure your C/C++ compiler and development libraries. That’s not as bad as it sounds, but I’m biased. I’ve compiled entire distributions by hand–to the point that I’ve taken Linux From Scratch, decided I didn’t like some of the components they used because they were too bloated for me, and replaced them with slimmer alternatives. (The result mostly worked. Mostly.) You’ve gotta be a bit of a gearhead to take that approach.

Debian’s easier. Let’s follow that. Use this command sequence:

apt-get install apache
apt-get install php4-mysql
apt-get install mysql-server

Next, edit /etc/apache/httpd.conf. There’s a commented-out line in there that loads the php4 module. Uncomment that. Just search for php. It’ll be the third or fourth instance. Also, search for index.html. To that line, add the argument index.php. If you make index.php the first argument, access to PHP pages will be slightly faster. Pull out any filetypes you’re not using–if you’ll never make an index page called anything but index.html or index.php, pull the others and Apache will perform better.

Got that? Apache’s configured. Yes, the php installation could make those changes for you. It doesn’t. I’m not sure why. But trust me, this is a whole lot less painful than it is under Red Hat.

But you’re not ready to go just yet. If you try to go now, MySQL will just deny everything. Read this to get you the rest of the way.

Once you’ve got that in place, there are literally thousands of PHP and PHP/MySQL apps and applets out there. If you can imagine it, you can build it. If HTML is a 2D world, PHP and MySQL are the third and fourth dimension.

Am I going to be playing in that world? You’d better believe it. How soon? It depends on how quickly I can get my content whipped into shape for importing.

This is the holy grail. My first editing job was doing markup for the Digital Missourian, which the faculty at the University of Missouri School of Journalism believe was the first electronic newspaper (it came into being in 1986 or so). By the time I was working there in the late summer of 1995, it had been on the ‘Net for several years. About eight of us sat in a room that was originally a big storage closet, hunched in front of 486s, pulling stories off the copydesk, adding HTML markup, and FTPing them to a big Unix cluster on the MU campus. We ran a programmable word processor called DeScribe, and we worked out some macros to help speed along the markup.

No big operation works that way anymore. There aren’t enough college students in the world. You feed your content to a database, be it Oracle or IBM DB2 or Microsoft SQL Server or MySQL or PostgresSQL. Rather than coding in straight HTML, you use a scripting language–be it PHP or ASP–that queries the database, pulls the content, applies a template, and generates the HTML on the fly. The story goes from the copy editor’s desk to the Web with no human intervention.

There are distinct advantages to this approach even for a small-time operation like me. Putting the content in a database gives you much more versatility. Some people want overdesigned Web sites. Some want something middle-ground, like this one. Others want black text on a gray background like we had in 1994. You can offer selectable formats to them. You can offer printer-friendly pages. You can even generate PDFs on the fly if you want–something some sites are doing now in an effort to gain revenue. If you have content from various sources, you can slice and dice and combine it in any imaginable way.

I can’t wait.

Optimizing a Linux box in-place

Here’s the Linux bit I promised yesterday. I wrote it much earlier, so I might as well throw it out there.
Our test firewall at work is an old Pentium-200 running Red Hat Linux and a commercial firewall app. (No, I won’t disclose which one. Security, you know.) It’s a bit slow. A P200 is severe overkill for the firewall built into the Linux kernel (Steve DeLassus and I made a firewall out of the first PC he ever bought, a 486SX/20 of 1992 vintage, which, save the loss of the original power supply in an electrical storm, has never required any service), but this commercial package does a lot more than the simple firewalls built into Unixish kernels do.

It had 72 megs of RAM in it and swapped mercilessly. Its speed seemed to be OK once it was booted, but seeing as this is a testbed, it tends to get rebooted an awful lot. I needed to do something for it.

So I trekked into the PC graveyard to see what I could dig up. I found a Compaq 386DX/20. I left that alone. That’ll be useful if I ever need to pillage a pair of Compaq drive rails, which has happened before. Unfortunately those rails are worth more than the rest of the computer. I also spotted a Mac SE. That’ll be handy if I ever need a doorstop. Then I found a Pentium-75 and another Pentium of unknown speed. I opened them up. The 75 had a pair of 16-meg sticks. I opened up the unknown Pentium and looked inside. Ugh. Socket 4. That meant it was a Pentium-60, or, at best, a Pentium-66. It had a pair of 8-meg sticks.

I pulled the memory sticks out of the 75. The 60 didn’t have anything usable in it, save a pair of hard drives, both 540 megs, one a Quantum and the other a Seagate. I took the Seagate because it was easier to unbolt. I don’t have any way of knowing at this late date which of those drives was the better performer, and it probably doesn’t make much difference anymore.

The idea was to add some memory, and put in a second hard drive dedicated to virtual memory. Since the likelihood of the machine needing to read data from a drive and simultaneously hit virtual memory was fairly high, I wanted the virtual memory on its own drive. Furthermore, Linux’s partition-read
mechanism isn’t terribly efficient. This doesn’t matter for SCSI drives, which re-order I/O events, but for IDE drives it matters a lot. So getting the swap partition onto a dedicated drive was likely to improve performance a fair bit. (If this were a production system, it would probably have a SCSI
drive in it.)

So I swapped in the 16s for the 4s and found an empty bay to hold the 540, which I put on the second IDE channel as master (another performance trick), and booted Linux. The next trick is to use your favorite disk partitioning tool (I like cfdisk, but I can navigate plain old fdisk) to blow away whatever partition is on the new drive (this one was /dev/hdc) and create a single partition. I just made it the size of the drive, since 2.4 can deal with large swap partitions and Linux is smart enough to use whatever virtual memory it needs, not just automatically use all it has available. Then I set
it to type 82. Linux can do swapfiles, but a filesystemless dedicated swap partition gives better performance.

Next, I edited /etc/fstab. I found an entry for the swap partition pointing at /dev/hda2. I changed that to /dev/hdc1. That means I now have a small swap partition just sitting on the first drive unused, but that’s not a big deal to me. The system’s not using the disk space it has. While I was there, I noticed the CD-ROM drive was pointing at /dev/cdrom. I asked Charlie, our Unix/Linux guru, if Red Hat had some intelligence I didn’t know about. He said /dev/cdrom was just a symlink. I changed the entry to read /dev/hdd, which is where the CD-ROM drive ended up after my shuffle. Better to just code things directly than try to track symlinks, in my estimation.

Next, I issued the command mkswap /dev/hdc1 to initialize the swap partition. Then I rebooted and listened.

Indeed, during boot, the second drive was getting activity. I logged in and ran top, then hit shift-M to have a look at memory usage. The firewalling software was eating up a lot. But swap usage was down.

I decided to try cutting memory usage down a little more. I loaded /etc/inittab into vi. Red Hat by default gives you six virtual consoles. This machine has little need for more than two. Pulling the extras saves you a couple of megs. Near the end of the file you’ll see several lines that look something like this:

1:2345:respawn:/sbin/mingetty 38400 tty1

I commented out the last four of those. Hit the i key to put vi in insert mode, scroll down to those lines, add a # to the beginning of them, then hit ESC, then hit ZZ (shift-Z twice) to rapidly save the file, no questions asked. (I know, vi ain’t friendly, but it’s there.)

Then I had a look at /etc/rc3.d to see what daemons were running. I found apmd, sendmail, and gpm running. That was a waste of a couple megs, not to mention a possible security risk. I vaguely remember all three of them having had security issues in the past, and sendmail is one of those programs that should never be running unless you need it. Yes, this machine’s just practice, but Hall of Fame catcher Johnny Bench found that if he got sloppy and just let wild pitches go while he was warming up pitchers, he wasn’t as sharp at blocking potential wild pitches during the game when
it counted. So he worked just as hard during practice as he did during the game. Now he’s considered the greatest catcher of all time.

So I applied the Johnny Bench principle and disabled them with the following command sequence:

mv /etc/rc3.d/S26apmd /etc/rc3.d/K26apmd
mv /etc/rc3.d/S80sendmail /etc/rc3.d/K80sendmail
mv /etc/rc3.d/S85gpm /etc/rc3.d/K85gpm

I rebooted to find memory usage down by about 4 megs and the system booted a little faster. It was also more secure.

Total downtime: About 45 minutes.

That was time well spent. I may end up having to just bite the bullet and get some memory, but the system will perform better with these changes no matter how much memory is in it. And, more importantly, performing this exercise made me notice something I hadn’t noticed before. It let me tighten up security.

Had I blindly just ordered some memory to put in the system, or a new PC, like some people unfortunately advocate, I wouldn’t have necessarily noticed that as quickly.


Speaking of Linux, I did finally get Apache, PHP, and MySQL all talking together on my church’s 486. I used phpWeblog, which is an awfully nice package. Pages load in an acceptable two seconds. I notice the machine is paging, so a little more memory will probably help that. It’s amazing that people are throwing away Pentium-class machines when even a 486 has enough power to be a decent intranet server.

Not everyone’s so fortunate as you and me. Give ’em to someone who can use them if you don’t want them.

Asbestos underwear time

Thompson’s repeated assertion that my book is a waste of time isn’t shared by everyone. I don’t think it’s necessary to point out his self-contradictions, and it’s not necessary to state that his experience with one computer is statistically insignificant compared to my experience with hundreds. That said, I’ll just post some mail and shut up. I’ve got other business to tend to tonight. Friends who need things, plans to make. I’ll be back tomorrow with some Linux stuff.
From: Dan Bowman

…and that’s a nice piece on the old machines. I think I’ll have to say something about my work P-200 and Athena here at home,

dan

You can read his bit here.

From: Steve DeLassus

Nice post for Monday. I have to slightly disagree that MS doesn’t believe in programming for performance. They’ll program in just enough to keep the common user hooked and not try an alternate OS. They don’t want you to think that their new OS just ate up all of the “gains” you made by purchasing a CPU with more cycles (“more cycles = faster computer, right?”). The problem here is consumer education, and most consumers relate more raw compute power to better performance, not realizing that better *system design* means better performance.

From: John Lowell

Dave,

About a year ago, I e-mailed you introducing myself, attempting to engage you in a dialogue about something about which you seemed quite expert at the time. I never received even the courtesy of a reply. Looking at Bob Thompson’s website today, it would seem that one would have to count silence from you as a blessing.

John

For the record, I don’t remember Mr. Lowell’s mail. But considering the volumes of mail I sometimes receive, it’s not uncommon for one to fall through the cracks.

You can’t please everyone.

From: dsgp

I enjoyed your commentary. I’m the MIS at a joint that would still using IBM PS2 computers if we could get them to use Office 2000.

So, we do what we do with what we have. Robert, as well as Jerry, don’t have any problems getting the free stuff; ours cost us. So we build our own units and upgrade until the motherboards burn out.

Keep up the good info.

Carl