Archive

Archive for the ‘tech’ Category

APC UPSes and apcupsd

January 7th, 2005 osterday Comments off

I love good free software. apcupsd is one such item.

Even though our APC Smart-UPS 3000 RM XL came with the “Business Edition Basic” of APC’s PowerChute application, I wanted something a little more flexible – and, if possible, free. After a few minutes of searching, I came across apcupsd. I think I found some other open source project that would work for an UPS, but we only use APC anyway, so this looked like it would fit the bill perfectly – and it was available at dag!

I would be sure to test it first using the safe.apccontrol script – due to a slight misconfiguation, after I started the service, the machine promptly proceeded to shutdown! (This is documented, but I didn’t read the docs first! Who does?) FYI, the cable that came with the UPS is a 940-1524C which is listed as a SIMPLE type in the config file, but defining it as SMART is what is needed:

…snip…
UPSCABLE smart
UPSTYPE apcsmart
DEVICE /dev/ttyS0
…snip…

Of course I love having web access for monitoring:

What’s great is the Master/Slave configuration so that the main instance running on our main server can send a signal to all the other servers. Also, since it’s pretty flexible, and open source, I can customize it if I need too!

Categories: tech Tags:

ColdFusion 4.5.1 on Fedora Core2 and Apache2?

November 22nd, 2004 osterday 1 comment

Unfortunately we’re still using ColdFusion on Linux at work – and 4.5.1 at that! Yeah, pretty old, but we’re still trying to migrate to all Java and don’t see the need for ColdFusion MX. (The next version of CFMX with FlashPaper support looks cool, though. BTW, CF5’s Linux MS-SQL driver sucked with Stored Procs when I tested it ages ago, hence 4.5.1 is still in use.) Anyway, we’ve got new boxes and I didn’t want to revert back to old versions of RedHat or Apache and CF 4.5.1 isn’t supported directly on the newer versions… so what to do… of course Google pointed the direction:

- C compatibility libs as posted about here

- mod_coldfusion for Apache2 Thanks Andrew! (CF5 and CF4.5.1 modules are compatible)

I haven’t load tested things yet, but so far, so good.

Categories: tech Tags:

WinAmp randomizer sucks…

September 1st, 2004 osterday Comments off

I just wanted to post that the randomizer for playlists in WinAmp sucks. It’s always been a problem. I have 4,000 plus songs and have heard 3 from the same album in the past hour. What’s up with that? (Actually, this has annoyed me for years!) Let’s see if iTunes is better…

Update: ah… yeah… iTunes is much better so far…

Categories: tech Tags:

Making Windows XP beautiful!

May 14th, 2004 osterday Comments off

RedHat 9 and Mac OSX both had a certain “beautiful” look to them. The fonts look really great. Windows was blah… Then one of the guys at work got a new laptop running XP which had beautiful looking fonts! I had to figure out how it did it… In the performance settings, both laptops had “Font Smoothing” enabled. Font on my laptop: Tahoma. Font on other laptop: Tahoma. Same fonts! So what could it be? After going through the XP display settings, I came across something called “Clear Type” in the methods section for font smoothing. After applying that, I’m a happy camper! Really makes XP beautiful – which makes life better when I have to use Windows…

Desktop -> Properties -> Appearance -> Effects…

Categories: tech Tags:

Clam AntiVirus – Open Source to the rescue!

April 28th, 2004 osterday Comments off

With the deluge of viruses and worms on the ‘net, our local antivirus software wasn’t enough. Sure it would catch it on the client usually, but why even let it get that far? With a limited budget, the commercial packages just couldn’t help – and why pay when there’s a great open source package out there?!?!

Clam AntiVirus is a wonderful open source antivirus program. I’ve only had it running for a few days, but already 40 or so viruses have been blocked.

The biggest issue was that our mail server’s sendmail was a bit dated and wasn’t compiled with milter support – sendmail’s “mail filter” API. I was temped to go the download source and compile route, but didn’t really want to deal with that – I like things that are easy to upgrade and manage these days! So I did a bit of Googling and found that RedHat 7.3 RPM support was still out there! Thanks to Dag’s packages, I was able to upgrade sendmail and install Clam all from RPMs! (I was a little weary of doing this cuz I have lots of custom stuff for sendmail – virtual domains, aliases, procmail configs, etc.)

