DST updates for freebsd

Those of you out there running older freebsd machines that require an update for the new DST can find the update timezone files under /usr/ports/misc/zoneinfo. To find out if you need the update, run this from the command line:

zdump -v /etc/localtime | grep 2007

It should report:

/etc/localtime Sun Mar 11 05:59:59 2007 UTC = Sun Mar 11 01:59:59 2007 AST isdst=0 gmtoff=-14400
/etc/localtime Sun Mar 11 06:00:00 2007 UTC = Sun Mar 11 03:00:00 2007 ADT isdst=1 gmtoff=-10800
/etc/localtime Sun Nov 4 04:59:59 2007 UTC = Sun Nov 4 01:59:59 2007 ADT isdst=1 gmtoff=-10800
/etc/localtime Sun Nov 4 05:00:00 2007 UTC = Sun Nov 4 01:00:00 2007 AST isdst=0 gmtoff=-14400

If it doesn’t report march 11th and nov 4th make sure your ports tree is current and do the following:

cd /usr/ports/misc/zoneinfo
make install && make clean
tzsetup

Choose your local timezone in here and accept the changes. Then re-run the above zdump command. If it reports March 11th instead of April 1st you’re good to go.

HP C3000 Workstation with HP-UX 11.i

So I managed to win an auction on ebay for an HP C3000 PA-RISC processor based workstation. I’ve been wanting to dabble in HP-UX for some time now (along with OS/400 and AIX) and since HP-UX requires special hardware I haven’t had a chance to work with it. I managed to get two C3000 workstations complete with 1GB ram each and 18GB SCSI disks for $170 cdn! considering they retailed for roughly $18K cdn each when they were new (2001) it’s a pretty good deal.

I’m going to pick them up this weekend, I can’t wait. Although I read that HP-UX is a bit of a hobbiest nightmare due to the restrictive licensing, I hope to get a running copy of HP-UX 11.i on one of them ASAP. If nothing else I will run PA-RISC linux on them and use them as servers/nerdy workstations.

Next I just have to get my hands on an RS6000, then my UNIX ninja training camp will be complete.

HP C3000
HP C3000

Old school cable management.

While reading some messages on the nanog mailing list today I picked up on a discussion regarding a cable management technique called “Cable Lacing“. This is where cables are tied in bundles with waxed twine instead of zip ties or velcro. I remember seeing this when I was at a CO once, it never really dawned on me how much work would be involved in lacing up that much twisted pair. It’s the kind of thing you do once, not something you want to do with cabling that needs to be moved from time to time. That being said, it makes for an incredibly neat wire management solution.

Apparently it’s becoming a bit of a lost art as the old school telecom guys retire. Here’s a simple explanation of this lost art.

Cable Lacing

IBM Bladecenter “Can not read power-on VPD for blade”

Spent two hours at the DC Friday night trying to install some new blades in our bladecenter. Every time I installed a new blade the power light kept flashing rapidly. I logged into the web management for the bladecenter and saw the event log entry “Can not read power-on VPD for blade”. Because the bladecenter would not read the hardware VPD from the blade it would not allow it to power on.

After speaking with IBM support we decided to update the firmware of the AMM (advanced management module) in the bladecenter. When I tried to update the firmware it gave me an error saying that it could not install the update. After 45 mins of trial and error with the IBM engineer (great support BTW, 1000 times better than dell!) we decided to reboot the AMM. (this had no affect on the running blades btw).

After a reboot everything worked fine! I was able to install the 6 new blades and update the AMM firmware to the latest release. It was strange because all the other functions of the AMM seemed to be working fine, the already installed blades were communicating with the AMM without issue. I would suggest that anyone who runs into this issue should try to reboot the AMM first, as it’s a fairly low impact thing to do and it would have saved me an hour if I had thought to do it from the start.

Remove comments and blank lines from a file

Want to make that httpd.conf look clean and tidy? Have a file that contains a lot of blank lines or comments that you don’t want? Here’s a quick trick to remove all the extra cruft.

Say I have a file called config.conf. This file looks like this:
-bash2.05b cswanson@helios ~ % cat config.conf
# Sample config file!

# Here is a sample comment. Note the blank lines.

$config=/etc/blah
echo $config $1

# Here is some more sample comments.

Now we run egrep on the file to remove the commented and blank lines:

-bash2.05b cswanson@helios ~ % egrep -v '^$|^#' config.conf
$config=/etc/blah
echo $config $1
-bash2.05b cswanson@helios ~ %

If you want to save this output to a file just use a simple redirect:

-bash2.05b cswanson@helios ~ % egrep -v '^$|^#' config.conf > config.conf-new
-bash2.05b cswanson@helios ~ % cat config.conf-new
$config=/etc/blah
echo $config $1
-bash2.05b cswanson@helios ~ %

UPDATE: If you’re using vi you can use the following commands to achieve the same thing.

Remove blank lines:
:g/^$/d

Remove commented lines:
:g/^\s*#/d

Of course there are other ways to skin this cat using sed/awk etc but the above two commands have proven to be quick and easy for me.