Archive for April, 2001

Moving Forward

Monday, April 30th, 2001

Now that I've moved out two machines from the office, I needed to spend a little bit of time getting the global services that they served back on-line. Thankfully, it only took an hour or two to get the DNS changes propogated around the world, and I was easily able to redirect The Man from S.P.U.D. home page to barney. Nice that Irix handles DHCP as easily as it does. Well... so does Solaris and Linux, so I guess that's not too terribly surprising.

In any case, I had to move some services around and that didn't take too long. I was slightly disappointed that Apache on barney and sparky didn't default to using the extended API, which would have allowed me to easily compile mod_ssl, but that's not too terribly bad either. When I get another fast Linux machine in to replace tux I'll have it do the SSL stuff, and serve the main Man from S.P.U.D. page. In any case, it would have been nice, but it's not a serious problem.

I've emailed the ISP for Leslie again as she's getting ready to go live with the eCommerce site I created for her. We'll see if he comes around or if we have to move the site to another hosting company. On that note, I got the site into CVS before the move of services just to be safe. It's nice to have it under CVS as I feel much more secure and on good solid footings for this.

Tomorrow is an important interview with Bear Stearns in Chicago - hope it goes well...

Decommissioning tux and peabody

Friday, April 27th, 2001

Today is an historic day for me. I've decommissioned tux to be removed from my office. He's been an incredible asset to me and I will certainly miss him. However, there are other folks that need him more, and he's off to be re-tasked for some greater purpose. I'm sure that whereever he goes, a little bit of me will be with him. I will certainly miss him.

This does give me a chance to significantly reduce the noise in my office and I will take this opportunity to do so. When I replace tux it'll probably be for another high-end Linux box and hopefully that will be soon. Until then, I'm one machine down.

At the same time, I had to ship off peabody... I've got another NT machine, and I don't use it much these days anyway. Mark off another from the office.

Latest wget and CIA

Friday, April 27th, 2001

This morning we had a problem with the weather scraping off the Weather Channel site. It seems they have done something that makes the wget 1.5.x fail on the grab. Interestingly, the getPage program I wrote based on the GNOME libghhtp library works fine. Wow... I'm impressed. Well... the latest wget 1.6 works fine and so for sparky I've simply removed the old wget I got from Sun Freeware and grabbed the source for wget 1.6 from the GNU archives. I built it and it works fine. On tux I've simply gone back to using my version and it works fine.

Interesting... very interesting.

On a somewhat related note I've been working for a while on a new feature for CIA. When I 'paint' a region I use a recursive function that does the job. Well... in some cases the recursion migh go very, very deep. On the CellAnalysis web site machines it causes a core dump. So, what I wanted to do was to un-'dig' the routine and make it an iterative one. Very similar to a loop for factorial as opposed to recursion. Well... it didn't quite work out that way, but almost as nice. The trick was to implement a looping algorithm that utilized a stack to save the points I was visiting, and in doing that we achieved what was desired - minimal system stack usage.

Interestingly enough, the routine is faster in that there aren't the overhead calls, and it uses less memory since only the relavent values are on the stack, so it's a pretty good win all around. Sure, the complexity goes up a little, but that's a reasonable trade-off for not having to worry about stack implosion.

MediaOne and Bad Service

Tuesday, April 24th, 2001

You've gotta wonder who's running the store at AT&T @Home now that they've bought MediaOne, my cable modem provider. I want them to keep my old MediaOne email address as a forwarding mailbox to the new @Home address. This is very simple to do and costs them absolutely nothing. In fact, it's allow them to move me without my knowledge and then tell me that I have some period of time to use the new mailbox. Very clean. Very simple.

I have absolutely no confidence that they will do such a thing. They are, after all, AT&T.


The plan I've formulated for this problem is to get a domain for just the family. Good enough to use for my business email as well as for Liza and the kids. Liza and I threw a bunch of ideas out, and I checked all of them against the registry database and found a few that are OK, but none that are really stellar. We were totally surprised that some of our best names were taken - even those that I can't believe were taken. It was, and is, really surprising.

So first I need to register the domain and then I need to point it to a web hoster like WebPipe and move the pages from AT&T/MediaOne to the hoster. This way I don't have to worry about email or web site ever again. That will be a relief. But first we need a good name for the family...

Awful Service

Monday, April 23rd, 2001

Today I did almost nothing other than to design an icon on Irix for AbiWord. I wanted to help the SGI Freeware guys a little, and when I think I can do an icon for a program, I usually do and send them the files. It's nothing special, but it's what I try to do to help.

But then I had to deal with the ISP for CellAnalysis. What a goofy bunch of guys. I tell them to get the code for FFTW and build it. There are a lot of optimizations that are done in the build to get the fastest implementation possible on the target hardware. It's a good thing to so. They didn't. They got a set of RPM libraries, which didn't include the header files. So I can't build and they have to go back to find the right RPM with the includes. What a goofy situation.

I need something else to do... I'm waiting for people to do things and I need to keep my mind busy so I don't think about the job search.

UPDATE: - they installed the headers after I asked for them. Then I was able to build CIA with the FFT smoothing of the sample data. I emailed Joel to let him know that I'd done this, and what still didn't work at CellAnalysis (no PNG headers -> no PNG output from Ploticus) but that's not critical at this point. In the end, they got it right.

eCommerce, SGI and SSL/HTTPS

Friday, April 20th, 2001

This morning I got another email from Leslie at North Hollow Farm and she's really excited about the site. I'm glad. I think it looks nice, and it's certainly clean and functional. Well... good news. One of the interesting parts of the site is that when an order is placed, it's mailed off to Leslie's email account so that she knows everything she needs to know to get the order started. Nice and clean.

I have asked Cydian once already about getting PHP4 and PostgreSQL on one of their servers, but I'll need to ping them again today about that. If they fall down on this, I know that webPipe.net has both of these in a wonderful package that's about $20/mo. - about what they're paying now. So, here's to hoping that they come around soon and we can move this site into production as soon as possible for Leslie.

On another front, the SGI Freeware site has released their May collection, and it's as impressive an update as I've ever seen. New versions fo GNOME, GTK, PostgreSQL, OpenSSH, and a ton of others make this a must have, and long overdue series of updates. I know it'll take some time to get them all downloaded and installed, but that's OK... it'll be worth it.

It's times like this that I think I'd like to have much higher performance SGI hardware and problems that need that power. Problems like my old thesis work, supercompuer-level stuff... something that I could really challenge a machine and my mind at. While I like doing things like this web site for Leslie, it's not the same as trying to solve the electron and hole populations in a III-V semiconductor... and that's really what I wish I could be doing. Unfortunately, I have no ideas for those problems, or I'd likely be trying to solve them on the hardware I have. Too bad... I guess I'll keep searching and hope something turns up.


I also spent some time today trying to get mod_ssl working on tux. I'm convinced that I got the library to compile correctly, but I had a really hard time getting it configured properly. Now I didn't do a lot of planning on this, mainly because I just didn't care that much about it. I wanted to just get an HTTPS: server up so I can test on it. But it seems that while I'm getting close, I'm not close enough. Maybe I'll come back to this later, but it seems as though I'm through the compiling part, and into the difficult configuration part.

UPDATE: - I've done searching on the net and I'm still not convinced that I'm any closer to getting SSL working. Oh sure, I've figured out how to get the certificates and generate my own certificate authority, but I still seem to be unable to get Apache to answer on port 443 - the SSL port. While I think it's quite possible that I'm just not getting the right information from the net, I also know that I'm not as concerned about getting it. I don't have to have SSL on tux - though it would be nice. Maybe I'll do a little more searching tomorrow and see if I run across something that might work.


Yahoo! I got it! I am in the middle of a late-night downloading session for barney so I decided to do a few searches to see if I could find the right stuff. Well... as it turned out I got a complete httpd.conf file and it showed me what I was doing right, and what I still needed to do to get it to work. Thanks for the examples! Now I have it and all is looking good. I now can test the https: links and see how that works into the North Hollow Farm eCommerce site.

PHP 4.04pl1 Uploads and Syrup

Thursday, April 19th, 2001

Today I spent some time migrating the CIA Uploading and processing code to PHP 4.04pl1 because there were differences that I hadn't taken into account in 4.04, and I wanted to get the code working again as Joel was having so much trouble getting his PHP code to work. So I did it. I haven't liked that BMP files don't display properly in Netscape, but that's another story - and in fact, I created a wonderful work-around in CIA that solves yet another problem - BMP file size.

You see, the original scripts planned on having only JPEG files. But they are lossy and BMPs are not. So CIA can read either and convert from one to another. So if you give CIA a BMP file it will generate a JPEG file so that the scripts can use it for presentation. The fact is that JPEGs are a lot smaller than BMPs, so even if they send a BMP we want to show them a JPEG. It'll display faster, and that's important.

So now no matter what is uploaded, a JPEG is generated for viewing purposes. This is a good step forward. Additionally, the comment Joel made about problems in PHP 4.04pl1 are not true - at least not generally true. I have use the PHP 4.04pl1 source and built it and it shows no signs of adding additional lines to the beginning of a file. None at all.

On the syrup front, it looks like my cousin will be going with Online Merchant Gold a package that does a complete eCommerce site for you for a nominal set-up fee and a recurring $70/mo with 4.95% of each sale. This is a reasonable set-up because it offers the Certificate and SSL which would be at least $35/mo and then there's the support you get and the database and software.... so it's a reasonable deal. They do all the card processing sending you orders and checks. Sounds nice.

I also got the easyDNS working with my domain TheManFromSPUD.com and converted all my machines to this new domain name. Very nice to have everything more stable and working well. I haven't tried sendmail, but now that I have DNS, I'll be able to do that if I so choose.

I've also taken the time to update all the web pages to remove the IP addresses and put in the machine names with the domain so I don't have to worry about updating those pages if/when the IP addresses from MediaOne change. I have to say that this is one of the better things I've done in the office for a while. It's nice and clean and cheap, and it's great to know that people can find my machines no matter where they are. Cool!

UPDATE: there's another eCommerce solution that Leslie is considering. Their present web hoster has a simple eCommerce option that might just do the trick. She's checking into it to see how they do card processing and shipping, but it sounds pretty interesting for the price.

Latest Kernel and Disasters

Wednesday, April 18th, 2001

This morning I had finished downloading all the kernel RPMs for 2.2.19-6.2.1 and could take the time to upgrade the kernels of both mao and tux. It was really quite easy and painless. The only problem is that because I keep tux up so much, I had to try and remember what I had running after the reboot. Not a big problem, but a pain.


I spoke way, way too soon...

DISASTER! When I did the upgrade to tux I didn't count on the fact that the upgrade wouldn't be able to find his Compaq Smart Array 3200 controller. The upgrade on mao worked so well I didn't even give it a second thought. But when I tried to reboot tux I got no SCSI devices found and the machine did a kernel panic.

I was agast with chest pains.

If the system can't boot, then there's no way to see the drives and have any chance of fixing the problem. I tried building a boot floppy on mao only to later realize that it wouldn't work because a boot floppy assumes the system set-up at hand. This means that I couldn't possibly build one for tux as he wasn't running. No, I didn't make one before the upgrade - which I had in the past, but will now for certain.

The problems continued when I finally got the RedHat 6.2 rescue mode off the install CD-ROM. The rpm program on the CD was based on an older version (v3) and the RedHat advisory had me upgrade the database so it's incompatible with the one on the CD.

So... In order to fix the problem, I had to be on the drive, mounted as root with everything working OK. Sounds impossible? I thought so too. But here's what I did to fix it.

  1. Boot off the RedHat 6.2 CD and enter Rescue Mode by typing linux rescue at the opening prompt. Thankfully, this version of the kernel sees the SCSI array and loads the drivers but doesn't create any devices in /dev.
  2. With the rescue system up, look at the file /proc/partitions and see that they have the partitions as they should be. This requires knowing how your machine was set up, but that's reasonable in this situation. What you need to get are the Major and Minor numbers for all the partitions on the disk you have. We'll use them to manually create devices in the next step.
  3. At the prompt, type the following commands - one for each partition:
    # mknod /dev/sda b 72 0
    # mknod /dev/sda1 b 72 1
    # mknod /dev/sda3 b 72 3
    # mknod /dev/sda5 b 72 5
    # mknod /dev/sda6 b 72 6
    # mknod /dev/sda7 b 72 7
    

    where in this example the Major number was 72 and the Minor numbers were 0, 1, 3, 5, 6, 7. It's important to understand the size and how Linux is laid out. For my installation, and may others, there is a /boot partition, a swap partition and then the rest of the drive is
    /. For me these are the last three, in order.

  4. Now we need to make a directory to mount this filesystem. I use /d via:
    # mkdir /d
    

    and then you mount the root filesystem there with:

    # mount -t ext2 /dev/sda7 /d
    

    At this point we're getting close to having something useful. We still need to mount the /boot partition properly with:

    # mount -t ext2 /dev/sda5 /d/boot
    
  5. Now cd to /d and see if your files are there. They should be. If not, then you have even bigger problems than I did - good luck. But if you see them, then you need to get the old kernel RPMs back onto your system and 'downgrade' to get back to working. The trick here is that ftp needs to have the network working and /etc/services defined and it isn't in the rescue partition. To configure the network interface I used:
    # ifconfig eth0 24.29.224.2 netmask 255.255.255.0 broadcast 24.29.224.255
    # route add -net default gw 24.29.224.1
    

    where I knew the address that I needed to use and the gateway as well.
    Next use pico, or another editor to create a minimal
    /etc/services:

    ftp	21/tcp
    

    Now you'll be able to fun ftp. A word of warning: use the '-n' option on ftp and the USER command because in this minimal configuration ftp can't understand the automatic login responses from the server.

  6. OK... we're almost done. Now we need to make this mounted filesystems look like root so that we can run the existing rpm and fix the system. That's done with:
    # chroot /d
    

    where once again, the mount point for the drive's root is /d.

  7. Now we can run any command as if the system were up and happy. This is a major breakthrough as it means that you only have to have the RedHet CD to fix a problem as severe as this one. I did a:
    # rpm -ivh kernel*.rpm --force
    

    and while it complained as usual, it worked. I then did the mkinitrd for the two kernels and it worked perfectly.

tux is back, but it took me more than 24 hrs. to figure this out. This should be a FAQ on the RedHat site, but it isn't. At least I have it here now.

Linux Kernel Upgrade

Tuesday, April 17th, 2001

One of the things I'd like to get into this journal is the basics of upgrading the Linux kernel so that it's written down in a good place to find it. Here goes...

  1. Get the RPMs for the kernel. Find out which ones you need by doing an
    rpm -qa | grep kernel and then removing the entries for
    kernelcfg and the like. For me this includes -src, -doc,
    -headers, -pcmcia, -source, -utils
    and for one machine -smp. Just make sure you match what your system has.
  2. If you want make a back-up floppy you can do that as root with:
    # /sbin/mkbootdisk --device /dev/fd0 2.2.14-12
    

    where the version (2.2.14-12) is obtained from /etc/lilo.conf and is pretty self-evident. The important issue is that this is the current version of the kernel.

  3. Upgrade all the kernel RPMs as root with:
    # rpm -Uvh kernel*.rpm
    

    there may very well be errors due to non-empty directories. This is not a problem as those directories that could not be removed can easily be removed manually.

  4. For SCSI-based machines, create new RAM Disk images as root with:
    # /sbin/mkinitrd /boot/initrd-2.2.16-3.img 2.2.16-3
    # /sbin/mkinitrd /boot/initrd-2.2.16-3smp.img 2.2.16-3smp
    

    and remove any old .img files for previous versions of the kernel.

  5. Now edit /etc/lilo.conf and change the references to the old kernel version to the new version. This will most likely be in the image= and initrd= lines. To make these changes effective in the system you need to run lilo as root:
    # /sbin/lilo -v
    
  6. Reboot.

These are pretty terse, but they'll get you through an upgrade.

Building eCommerce

Tuesday, April 17th, 2001

Well... it's been a heck of a couple of days. I should have written more, but I was just so busy getting things working I didn't have time. Here's what I've been up to: I have built a development eCommerce site with PHP4 and PostgreSQL on tux for North Hollow Farm. It's very simple - you see the entire catalog (which for them isn't much). You select the quantities you want and go to the next page. On this page you check the order items and enter your shipping and billing information - you're in SSL now, and stay that way for the remainder. The next page is a complete order summary, and if you hit continue on this one you are presented with an order confirmation sheet. Your order is in the database, and an email has been sent to the Farm indicating a new order.

It's very simple, very clean, and very nice. I can't imagine where it'll break because it doesn't do a lot of the more complex eCommerce processing steps:

  • Card Processing - not a chance, but it's certainly possible if I get hooked up with a card processing gateway. Since Leslie puts the transactions into QuickBooks and it clears them, this is not a bad thing not to have. Sure, if I was Amazon, then I'd need an automated system, but this isn't Amazon.
  • UPS Tools - this might be nice, and it's certainly the next thing to look into, but what this would give us is more accurate shipping information and times. The problem is it's all in XML, and while my PHP4 has XML compiled, I'm not sure about the others. Also, there's getting into it and figuring out what they need, and what they provide. It's certainly on the wish list, but it's not required today.

All in all, I'd have to say that this is one of the better pieces of coding that I've done lately. It's nicely laid out, it's fast, simple, and there's almost no possibility that any reasonable web surfer can make a mistake or get lost in it. I've put in tons of well-worded error messages, and even added an administrative side to view orders and update the order status. It's pretty nice.

Now for some well deserved rest and let Leslie have a go at it. Tomorrow I have an interview and will be looking into the XML in PHP4 routines to try and get a handle on the UPS tools.