The process:

- Install apt from Dag:

rpm -ihv apt-0.5.15cnc6-1.rh73.dag.i386.rpm

-I installed the clamav, clamd and clamav-milter packages first since I was new to apt-get and wanted to test it first:

apt-get install clamav
apt-get install clamd
apt-get install clamav-milter

-Then to upgrade sendmail:

apt-get install sendmail

The version of sendmail is 8.12.8 with a ton of good compile options, including milter support. The biggest difference is that sendmail looks for sendmail.cf in /etc/mail/ not simply /etc/.

I’ve got a custom mc file for our sendmail configuration, so I had to make a few changes to it and add some things here and there to get everything working, but the upgrade when without a hitch. The biggest issues was needed to comment out the “define(`confAUTO_REBUILD’)dnl” line by putting the standard “dnl” in front of it.

Then all I had to do was add the following:

dnl # clamav milter config
INPUT_MAIL_FILTER(`clmilter’,`S=local:/var/clamav/clmilter.socket,F=, T=S:4m;R:4m’)dnl
define(`confINPUT_MAIL_FILTERS’, `clmilter’)dnl

This is documented all over the place on the web, but to get it to work I had to this:

m4 -D_FFR_MILTER /etc/mail/market-assist.mc > /etc/mail/sendmail.cf

I’m not sure if I need to update my m4 or not – haven’t looked into that one.

I also got SMTP-S working using “temp” SSL certs.

Oh yeah… I almost fogot to mention “freshclam” – it runs as a cron job to update the local virus signature database automatically! Can’t beat that!

I’m also testing SpamAssassin – I’ll post about that soon, but so far it kicks ass!

Categories: tech Tags:

RedHat lives on!

April 28th, 2004 osterday Comments off

Ok, so we were all pissed when we heard RedHat Linux 9.0 was the “last” RedHat Linux. (No, RedHat’s not gone away, just too big for the little guys anymore – focusing on “RedHat Enterprise Linux.) I haven’t had a chance to play with “Fedora” yet, but that might be promising, but don’t rm -rf / your RedHat 7.3, 8.0, or 9.0 install just yet… The Fedora Legacy project might be a good thing to check out – it’s not the only choice out there though! I found Dag’s Apt/Yum RPM Repository to be just the ticket recently! There’s even some stuff for 6.2!

So why am I even looking at RPMs you ask? Don’t I compile from source? Sorry to disappoint, but I just don’t have time anymore to deal with source compiles! If I can find an RPM for the package I need, I’ll use it. Too much other stuff to work on… and I do have a life you know!

Categories: tech Tags:

Mail filtering with procmail

March 25th, 2004 osterday Comments off

We’ve been using procmail for a few months to handle some mail processing for a project. It’s really great, but a bit complicated for some things. I googled for some ways to help block/remove viruses and found that Infinite Ink has a great procmail quick start guide, including really useful “recipes” for snagging viruses.

Categories: tech Tags:

Arg! Memory, XP, and hard drives…

March 3rd, 2004 osterday 1 comment

Ok… Sorry for the delay in posting anything. “ultra” – my main box, has had some issues during the last few weeks. Yeah, sure, I could have posted from any machine, but I was either working on ultra or living…

So here’s what happened… On the 9th, around 3:15pm or so, ultra’s screen started flashing – not the monitor, mind you, it was the machine doing it. Freaked me out so I rebooted. Upon reboot same thing happened! Reboot again… this time XP prompted my to choose how to boot. I chose “Last know working configuration” – in retrospect, probably not the best thing to do. After that, more stuff got screwed up. I shutdown the box, dazed and confused.

Also, I should note, that while I preach “backup your data often”, I don’t practice it. Now you can see why I was even more concerned! I had two drives installed – a 120GB and a 40GB, both Western Digital. The 40GB was the original system drive with 3 partitions – long story but I used to have 98, XP and Linux on it. And both drives had code I needed.

To prevent any possible data loss, I went out and picked up a new 160GB hard drive at Best Buy – only $90 after rebates which isn’t bad. (I have to say this WD 160GB drive is the quietest drive I’ve ever heard, not that it’s meant to be, but it’s really nice.) The 160 gigger added its own problems to the mix. At first my old ASUS A7A266 board didn’t see the whole drive. A quick BIOS update fixed that.

Ok, now to reinstall XP Pro to see if my data is ok! Then I found out the XP Pro only supports up to 137GB drives – you need XP with SP1 included to install to 160GB! So I had to partition the drive – not really what I wanted to do, but oh well… So I start installing… I now start getting errors copying files during the install. I test reading the disc on one of the Linux servers and do not have any problems. Start again. Errors. So I pull out a trial XP disc to copy from – errors. Shit.

During this process, I was also researching possible issues, etc. thanks to Jen’s Win98 laptop being around. (Thanks, sweetie!) I found a great memory tester, memtest86 – download it now. In a few seconds, it found one of my Crucial 256MB DDR sticks was bad. I was pretty surprised by this since Crucial is such a good name in memory. So I removed the bad stick – down to 256MB at this point. Later that evening I went ahead and purchased a 512MB stick from Crucial for $80 or so – not bad and I knew 256MB would not cut it running XP. (I need to see if I can return the bad stick – Crucial has some sort of lifetime guarantee when your order from them.)

While scavenging around for other XP discs, I came across a 120 day “eval” of XP Pro with SP1! I figured I might as well use that for now and use the whole 160GB and figure a way around the eval later – anyway my main point was to try to get my data back! So I started the install, repartitioned to one NTFS partition of 160GB – formatted is about 150GB. Things went much smoother this time, but took a while – no install errors. So far so good…

Now that I had XP SP1 up and running, I wanted to see if my two other drives were ok. Since I had the new hard drive, a CDR drive and DVD drive on the IDE bus, I only had one IDE device open and I thought I should do them one at a time anyway. First the 120 gigger – no problems at all! Everything was there. Sweet! Power down. Put in 40 gigger. On boot, XP found problems and ran chkdsk on it – many of the old XP system files were trashed. When XP finished booting, I was very happy to see all my real data there! Outlook .pst files – check. Code projects – check. Settings, downloads, My Documents – check. Whew! Since I wanted to test the drive more and reformat, I copied the data to keep to the 160 gigger. Nice. Took a while, but I was happy to have my data back!

After I had the 40 gigger taken care of, it was back to the 120. I figured I might as well have 280GB at my disposal! My heart dropped, though, when I booted up this time… XP said it needed to run chkdsk on the drive. Why? – I thought, but let it do it anyway – big mistake! I have no idea what XP was thinking… but there it went, error… error… fixing this… fixing that. chkdsk is heartless. After chkdsk finished, it gave some error about not enough space for backup files or something… Damn thing’s not smart enough to see I have tons of space on C:! Once chkdsk finished and I logged in to XP, the 120GB “E:” drive was not accessible. Reboot. Still not accessible – “Would you like to format this drive now?” “No, I really wouldn’t, but I would like my data back!” Kill me now. Not much of the 120GB was important. Yeah, I did have a lot of backups from our old company on it, but nobody asked for those files in a year. And the movies and downloads – no big deal. But I had been using it for my VB projects – one of which was pretty critical. Dig my grave now.

I love the Internet. I love downloads and free trials. I love Google. (Ok, I have some issues with Google, but I’ll post that later.) I did a little Googling and found some great data recovery tools. Most of the tools have free “read only” downloads that will tell you if you can get your data back – it’s really great. I stumbled upon Runtime Software and their GetDataBack for NTFS product. This thing is great! I downloaded it and let it run on the 120 gigger. Took a while, but it found all the files! Not wanting to risk losing anything else, I quickly purchased the thing online – only $80 – a steal for this type of tool! Got a serial number and without even needing to restart the app, I was able to recover the data from the 120 gigger and save it to the 160GB drive. I recovered the crucial data – my VB code and some other stuff. Next time I rebooted, XP found the drive properly, did another chkdsk, but this time my data was back and ok. Not exactly sure what happened, but this was cool. I realize that maybe I didn’t need to purchase GetDataBack since the next chkdsk fixed the problem, but for me it was worth it to have the data. I installed Nero and made a quick backup of the code.

At this point I wanted to test the system pretty good. I ran a full memtest86 for 2 passes on the full 768MB RAM I now had running. I installed the ASUS Probe utility – I never use to use these things, but now I like keeping tabs on the system, CPU temp, etc. It’s actually pretty cool. I also found the Belarc Advisor to be pretty useful. It’s a nice way to keep tabs on your system, included software installed. I also downloaded 7Byte’s Hot CPU Tester, but haven’t really played around with it. Also, for Western Digital drives, their support page has some cool utils for testing drives.

So now I was ready to get settled in and get XP fully up and running the way I like – still running on the eval so I haven’t patched or updated the system. I won’t go into the details, but you can upgrade XP SP1 eval to XP SP1 corporate without any problems. Now, apply all the Windows updates and patches. Install Office 2003. Apply Office 2003 updates and patches. Connect up USB devices, install drivers. Install all other apps…

A while later I’m up and running. Got my dual monitor setup working. Style XP setup. Etc., etc… But I notice that my machine is still running slow. I thought maybe with 256MB, XP would struggle a bit, but with 768MB I thought it would fly. After a little checking the settings and control panel, I noticed the new drive running in PIO Mode. I hadn’t heard PIO Mode in a long time – everything’s DMA now right? After a long bit of Googling, it seems that my A7A266 just can’t do DMA with the WD 160GB drive – even with the new BIOS. Shit!

Next day, head out to Best Buy to pick up a SIIG UltraATA 133 PCI IDE card. A good deal at $35, I think. The reviews are pretty good – just comments about the documentation sucking – which it does. So I pop in the card – leaving the drive on the motherboard IDE so I can install the drivers – and boot up. XP detects it, installs the drivers from floppy – works like a charm. Power down, connect drive to primary IDE, device 1, boot up, set BIOS to boot from SCSI device and XP boots up great – and very fast. (Actually at first I forgot to set the BIOS to boot from SCSI device, not thinking. For newbies: most add on controller cards look like SCSI devices to Windows.)

Sweet! I power down again and put the 120GB drive on the secondary IDE port. Wonderful! Very fast! Loving it! So now I have dedicated the new controller to the two large drives, giving them their own IDE channel. 40GB drive is on motherboard primary IDE, as master; CDR is slave. DVD drive has secondary IDE to itself.

Kevin lets me borrow his firewire DVD burner to make a backup of my stuff. So now it’s all on DVD+Rs too. (I added a firewire card a while ago to capture from camcorders – very cool! I love DV.) I also zip and move most stuff from E: (the 120 gigger) to G: (the 40 gigger), so I have 120GB empty to play with, along with 80GB or so still on C:

Life is beautiful… until Friday…

My USB scanner, a Canon N656U, installed itself and was working fine with Photoshop, etc., but it also has some utilties you can install to “better use” to product – “ScanGear Toolbox”. I haven’t used it much, but I wanted to play with some other scanner settings, so I installed it. The version on the CD I have is the same as on the Canon website, so I install from CD. It’s got a couple other apps: a photo database and slide show, along with OmniPage Pro 9. I’ve installed the other apps before, but not OmniPage, so I thought I’d give it a try… big mistake…. I don’t know what happened but after the install it tells me it needs to restart. Ok, no biggie… but then it locks! Never shutdown! I wait 5 or 10 minutes just to be sure then hit the reset button…

NTLDR is missing
Press any key to restart

That’s what I’m prompted with! Shit! My heart stops. My spirit floats out of my body and I guess I die for a second… Ok, I really didn’t die and it’s not that bad, but I thought I just setup everything for nothing. (Had to embellish to keep you interested!) Several reboots and power cycles, but the same results. Back to Google…

I now know more about the x86 boot process than I wanted, especially for XP. MBRs, partition tables, boot sectors… I’ve had enough! Anyway… I boot into the XP recovery console – it’s cool that XP has this, but it’s rather limited. I do all the stuff that a ton of sites say, including Microsoft… fixboot, fixmbr, etc… Nothing works – even after stripping the machine down to just the 160GB drive. The strange thing is that if I put the drive back on the motherboard IDE controller, it boots fine! Also, somehow I manage to screw up the 120 gigger – i think just the partition table since GetDataBack saw all the files still, but didn’t care too much since I didn’t need the stuff left on it. I try creating a boot disk, but still no avail. I boot back into XP via the motherboard IDE on occasion just to make sure the drive it still ok and to continue Googling. I also came across “PartInNT.exe” and “PTEDIT32.EXE” which I think were/are part of Partition Magic or something from PowerQuest – you can get them via FTP. I play around a bit and then just delete the partition on the 120 gigger and reformat it.

Eventually I stumble on to DIY DataRecovery’s DiskPatch. It’s got a great PDF full of data and information. I didn’t buy the full version, but tried out the demo, which supposedly doesn’t write anything to the drive. (It’s only $40, so I might go ahead and get it – clones drives too. Check out MBRtool too – it’s free!) But something is different now… not sure, but I put all the drives back in and connect the boot drive to the SIIG controller – now when I boot I just get a blank screen with the cursor flashing in the corner. From the PDF for DiskPatch: “If the boot code in the MBR is damaged or missing, the system may just hang after it finished the BIOS power on self tests. If you have a polite BIOS it may warn you that something is wrong in the MBR. In other cases, you may just end up with a blinking cursor in the upper left corner of the screen.” But everything looks ok there and it boots fine on the motherboard IDE! Just for the hell of it, I try the boot floppy with NTLDR on it… Wow! Now it works! Boots up fine into XP! I’m a happy camper again!

I test this and that, making sure all the drives work, etc. Reboot to make sure it works again. I try the XP recovery console one more time… fixboot… still cursor just flashes… but I can boot from the floppy to get XP running, so I reassemble the case and move ultra back to my work desk from the work bench. Reboot… still works! Connect up all the USB devices, etc…. Still works…

So that’s where I’m at now. XP is booting from floppy, loading from new PCI IDE card and running great. As I get time, I’ll play around with DiskPatch and post more if I get this booting 100% properly from the hard drive. I’ve lost a lot of time, both work and play on this, so I wanted to document it properly and maybe this post will help someone else.

Quick reference to resources used:

- RAM memory tester: memtest86
- NTFS file recovery, GetDataBack from Runtime Software, also available for FAT32
- Black Screen with XP at Microsoft (recovery console, boot disk info, etc.)
- Belarc Advisor – machine info, software installed, etc.
- DIY DataRcovery – DiskPatch and MBRtool
- Some partition tools at PowerQuest’s FTP server – “PartInNT.exe” and “PTEDIT32.EXE”
- 7Byte’s Hot CPU Tester
- Western Digital support page

Categories: tech Tags:

Still issues with IE…

October 7th, 2003 osterday Comments off

In general, I don’t have too many issues with IE. I’m sure some people out there my flame me for it, but I do use it as my main browser – I mean I have to design for the majority, and that’s IE users on Windows. Plus, I really like MSXML and using it in the browser to save some of the server side processing.

There are a few things that still irk me – aside from the standards compliance issues… I’ve already mentioned that my current blog css causes problems on occasion – such as the page being cutoff and links “half rendering” until scrolled over. Another one that’s starting to piss me off is the disappearance of the status bar. I’m not sure why, but sometimes IE opens up with the status bar not displayed. Strange… Firebird renders things beautifully, though!

Categories: tech Tags:

A little RAM goes a long way…

October 7th, 2003 osterday Comments off

I’m not sure if any of you will notice, but I boosted wasted’s RAM from 64MB to 128MB. Now she’s not even swapping!

I put a few little bash scripts on there to bring up the /proc/cpuinfo and /proc/meminfo data. No real coding, just thought it was cool. I like little cgi scripts like that – just a head or tail here, a cat there.

Categories: tech Tags: