Scary thought: Navigate the process of home buying without the help of an professional agent.
Turns out this isn't as scary as it sounds. Let's review what a buyer agent does for you to earn his (typical) 3 percent of the deal:
- Tour houses for sale with you
This seems to be by far the most time intensive, but also least skilled work in this set. When we bought our current home, our agent found homes we might like, arranged tours to show them, and accompanied Patricia (or me). We saw 40+ houses that way until we found the one we liked and eventually bought.
- Help write an offer and determine a fair price
The price question is probably the trickiest of the bunch. There is no regulation for home prices, aside from gut feeling, "what the market is doing", previous sales of comparable houses in the area, and some additional fudge factor. It's easy to spend too much, or not ask enough and leave money on the table. A good agent knows the neighborhood you want to buy in, knows of recent sales, and in what condition those houses where. A really good agent can find out how much horse trading happened during escrow and what concessions where made by the sellers during closing. The official sales price does not break out e.g. an allowance for old carpet.
A good agent helps write a compelling offer, with proper contingencies and makes sure the document is sound. In general, any conditions not in the offer can't be added to the sales contract later on.
- Negotiate with the selling agent
If an offer is accepted right away, you are probably paying too much. The offer/counter-offer game is common in real estate transactions. The agent helps getting the most for your money.
- Help with the closing and escrow process
The escrow process is full of stuff you need to take care of. Inspections, property records, dealing with the bank (well, that you have to do yourself, no matter what). And lots of signatures on closing day.
Pheww. That's a lot of stuff, and if you ask any agent they are going to tell you many more things an agent does for you.
Also, very often the agent doesn't actually get all of the money from their cut, they need to split with their brokerage firm. The difference between a $750,000 and $700,000 purchase in Silicon Valley translates to $200-$300 or less difference in take home pay for the agent on a commission north of $4,000. Assuming a sale value of $750,000, 1% real commission (after broker fees and expenses), and 40% taxes for the agent. 6% is over $40,000 for this transaction. Lots of money for me.
Here's my view:
- Tour houses for sale
Hmmm, I know my neighborhood. I want to upgrade within my neighborhood and don't want to move elsewhere. Patricia and I are going to pretty much every open house in the area, so we actually do know what's on the market, and in what condition the houses are.
- Knowing the right price to put into the offer
Houses are typically listed on the local MLS (mlslistings.com in the Bay Area). Some information is hard to get to if you are not a realtor. Additionally, most sites don't include history about previous purchases. For our area southsanjose.com has some good information. A bigger database, but not as up to date is the information at domania.com. They also offer an automated home valuation tool. From my experiments, that tools seems to come out a bit low. zillow.com has a cool UI, but tends to be a bit high with their prices.
Bottom-line, go with your gut and get as much information has you can. BTW, asking prices of homes currently for sale can be some guidance since in theory sellers would do the same research with their agents. But, in reality the exact asking price seems to be more the result of what the seller wants and their specific circumstances of the sale (sell fast, can wait, contingencies, etc.)
- Negotiate
I can do that. Some people feel uncomfortable with that.
- Closing and escrow process
A lot of that is boiler plate. You need to make sure all details are taken care of. Get a lawyer familiar with real estate transactions for the paper work, and make absolutely sure all inspections are done properly. The bank is going to ask for them as well in many cases.
Overall, not too scary if you are willing to do the leg work.
Update (2007/05/04):
Of course, I'm not the only one who came up with this idea. This blog entry gives some nice background and similar reasoning. fool.com has a nice section on home buying as well. Sponsored aptly by LendingTree. A quick overview of contract content is here.
Sunday, April 22, 2007
Wednesday, March 28, 2007
transfering a domain from register.com
My main domain is up for renewal. 5 Years ago I spent 70 bucks or so with register.com for registration fees.
Since register.com still is charging a whopping $35 a year (down to ~$16/yr if you register for 7 or more years), I was looking for alternatives. My other domains are registered with GoDaddy.com, who are still not the cheapest but reasonable. I start the transfer process, get half a dozen emails to my domain contacts from GoDaddy, but don't hear anything from register.com. This morning I search through their site, and there is literally no mention of how to transfer a domain away from register.com (surprise). Eventually, I find the FAQ entry to obtain the "Auth Code". I need to call them. ok.
*ring*
*ring*
[cheery voice] "Hello, can I interest you in our content services?"
- No
"ok, how can I help you today"
- need auth code for domain transfer
[voice even cheerier] "ok, I put you right through"
*ring*
*ring*
[guy voice] "What is your domain name"
- I tell him. We go through the secrect question game.
[guy voice getting cheerier] "ok, how can I help you with your domain"
- auth code for transfer, please
"why are we talking about this?"
[I start to hate cheery guy]
- you guys charge $35, GoDaddy way less than $10. simple, no?
"we offer premium support, sure, there is a premium in price for that"
- I never called you guys for support
[Damn, how hard can it be to need support for a frigging domain?]
"I totally understand that. We don't want to loose you." [sure, I'm not costing them anything]
"I can offer you a substantial discount from our published prices. How about $35 for 5 years?"
[I'm speechless for a second. What are they thinking? I'm annoyed. This is a slightly better deal than what I'm getting at GoDaddy. However, I hate these bait tactics.]
- please just give me auth code
[so he does]
"but remember, you can always still accept this offer and GoDaddy will need to refund the money you already paid for the transfer, since they didn't actually provide the service." More heavy sales blurb follows.
- yeah, yeah, thank you
I hang up. I'm annoying and amazed at the same time. ... So, wait, I could call GoDaddy now and ask for the same price, otherwise I move all my domains to register.com. Now that would be fun, if that's how the game is played... hmmmmm...
Since register.com still is charging a whopping $35 a year (down to ~$16/yr if you register for 7 or more years), I was looking for alternatives. My other domains are registered with GoDaddy.com, who are still not the cheapest but reasonable. I start the transfer process, get half a dozen emails to my domain contacts from GoDaddy, but don't hear anything from register.com. This morning I search through their site, and there is literally no mention of how to transfer a domain away from register.com (surprise). Eventually, I find the FAQ entry to obtain the "Auth Code". I need to call them. ok.
*ring*
*ring*
[cheery voice] "Hello, can I interest you in our content services?"
- No
"ok, how can I help you today"
- need auth code for domain transfer
[voice even cheerier] "ok, I put you right through"
*ring*
*ring*
[guy voice] "What is your domain name"
- I tell him. We go through the secrect question game.
[guy voice getting cheerier] "ok, how can I help you with your domain"
- auth code for transfer, please
"why are we talking about this?"
[I start to hate cheery guy]
- you guys charge $35, GoDaddy way less than $10. simple, no?
"we offer premium support, sure, there is a premium in price for that"
- I never called you guys for support
[Damn, how hard can it be to need support for a frigging domain?]
"I totally understand that. We don't want to loose you." [sure, I'm not costing them anything]
"I can offer you a substantial discount from our published prices. How about $35 for 5 years?"
[I'm speechless for a second. What are they thinking? I'm annoyed. This is a slightly better deal than what I'm getting at GoDaddy. However, I hate these bait tactics.]
- please just give me auth code
[so he does]
"but remember, you can always still accept this offer and GoDaddy will need to refund the money you already paid for the transfer, since they didn't actually provide the service." More heavy sales blurb follows.
- yeah, yeah, thank you
I hang up. I'm annoying and amazed at the same time. ... So, wait, I could call GoDaddy now and ask for the same price, otherwise I move all my domains to register.com. Now that would be fun, if that's how the game is played... hmmmmm...
Thursday, March 22, 2007
Whee!
Interestingly, after NOT specifying Option "TVOutFormat" "COMPOSITE" the TV out on the new FX6200 card now works properly. TV out seems even a bit more crisp than with the old FX5200 card.
The channel switching problem when trying to record shows persists. I can watch live TV just fine, but all scheduled records fail with the error I posted yesterday.
I rerun myth-setup, delete all encoder cards and made sure that MPEG (PVR-500) is selected, then re-run mythfilldatabase --do-channel-upgrade. Now it works properly. I guess, 0.20 added a few fields to the capture cards that needed to be populated by mythtv-setup, even though it was all set up from 0.19 already.
No spontaneous shutdown for 24 hours. Replacing the video card really seemed to help. That's good enough for today. I'll worry about LIRC and ndiswrapper on the weekend.
The channel switching problem when trying to record shows persists. I can watch live TV just fine, but all scheduled records fail with the error I posted yesterday.
I rerun myth-setup, delete all encoder cards and made sure that MPEG (PVR-500) is selected, then re-run mythfilldatabase --do-channel-upgrade. Now it works properly. I guess, 0.20 added a few fields to the capture cards that needed to be populated by mythtv-setup, even though it was all set up from 0.19 already.
No spontaneous shutdown for 24 hours. Replacing the video card really seemed to help. That's good enough for today. I'll worry about LIRC and ndiswrapper on the weekend.
Wednesday, March 21, 2007
grumpy powers down spontaneously
After I determined that the FX5200 in grumpy was bad, I swapped in an older Matrox card. I'm not sure if that's related, but Grumpy would not stay up for more than a few hours. It would just shutdown, similar to entering hibernate mode, particularly when I'm not doing anything on the system at that time. The problem is that I also can't wake it up, unless I hold the power button for 30 seconds or so. Only then I can power up again. and of course, I don't want it to shut down in the first place.
At first I suspected heat problems in the cpu. I tried cpuburn, within seconds got the cpu up to more than 90C until the kernel spew out temperature warning messages to the log and entered moduled frequency, i.e. ramps down the CPU frequency to reduce the heat. No such log entries exist from other shutdowns, so I don't think that's my problem.
When grumpy shut down again on me, I swapped in a new FX6200 card with TV out that I picked up today. So far it hasn't shut down on me. We'll see. If it's still up and running when I come home tomorrow I decalre victory and blame some interaction of the Matrox card with the motherboard. I'm not sold yet.
On a related note:
When I boot with the new card I get console output, so he physical connection to the TV works. However, as soon as X is enabled, the TV screen goes black. X is running because I can her the KDE login music, I just can't see anything. Frustrating.
At first I suspected heat problems in the cpu. I tried cpuburn, within seconds got the cpu up to more than 90C until the kernel spew out temperature warning messages to the log and entered moduled frequency, i.e. ramps down the CPU frequency to reduce the heat. No such log entries exist from other shutdowns, so I don't think that's my problem.
When grumpy shut down again on me, I swapped in a new FX6200 card with TV out that I picked up today. So far it hasn't shut down on me. We'll see. If it's still up and running when I come home tomorrow I decalre victory and blame some interaction of the Matrox card with the motherboard. I'm not sold yet.
On a related note:
When I boot with the new card I get console output, so he physical connection to the TV works. However, as soon as X is enabled, the TV screen goes black. X is running because I can her the KDE login music, I just can't see anything. Frustrating.
Tuesday, March 20, 2007
grumpy very grumpy
The 300GB Maxtor drive now really had issues (heat?). On top of that the video card in grumpy died (heat?). At first it looked like the CPU was toast, since the box didn't even beep anymore. I got an Asus board with Celeron CPU. Should have gotten a P4, since the Celerons apparently don't support SpeedStep (though Linux seems to think otherwise). /proc/acpi is not terribly well populated on this board.
I had lots of trouble with getting 2.6.18-4 to cooperate. ndiswrapper is a no-go so far. nor is lirc. module-assistant is really cool.
I added www.debian-multimedia.org to my apt sources and spent most of last night watching apt getting dependencies, while at the same time copying the movie and media files from the old disk to the new 500GB disk I bought recently. No issues whatsoever with that disk yet, while the 300GB disk is was throwing CRC errors left and right. bad IDE cable? I'll test that later.
mythtv 0.20 now finally works with kernel 2.6.18-4-686 and ivtv 0.10.1. I cheated with the ivtv install and compiled straight from source, since the drivers are not available via m-a.
I fiddled with schema update issues a lot (basically reversing each failed update until the step no longer complained). After the update the channel line-up was a mess. I couldn't get recordings to work properly. They failed with
wiping out all channels, running mythfilldatabase --refresh-today --do-channel-updates seems to have helped. At least I got a recording going now. on channel 40. However, I still can't record from channel 2. Will try again tomorrow. I suspect the table wants the channel frequencies.
To prevent very nasty video distortion when watching or recording channels that air in HD, I switched the recording profile from 480x480 as originally recommended by mythtv to full-size 720x480. No more distortions when watching TV, I hope the same is true for recordings.
Sound was not a problem to my surprise.
The setup is a mess right now: No video card with Video-out support, so I have my computer screen in the living room. Bah.
I failed over the system to the 500GB disk using the find / cpio trick I mentioned earlier in this blog.
I had lots of trouble with getting 2.6.18-4 to cooperate. ndiswrapper is a no-go so far. nor is lirc. module-assistant is really cool.
I added www.debian-multimedia.org to my apt sources and spent most of last night watching apt getting dependencies, while at the same time copying the movie and media files from the old disk to the new 500GB disk I bought recently. No issues whatsoever with that disk yet, while the 300GB disk is was throwing CRC errors left and right. bad IDE cable? I'll test that later.
mythtv 0.20 now finally works with kernel 2.6.18-4-686 and ivtv 0.10.1. I cheated with the ivtv install and compiled straight from source, since the drivers are not available via m-a.
I fiddled with schema update issues a lot (basically reversing each failed update until the step no longer complained). After the update the channel line-up was a mess. I couldn't get recordings to work properly. They failed with
2007-03-20 22:45:51.701 TVRec(1): Changing from None to RecordingOnly
2007-03-20 22:45:51.718 TVRec(1): HW Tuner: 1->1
2007-03-20 22:45:51.798 Channel(/dev/video0): SetInputAndFormat() failed
2007-03-20 22:45:51.799 TVRec(1) Error: Failed to set channel to 3. Reverting to kState_None
2007-03-20 22:45:51.800 TVRec(1): Changing from RecordingOnly to None
2007-03-20 22:45:51.809 Canceled recording (Recorder Failed): Law & Order: Special Victims Unit "Scheherezade": channel 1001 on cardid 1, sourceid 1
2007-03-20 22:45:51.827 scheduler: Canceled recording (Recorder Failed): Law & Order: Special Victims Unit "Scheherezade": channel 1001 on cardid 1, sourceid 1
wiping out all channels, running mythfilldatabase --refresh-today --do-channel-updates seems to have helped. At least I got a recording going now. on channel 40. However, I still can't record from channel 2. Will try again tomorrow. I suspect the table wants the channel frequencies.
To prevent very nasty video distortion when watching or recording channels that air in HD, I switched the recording profile from 480x480 as originally recommended by mythtv to full-size 720x480. No more distortions when watching TV, I hope the same is true for recordings.
Sound was not a problem to my surprise.
The setup is a mess right now: No video card with Video-out support, so I have my computer screen in the living room. Bah.
I failed over the system to the 500GB disk using the find / cpio trick I mentioned earlier in this blog.
Monday, March 05, 2007
The End of Internet Radio? - Copyright Royalty Board is going nuts again
Bill Goldsmith from Radio Paradise my very favorite Internet Radio station
wrote about the latest attempts to put Internet Radio out of business. The royalty payments set by the Copyright Roalty Board are flat out ridiculous. Pay per performance (ie. for every single listener) is a flawed model. Internet stations get penalized twice compared to over-the-air stations, they not only pay for the additional bandwidth consumed, but also pay more royalties the more successful they are. Just because you can exactly measure how many people actually listen on the Internet shouldn't give anyone a blank check to cash in on that, especially not the greedy music companies represented by the RIAA and SoundExchange.
Successful stations like Radio Paradise with 1000's of concurrent listeners easily make it above the low bar of 159,140 "aggregate tuning hours" per month in less than a day even though they are a non-profit radio station. The CRB seems to be under the impression that "non-profit" is code for "not successful".
The analysis on the same page is even more chilling. While Radio Paradise is listener-supported and, I happily pay a contribution regularly, many other Internet radio stations are not. The analysis suggests that an ad supported radio station would have to pay royalties roughly equal to 100% of their revenues.
While I agree with Bill's gloom assessment of the situation I certainly hope there is a way for Internet Radio to survive, and be it by a crutch similar to the agreement negotiated in 2002 mentioned in Bill's post. Meanwhile, Congress needs to get their act together and reign in this craziness.
wrote about the latest attempts to put Internet Radio out of business. The royalty payments set by the Copyright Roalty Board are flat out ridiculous. Pay per performance (ie. for every single listener) is a flawed model. Internet stations get penalized twice compared to over-the-air stations, they not only pay for the additional bandwidth consumed, but also pay more royalties the more successful they are. Just because you can exactly measure how many people actually listen on the Internet shouldn't give anyone a blank check to cash in on that, especially not the greedy music companies represented by the RIAA and SoundExchange.
Successful stations like Radio Paradise with 1000's of concurrent listeners easily make it above the low bar of 159,140 "aggregate tuning hours" per month in less than a day even though they are a non-profit radio station. The CRB seems to be under the impression that "non-profit" is code for "not successful".
The analysis on the same page is even more chilling. While Radio Paradise is listener-supported and, I happily pay a contribution regularly, many other Internet radio stations are not. The analysis suggests that an ad supported radio station would have to pay royalties roughly equal to 100% of their revenues.
While I agree with Bill's gloom assessment of the situation I certainly hope there is a way for Internet Radio to survive, and be it by a crutch similar to the agreement negotiated in 2002 mentioned in Bill's post. Meanwhile, Congress needs to get their act together and reign in this craziness.
Saturday, March 03, 2007
Success ... I think.
Phew. I spent a long time last night copying data off the old chef. One particularly annoying wrinkle was that after the parity rewrite, chef came up with unlean filesystems, and mounted them read-only. Including /. That meant, no logs could be written, and general unhappiness, which prevented remote logins. copying stuff out of chef via scp yielded a question every ~3.5 minutes, that the "host key of new-chef is unknown, is that ok"? In my 1am haze I dutifully typed yes every 3-4 minutes for an hour until the transfer was done.
This morning I thought about this more and figured that the only reason why it's asking repeatedly was that it couldn't write the host key to /root/.ssh/known_hosts and therefore when the ssh re-keys, it had to ask me again. Chef was still up this morning with read-only file systems and I still had to copy off 20GB of data, I didn't want to type yes all the time. I can't fsck the root filesystem while it's mounted read-only, and I was a bit concerned that chef might not come up again, when rebooting, so I mounted memory file systems over /root and /tmp:
mount_mfs swap /root
mount_mfs swap /tmp
The first parameter is just for the mount command to get some disk parameters, usually the special device of the swap partition on a local disk. Using "swap" forces mount_mfs to use a generic default. Useful for systems with no local disk.
I got all data transfered, decommissioned the old chef in the afternoon, and replaced the Athlon 900 motherboard and the two 160GB with a VIA M10000 board, 512MB of memory, and a 300GB disk. The disk is set up as one half of a raid1 mirror, so when I upgrade grumpy to use a 500GB disk as planned, I can use the 300GB in chef. Provided that disk passes a full-blown offline self-test via smartctl and a 8h stress test using multiple bonnie++ instances. The 500GB disk is going to get the same stress test before I put it in grumpy.
One immediately obvious benefit of the new chef is that it feels fast when using it with IMAP. A modern 1GHz CPU easily smokes a 5+ year old 900MHz Athlon. The memory is 4 times faster, too. And the whole system is quieter (mainly because the CPU fan on the Athlon was showing its age).
There's still lots of work left to do. I added features to Chef in small installments over 2+ years. But the basics (smtp, imap, web) are working reasonably well, so for now I'm happy enough with this that I'm going to watch some TV now.
This morning I thought about this more and figured that the only reason why it's asking repeatedly was that it couldn't write the host key to /root/.ssh/known_hosts and therefore when the ssh re-keys, it had to ask me again. Chef was still up this morning with read-only file systems and I still had to copy off 20GB of data, I didn't want to type yes all the time. I can't fsck the root filesystem while it's mounted read-only, and I was a bit concerned that chef might not come up again, when rebooting, so I mounted memory file systems over /root and /tmp:
mount_mfs swap /root
mount_mfs swap /tmp
The first parameter is just for the mount command to get some disk parameters, usually the special device of the swap partition on a local disk. Using "swap" forces mount_mfs to use a generic default. Useful for systems with no local disk.
I got all data transfered, decommissioned the old chef in the afternoon, and replaced the Athlon 900 motherboard and the two 160GB with a VIA M10000 board, 512MB of memory, and a 300GB disk. The disk is set up as one half of a raid1 mirror, so when I upgrade grumpy to use a 500GB disk as planned, I can use the 300GB in chef. Provided that disk passes a full-blown offline self-test via smartctl and a 8h stress test using multiple bonnie++ instances. The 500GB disk is going to get the same stress test before I put it in grumpy.
One immediately obvious benefit of the new chef is that it feels fast when using it with IMAP. A modern 1GHz CPU easily smokes a 5+ year old 900MHz Athlon. The memory is 4 times faster, too. And the whole system is quieter (mainly because the CPU fan on the Athlon was showing its age).
There's still lots of work left to do. I added features to Chef in small installments over 2+ years. But the basics (smtp, imap, web) are working reasonably well, so for now I'm happy enough with this that I'm going to watch some TV now.
Friday, March 02, 2007
chef bit the dust
While copying data off chef, OpenBSD panicked in the file system code and gave me a "map corrupted" error. That's not good I guess...
I got the family web site and my mail off in time, but I don't have high hopes for the rest of the data. Chef is currently undergoing another one of those wonderful 4 hourlong parity rewrite sessions.
In the meantime, I'm rebuilding all the needed functionality on the new chef.
I got the family web site and my mail off in time, but I don't have high hopes for the rest of the data. Chef is currently undergoing another one of those wonderful 4 hourlong parity rewrite sessions.
In the meantime, I'm rebuilding all the needed functionality on the new chef.
Wednesday, February 28, 2007
Rebuilding Chef
Chef is old and needs a rebuild, and it's raid volume has issues. I chose to rebuild Chef with Debian stable. Chef is a server and as such I don't want much updates for it. Since it's no longer doubling as my firewall, I'm more comfortable with this as well. I trust Linux software raid more than RaidFrame.
tasks:
postfix - DONE
spamassassin (spamd.conf) - DONE, looks good
apache2 (tested, data transfered) - DONE
dovecot (installed, configured) - DONE
apcupsd (not started)
mrtg (installed, unconfigured)
nagios (not started)
snmpd (installe, configured, running) - DONE
smbd/nmbd - DONE
nfs exports - DONE
raid (one half of mirror installed until I migrate mythtv to 500GB)
webalizer (not started)
sensors (started, missing drivers)
tasks:
postfix - DONE
spamassassin (spamd.conf) - DONE, looks good
apache2 (tested, data transfered) - DONE
dovecot (installed, configured) - DONE
apcupsd (not started)
mrtg (installed, unconfigured)
nagios (not started)
snmpd (installe, configured, running) - DONE
smbd/nmbd - DONE
nfs exports - DONE
raid (one half of mirror installed until I migrate mythtv to 500GB)
webalizer (not started)
sensors (started, missing drivers)
Saturday, February 24, 2007
Bad jpegs
In the last few months when we browse photos on babybaer which mounts a volume from chef over NFS, we occasionally get odd effects that appear to be errors in the jpeg encoding, as if a small piece of data is missing, resulting in a color offset in a part of the image and slightly offset image after the error. Like this:

chef has been logging an error "nfsd send error 55" for the longest time, with no apparent ill effects. Is this maybe related and we only noticed it now? Are things getting worse?
A Google search revealed no answers to where the error on chef is coming from in the first place. It means out of buffer space, but I couldn't find any hints *why* that might be happening.
All I could find are complaints from other people that run Linux clients against OpenBSD servers, about that error filling up the logs. It also appears to happen on NetBSD, which would make sense, given how much code is shared between NetBSD and OpenBSD. Increasing NMBCLUSTERS might help a bit, but no definitive solution. Turning off CBQ might help, but I don't run CBQ (or any firewalling) on chef anymore. Someone suggested bad interaction with cheapo RealTek cards (hey, look at that chef is using a RealTek card). I switched to another interface (dc0), let's see if it makes a difference. Of course, I have no way of knowing for sure any time soon, since the error happens only when browsing 100's of jpegs over NFS.
Update:
I took a look at the timestamps of the nfsd error 55 messages and noticed they don't line up with when we see bad images. Today there was only one error logged this morning, but Patricia got a couple bad images this afternoon. Lovely. This doesn't help.
Update:
At this time I'm not even sure how to quantify the problem. Let's see if this is an issue with Linux NFS to OpenBSD, or something else. Let's generate a md5sum list of a large body of data (my jpegs) straight from disk on chef and via NFS on babybaer.
Update:
This is really easy in Linux:
find . | grep -i jpg$ | xargs -iD md5sum "D" > md5-linux
And really weird in OpenBSD (mostly because the output of md5 is so convoluted):
find . | grep -i jpg$ | xargs -iD md5 "D" | awk -F '[)(=]' '{print $4 $3 $2}' > md5-openbsd
awk seems to be doing some fancy buffering (?) when piping output to another program (like sed) or just a file. I just don't get any output whatsoever. Hmmm.
...
oh great, while experimenting with that, chef decided to say Goodbye and hung itself. No reaction on console. Just hangs. That sucks.
Ctrl-Alt-Esc doesn't work. But Shift-PgUp/PgDn does. Surprise. The box is not on the network, not echoing characters. *sigh* Looks like another power cycle. Bah.
Update:
Rebooted chef last night. I reproduced the jpeg problem again this afternoon on two images, so it's not a RealTek nic driver issue. There are no logs on chef indicating an error, nor on babybaer. It looks like random data corruption, but that doesn't make sense. ... Wait. There is a smart raw read error on chef, followed by ecc_hardware corrected. Could this be related? Rebooting Babybaer to rule out impact of local file system cache.
Update:
Nope. The root of the problem is on chef. I reproduced bad jpeg copies by simply cp'ing a directory of jpegs and running md5sum on the files. One recent directory (02-25) seems to be particularly suspectible to this problem. Of 8 files I copied in several attempts up to 7 had different md5sums. I hexdumped a few files and the differences are always on 4kbyte page boundaries (4kByte, 12kByte).
That seems to indicate either a file system problem (but the filesystem checks clean), or a RAIDframe volume problem, maybe due to issues with the underlying disk sectors (possible), a memory problem (but then I would expect to see more random failures), or a CPU problem (ditto).
I'm still uncomfortable with the raw read error/ecc corrected counters reported by smartd.
chef has been logging an error "nfsd send error 55" for the longest time, with no apparent ill effects. Is this maybe related and we only noticed it now? Are things getting worse?
A Google search revealed no answers to where the error on chef is coming from in the first place. It means out of buffer space, but I couldn't find any hints *why* that might be happening.
All I could find are complaints from other people that run Linux clients against OpenBSD servers, about that error filling up the logs. It also appears to happen on NetBSD, which would make sense, given how much code is shared between NetBSD and OpenBSD. Increasing NMBCLUSTERS might help a bit, but no definitive solution. Turning off CBQ might help, but I don't run CBQ (or any firewalling) on chef anymore. Someone suggested bad interaction with cheapo RealTek cards (hey, look at that chef is using a RealTek card). I switched to another interface (dc0), let's see if it makes a difference. Of course, I have no way of knowing for sure any time soon, since the error happens only when browsing 100's of jpegs over NFS.
Update:
I took a look at the timestamps of the nfsd error 55 messages and noticed they don't line up with when we see bad images. Today there was only one error logged this morning, but Patricia got a couple bad images this afternoon. Lovely. This doesn't help.
Update:
At this time I'm not even sure how to quantify the problem. Let's see if this is an issue with Linux NFS to OpenBSD, or something else. Let's generate a md5sum list of a large body of data (my jpegs) straight from disk on chef and via NFS on babybaer.
Update:
This is really easy in Linux:
find . | grep -i jpg$ | xargs -iD md5sum "D" > md5-linux
And really weird in OpenBSD (mostly because the output of md5 is so convoluted):
find . | grep -i jpg$ | xargs -iD md5 "D" | awk -F '[)(=]' '{print $4 $3 $2}' > md5-openbsd
awk seems to be doing some fancy buffering (?) when piping output to another program (like sed) or just a file. I just don't get any output whatsoever. Hmmm.
...
oh great, while experimenting with that, chef decided to say Goodbye and hung itself. No reaction on console. Just hangs. That sucks.
Ctrl-Alt-Esc doesn't work. But Shift-PgUp/PgDn does. Surprise. The box is not on the network, not echoing characters. *sigh* Looks like another power cycle. Bah.
Update:
Rebooted chef last night. I reproduced the jpeg problem again this afternoon on two images, so it's not a RealTek nic driver issue. There are no logs on chef indicating an error, nor on babybaer. It looks like random data corruption, but that doesn't make sense. ... Wait. There is a smart raw read error on chef, followed by ecc_hardware corrected. Could this be related? Rebooting Babybaer to rule out impact of local file system cache.
Update:
Nope. The root of the problem is on chef. I reproduced bad jpeg copies by simply cp'ing a directory of jpegs and running md5sum on the files. One recent directory (02-25) seems to be particularly suspectible to this problem. Of 8 files I copied in several attempts up to 7 had different md5sums. I hexdumped a few files and the differences are always on 4kbyte page boundaries (4kByte, 12kByte).
That seems to indicate either a file system problem (but the filesystem checks clean), or a RAIDframe volume problem, maybe due to issues with the underlying disk sectors (possible), a memory problem (but then I would expect to see more random failures), or a CPU problem (ditto).
I'm still uncomfortable with the raw read error/ecc corrected counters reported by smartd.
Friday, February 23, 2007
Hillary Clinton
So, I just attended an event with Hillary Clinton. Interesting. When I walked over to the building, the motorcade was already parked outside. Police, large SUVs, quiet men in black jackets, just like in the movies. When I got inside it was *packed*. I actually got lucky and managed to get in before they closed the the doors due to overcrowding. The announcement of one of the VC technicians to keep the aisles clear and there is overflow room in one of the adjoining tech talk areas didn't convince many people to leave. We just squeezed togehther a bit more...
There were easily over a thousand people in the room.
I didn't expect Clinton to have the views she presented today on the environment and energy. As with so many polititians she's extremely convincing when in the same room and on stage. She doesn't sound fake, rather genuinely interested in making things happen.
Changing the energy policy to promote clean, green technologies, pulling all levels of government together, from federal to state down to the local level to move in the same direction: 10 years from now, she wants the country be well on the way to energy independence from fossil fuels without wrecking the economy along the way. Interestingly, she used California as the prime example what to do. While the per-capita use of energy has increased by 50% in other parts of the US, it has stayed flat in California. She attributes that to California's insistence on sticking with their state-wide incentive programs and pollution limits when the Reagan administration was dismantling whatever such programs existed on the federal level in the early 80's.
She told a nice story about how she vividly remembers after the Russians shot Sputnik into space, all Americans pulled together to create something amazing, the space program, which grew into DARPA, one of the sponsors of the Internet. Her teacher told the students, "kids the president wants you to study math and sience". She believed at the time Eisenhower actually called her teacher to tell them that. Kinda cute story. She used that as a starting point to talk about how she wants Americans to pull together and rid America from its dependence on fossil fuels, move to clean, green energy, bio-fuels, and fight global warming. She's crossing her fingers for Al Gore that he wins the Oscar for "An Inconvenient Truth". This was a great section of the talk. She came accross very strong and believable.
When asked about the mess in Iraq, she called it "the height of irresponsibility" that President Bush might leave the Iraq war to his successor to sort out. "This is his war. He needs to clean it up. But if he continues to go the way he's going, I don't expect him to." She strongly advocates pulling troops out of the sectarian civil war that is now engulfing the country, and setting up a regional conference involving all neighbors, including Syria and Iran, to make sure they do their part to stabilize the country. She has a very active role in the senate to reign in Bush's war and "force him to do the right thing. To at least send in troops with all the supplies and material they need to be able to fight this war".
One interesting remark was about how silly it is not to talk to your enemies. Throughout the cold war, both republican and democratic presidents talked to the Russians, to learn, to get intelligence and to understand. "you don't make peace with your friends, you don't have to. In order to make peace you have to talk to the people with different views, with ideas that are the exact opposite of yours."
By the way, it will be interesting to see how she's going to pull people to her side who claim she is unelectable next year. She went through pains to paint herself as an inclusive person, that brings people together, using her home state New York (with a blue New York city, and a very red upstate New York) as example. I'd be curious to know how much of the 68% of New Yorkers that reelecred her last year, actually live in upstate New York.
Clinton made several remarks about universal health-care and how electronic record keeping can lower the costs substantially. I'm a little ambivalent about this, seeing how easy it is to abuse that kind of data and how often backup tapes get lost, laptops stolen, and knowing how many providers and companies allow confidential employee or patient data to travel around on standard laptops in the open. Extending electronic record keeping to local doctors who definitely don't have the resources locally to do a job right, that even banks screw up occasionally, makes me shiver. Her presentation on this topic was a bit ... thin.
The general idea of moving away from the company sponsored health plan system, towards something that many european countries have already developed, sounds like a good idea to me, though.
Finally, she was talking about how important education is. How education starts with the parents. In the family. Then extends out to schools. I'm a big believer in getting parents involved in school. If you know what's going on and are aware, it's much easier to help your children to be successful. Clinton's specific ideas on this topic (while it appears close to her heart) didn't excite me, though. "Make school hours more flexible, because they are inconvenient for working parents. Give kids online access to advanced courses, potentially not offered at their school."
Eh, I don't know, call me old-fashioned, but I think bringing excellent teachers into schools, recognize what they do every day, and paying them a decent salary would go a long way, along with giving them the tools and means to be the most effective. This won't happen overnight even in the most favorable environments, but you have to start somewhere.
Overall, a high-profile politician with charisma, and some decent ideas. Seeing Barack Obama next would be great. Maybe they pull this off some time this year.
There were easily over a thousand people in the room.
I didn't expect Clinton to have the views she presented today on the environment and energy. As with so many polititians she's extremely convincing when in the same room and on stage. She doesn't sound fake, rather genuinely interested in making things happen.
Changing the energy policy to promote clean, green technologies, pulling all levels of government together, from federal to state down to the local level to move in the same direction: 10 years from now, she wants the country be well on the way to energy independence from fossil fuels without wrecking the economy along the way. Interestingly, she used California as the prime example what to do. While the per-capita use of energy has increased by 50% in other parts of the US, it has stayed flat in California. She attributes that to California's insistence on sticking with their state-wide incentive programs and pollution limits when the Reagan administration was dismantling whatever such programs existed on the federal level in the early 80's.
She told a nice story about how she vividly remembers after the Russians shot Sputnik into space, all Americans pulled together to create something amazing, the space program, which grew into DARPA, one of the sponsors of the Internet. Her teacher told the students, "kids the president wants you to study math and sience". She believed at the time Eisenhower actually called her teacher to tell them that. Kinda cute story. She used that as a starting point to talk about how she wants Americans to pull together and rid America from its dependence on fossil fuels, move to clean, green energy, bio-fuels, and fight global warming. She's crossing her fingers for Al Gore that he wins the Oscar for "An Inconvenient Truth". This was a great section of the talk. She came accross very strong and believable.
When asked about the mess in Iraq, she called it "the height of irresponsibility" that President Bush might leave the Iraq war to his successor to sort out. "This is his war. He needs to clean it up. But if he continues to go the way he's going, I don't expect him to." She strongly advocates pulling troops out of the sectarian civil war that is now engulfing the country, and setting up a regional conference involving all neighbors, including Syria and Iran, to make sure they do their part to stabilize the country. She has a very active role in the senate to reign in Bush's war and "force him to do the right thing. To at least send in troops with all the supplies and material they need to be able to fight this war".
One interesting remark was about how silly it is not to talk to your enemies. Throughout the cold war, both republican and democratic presidents talked to the Russians, to learn, to get intelligence and to understand. "you don't make peace with your friends, you don't have to. In order to make peace you have to talk to the people with different views, with ideas that are the exact opposite of yours."
By the way, it will be interesting to see how she's going to pull people to her side who claim she is unelectable next year. She went through pains to paint herself as an inclusive person, that brings people together, using her home state New York (with a blue New York city, and a very red upstate New York) as example. I'd be curious to know how much of the 68% of New Yorkers that reelecred her last year, actually live in upstate New York.
Clinton made several remarks about universal health-care and how electronic record keeping can lower the costs substantially. I'm a little ambivalent about this, seeing how easy it is to abuse that kind of data and how often backup tapes get lost, laptops stolen, and knowing how many providers and companies allow confidential employee or patient data to travel around on standard laptops in the open. Extending electronic record keeping to local doctors who definitely don't have the resources locally to do a job right, that even banks screw up occasionally, makes me shiver. Her presentation on this topic was a bit ... thin.
The general idea of moving away from the company sponsored health plan system, towards something that many european countries have already developed, sounds like a good idea to me, though.
Finally, she was talking about how important education is. How education starts with the parents. In the family. Then extends out to schools. I'm a big believer in getting parents involved in school. If you know what's going on and are aware, it's much easier to help your children to be successful. Clinton's specific ideas on this topic (while it appears close to her heart) didn't excite me, though. "Make school hours more flexible, because they are inconvenient for working parents. Give kids online access to advanced courses, potentially not offered at their school."
Eh, I don't know, call me old-fashioned, but I think bringing excellent teachers into schools, recognize what they do every day, and paying them a decent salary would go a long way, along with giving them the tools and means to be the most effective. This won't happen overnight even in the most favorable environments, but you have to start somewhere.
Overall, a high-profile politician with charisma, and some decent ideas. Seeing Barack Obama next would be great. Maybe they pull this off some time this year.
Saturday, February 10, 2007
more grumpy upgrade notes
issues:
- kernel 2.6.18-3 doesn't boot (neither 686 nor k7 variety) - FIXED
- ivtv not installed, no firmware - FIXED
- database schema upgrade fails - FIXED
- playback works, but no sound - FIXED
- mythvideo doesn't work (no mplayer?) - FIXED
- no scheduled recordings show up, but they are in the database - FIXED
- no automatic login for mythtv - FIXED
- lirc/remote control doesn't work (missing kernel modules)
- wireless doesn't work
- mythgames no games
- no nvidia-settings - FIXED
- no ntpd - FIXED
- no mouse in X
- no mrtg set up
- most myth recordings fail
- no sound in live tv and recordings
kernel issues:
2.6.18-3 only boots with acpi=off on grumpy. worked fine in 2.6.15. wth?
installing ivtv:
use 0.8.2, follow Debian instructions at http://ivtvdriver.org. Use pvr_1.18.21.22254_inf.zip from http://ivtv.writeme.ch/tiki-index.php?page=FirmwareVersions.
Later downloaded pvr_1.18.21.22302_inf.zip and tried that, in order to check out audio problems.
importing old database:
can't update schema version beyond 1156 because of duplicate column cmd_repeat in tabl diseqc_tree. alter table diseqc_tree drop column cmd_repeat
restart mythtv-backend.
FIXED
nvidia-settings:
apt-get install nvidia-settings
but it doesn't seem to do anything useful.
ntpd:
apt-get install ntp-server
FIXED
mythvideo:
apt-get install mplayer win32codecs
FIXED
sound:
plenty of comments in howto, nothing seems to help. probably some silly interaction somewhere.
go back to basics:
- turn off artsd in KDE, turn off all KDE sounds
- test with aplay - works fine
- test with mplayer - works
- mythvideo with mplayer - sound works
- myth playback still has no sound
- after a reboot, audio works properly in myth playback as well. huh, odd.
FIXED
scheduled recordings:
- after upgrade no channel lineups were bound to /dev/video0 and /dev/video1. ran mythtv-setup paged through all pages, corrected as needed. upcoming recordings is populated now, and also shows properly in mythwelcome.
FIXED
lirc:
- complains about missing kernel modules
- module-assistant complains the lirc-modules-source is not properly installed, but dpkg -l lirc-modules-source shows all is good, can't find any lirc modules in /lib/modules tree
still unresolved
automatic login:
I'm using gdm. gdmsetup doesn't get me to log in the mythtv user automatically. Annoying. Here's the config snippet in /etc/X11/gdm/gdm.conf that makes it all work properly:
auto-login FIXED.
wireless:
rebuild ndiswrapper with module-assistant, add configs to /etc/network/interfaces.
manual verification using iwconfig. ifconfig wlan0 up. dhclient wlan0.
interface comes up, but throughput is unbearably slow.
myth recordings fail:
trying to record random shows fails with
2007-02-10 21:33:47.805 Reschedule requested for id 110.
2007-02-10 21:33:51.259 Scheduled 310 items in 3.5 = 0.10 match + 3.35 place
2007-02-10 21:33:51.287 scheduler: Scheduled items: Scheduled 310 items in 3.5 = 0.10 match + 3.35 place
2007-02-10 21:33:51.431 TVRec(2): Changing from None to RecordingOnly
2007-02-10 21:33:51.449 TVRec(2): HW Tuner: 2->2
2007-02-10 21:33:51.525 Channel(/dev/video1): SetInputAndFormat() failed
2007-02-10 21:33:51.526 TVRec(2) Error: Failed to set channel to 3. Reverting to kState_None
2007-02-10 21:33:51.527 TVRec(2): Changing from RecordingOnly to None
2007-02-10 21:33:51.554 Canceled recording (Recorder Failed): Law & Order: Special Victims Unit "Burned": channel 1002 on cardid 2, sourceid 1
2007-02-10 21:33:51.580 scheduler: Canceled recording (Recorder Failed): Law & Order: Special Victims Unit "Burned": channel 1002 on cardid 2, sourceid 1
some random shows are actually recording. *sigh*
[3 hours later]
ok. I give up. I can't solve the following right now:
- jittery video recording (suspect: ivtv 0.8)
- no sound when recording (suspect: ivtv? mixer?)
- intermittent inability to change channels for recording resulting in failed recordings (suspect: mythtv/ivtv api v2 interaction)
Looks like 2.6.18 with ivtv 0.8.2 is just not stable enough, but closed captioning works...
2.6.16/2.6.17 are actively discouraged since there is ongoing integration with ivtv at the time. Which brings me back to ivtv 0.4 and 2.6.15 and I'm running out of time.
To make matters worse, the Seagate replacement disk I bought, threw DMA errors multiple times tonight. I replaced the 300GB Maxtor disk back into Grumpy. At least I thoroughly removed dust from the case.
- kernel 2.6.18-3 doesn't boot (neither 686 nor k7 variety) - FIXED
- ivtv not installed, no firmware - FIXED
- database schema upgrade fails - FIXED
- playback works, but no sound - FIXED
- mythvideo doesn't work (no mplayer?) - FIXED
- no scheduled recordings show up, but they are in the database - FIXED
- no automatic login for mythtv - FIXED
- lirc/remote control doesn't work (missing kernel modules)
- wireless doesn't work
- mythgames no games
- no nvidia-settings - FIXED
- no ntpd - FIXED
- no mouse in X
- no mrtg set up
- most myth recordings fail
- no sound in live tv and recordings
kernel issues:
2.6.18-3 only boots with acpi=off on grumpy. worked fine in 2.6.15. wth?
installing ivtv:
use 0.8.2, follow Debian instructions at http://ivtvdriver.org. Use pvr_1.18.21.22254_inf.zip from http://ivtv.writeme.ch/tiki-index.php?page=FirmwareVersions.
Later downloaded pvr_1.18.21.22302_inf.zip and tried that, in order to check out audio problems.
importing old database:
can't update schema version beyond 1156 because of duplicate column cmd_repeat in tabl diseqc_tree. alter table diseqc_tree drop column cmd_repeat
restart mythtv-backend.
FIXED
nvidia-settings:
apt-get install nvidia-settings
but it doesn't seem to do anything useful.
ntpd:
apt-get install ntp-server
FIXED
mythvideo:
apt-get install mplayer win32codecs
FIXED
sound:
plenty of comments in howto, nothing seems to help. probably some silly interaction somewhere.
go back to basics:
- turn off artsd in KDE, turn off all KDE sounds
- test with aplay - works fine
- test with mplayer - works
- mythvideo with mplayer - sound works
- myth playback still has no sound
- after a reboot, audio works properly in myth playback as well. huh, odd.
FIXED
scheduled recordings:
- after upgrade no channel lineups were bound to /dev/video0 and /dev/video1. ran mythtv-setup paged through all pages, corrected as needed. upcoming recordings is populated now, and also shows properly in mythwelcome.
FIXED
lirc:
- complains about missing kernel modules
- module-assistant complains the lirc-modules-source is not properly installed, but dpkg -l lirc-modules-source shows all is good, can't find any lirc modules in /lib/modules tree
still unresolved
automatic login:
I'm using gdm. gdmsetup doesn't get me to log in the mythtv user automatically. Annoying. Here's the config snippet in /etc/X11/gdm/gdm.conf that makes it all work properly:
[daemon]
AutomaticLoginEnable=true
AutomaticLogin=mythtv
TimedLoginEnable=true
TimedLogin=mythtv
TimedLoginDelay=5
LocalNoPasswordUsers=mythtv
auto-login FIXED.
wireless:
rebuild ndiswrapper with module-assistant, add configs to /etc/network/interfaces.
manual verification using iwconfig. ifconfig wlan0 up. dhclient wlan0.
interface comes up, but throughput is unbearably slow.
myth recordings fail:
trying to record random shows fails with
2007-02-10 21:33:47.805 Reschedule requested for id 110.
2007-02-10 21:33:51.259 Scheduled 310 items in 3.5 = 0.10 match + 3.35 place
2007-02-10 21:33:51.287 scheduler: Scheduled items: Scheduled 310 items in 3.5 = 0.10 match + 3.35 place
2007-02-10 21:33:51.431 TVRec(2): Changing from None to RecordingOnly
2007-02-10 21:33:51.449 TVRec(2): HW Tuner: 2->2
2007-02-10 21:33:51.525 Channel(/dev/video1): SetInputAndFormat() failed
2007-02-10 21:33:51.526 TVRec(2) Error: Failed to set channel to 3. Reverting to kState_None
2007-02-10 21:33:51.527 TVRec(2): Changing from RecordingOnly to None
2007-02-10 21:33:51.554 Canceled recording (Recorder Failed): Law & Order: Special Victims Unit "Burned": channel 1002 on cardid 2, sourceid 1
2007-02-10 21:33:51.580 scheduler: Canceled recording (Recorder Failed): Law & Order: Special Victims Unit "Burned": channel 1002 on cardid 2, sourceid 1
some random shows are actually recording. *sigh*
[3 hours later]
ok. I give up. I can't solve the following right now:
- jittery video recording (suspect: ivtv 0.8)
- no sound when recording (suspect: ivtv? mixer?)
- intermittent inability to change channels for recording resulting in failed recordings (suspect: mythtv/ivtv api v2 interaction)
Looks like 2.6.18 with ivtv 0.8.2 is just not stable enough, but closed captioning works...
2.6.16/2.6.17 are actively discouraged since there is ongoing integration with ivtv at the time. Which brings me back to ivtv 0.4 and 2.6.15 and I'm running out of time.
To make matters worse, the Seagate replacement disk I bought, threw DMA errors multiple times tonight. I replaced the 300GB Maxtor disk back into Grumpy. At least I thoroughly removed dust from the case.
Tuesday, February 06, 2007
Bootstrapping Grumpy
The 300GB Maxtor disk in Grumpy is giving me grief. Has trouble booting, very slow performance. Most certainly a case for the warranty department.
I'm concerned Grumpy won't boot anymore when I cycle power, and I certainly don't feel like loosing my MythTV recordings...
I'm re-building Grumpy from the ground up on a new harddrive. I hope my notes from the last year in this blog will be useful.
I started out with the Debian netboot install. Sarge netboot.tar.gz unpacked into chef:/tftpboot, add new host entry in gw:/etc/dhcpd.conf with next-server 192.168.200.10. Works like a charm. In order to get a picture after booting on this VIA M10000 board, I need to pass the vga option to the kernel.
I want to leave the option open of adding another hard drive later and build a RAID1 from the video and movie files. In the Debian installer I manually reconfigured the partitions to use (ext3, swap, RAID), then configured RAID1 with only one member partition. I'm not using LVM here, this is a very straightforward setup. The large partition will be used for video and movie files, the root partition will hold everything else.
And again, I'm impressed by the ease of this network-based installation. Debian rocks.
First thing after the installation and completing base-config, I switch APT's sources to testing, so that I get a recent kernel (in this case I'm going to 2.6.18-3).
surprise: A base Debian install has no ssh...
On to rescuing media files... oha, I forgot how much data 300GB is. This will take a while.
I'm concerned Grumpy won't boot anymore when I cycle power, and I certainly don't feel like loosing my MythTV recordings...
I'm re-building Grumpy from the ground up on a new harddrive. I hope my notes from the last year in this blog will be useful.
I started out with the Debian netboot install. Sarge netboot.tar.gz unpacked into chef:/tftpboot, add new host entry in gw:/etc/dhcpd.conf with next-server 192.168.200.10. Works like a charm. In order to get a picture after booting on this VIA M10000 board, I need to pass the vga option to the kernel.
I want to leave the option open of adding another hard drive later and build a RAID1 from the video and movie files. In the Debian installer I manually reconfigured the partitions to use (ext3, swap, RAID), then configured RAID1 with only one member partition. I'm not using LVM here, this is a very straightforward setup. The large partition will be used for video and movie files, the root partition will hold everything else.
And again, I'm impressed by the ease of this network-based installation. Debian rocks.
First thing after the installation and completing base-config, I switch APT's sources to testing, so that I get a recent kernel (in this case I'm going to 2.6.18-3).
surprise: A base Debian install has no ssh...
On to rescuing media files... oha, I forgot how much data 300GB is. This will take a while.
Saturday, February 03, 2007
Automatic wakeup for Grumpy
This had me puzzled for the longest time (see my musings from last summer).
Today I decided not only to finally run some backups of Chef, but also to make Grumpy (my MythTV box) shut down after it's done recording. I stumbled over mythwelcome a very slick new feature in MythTV 0.19. It's a welcome screen for mythfrontend (similar to what I wanted to write), and additionally has a few additional features (like automatically turn on the system during some specified period, e.g. in the evening when I'm most likely to watch TV).
A few months ago I collected all the necessary data for nvram-wakeup to set the NVRAM alaram in the BIOS. I got mythwelcome configured just fine following the instructions in the Wiki. It seems to work, but I still don't like messing with the nvram directly. Finally, I saw some notes in the ACPI_Wakeup section of the Wiki about how "some finicky BIOSes reset the RTC alarm when the time gets written". Guess what, every Linux distribution syncs the system time to the hardware clock on shutdown. I have a finicky BIOS!
As susggested in the Wiki, I modified /etc/init.d/hwclock.sh to on shutdown read out /proc/acpi/alarm, save the system time, then write back the alarm time. Lo and behold it worked on the first try.
Here are my final configuration settings for this:
I'm using mythwelcome and have it configured to call /usr/local/bin/myth-set-acpi-wakeup in the nvram-wakeup command line:
The nvram-wakeup command is set to myth-grub-poweroff:
which triggers grub config 4 in my menu.lst on the next boot:
reboot and poweroff commands are set to
/sbin/reboot and /sbin/poweroff, respectively
Shutdown/Wakeup options in mythtv-setup are configured as follows:
Block shutdown before client is connected is checked.
Idle timeout: 60s
Max. wait for recording: 30m (I'm recording several shows that are 30 minutes apart. No point to shut down in between)
Startup before rec: 180s
Wakeup time format: yyyy-MM-ddThh:mm:ss
Set wakeuptime command: mythshutdown --setwakeup $time
Server halt command: sudo mythshutdown --shutdown
Pre-shutdown check command: mythshutdown --check
Today I decided not only to finally run some backups of Chef, but also to make Grumpy (my MythTV box) shut down after it's done recording. I stumbled over mythwelcome a very slick new feature in MythTV 0.19. It's a welcome screen for mythfrontend (similar to what I wanted to write), and additionally has a few additional features (like automatically turn on the system during some specified period, e.g. in the evening when I'm most likely to watch TV).
A few months ago I collected all the necessary data for nvram-wakeup to set the NVRAM alaram in the BIOS. I got mythwelcome configured just fine following the instructions in the Wiki. It seems to work, but I still don't like messing with the nvram directly. Finally, I saw some notes in the ACPI_Wakeup section of the Wiki about how "some finicky BIOSes reset the RTC alarm when the time gets written". Guess what, every Linux distribution syncs the system time to the hardware clock on shutdown. I have a finicky BIOS!
As susggested in the Wiki, I modified /etc/init.d/hwclock.sh to on shutdown read out /proc/acpi/alarm, save the system time, then write back the alarm time. Lo and behold it worked on the first try.
Here are my final configuration settings for this:
I'm using mythwelcome and have it configured to call /usr/local/bin/myth-set-acpi-wakeup in the nvram-wakeup command line:
#!/bin/bash
# set wakeup time via ACPI alarm
#
logger "wakeup: got command line $0 $1 $2 $3 $4 $5 $6"
if [ -z "$2" ]; then
echo "usage: $0 --settime"
echo "must be in seconds since epoch"
logger "no wakeup time given"
exit 1
fi
# This is a crazy hack
# The problem is that mythwelcome is passing us the timestamp
# in localtime not adjusted for UTC, but date is using the
# base of UTC, so we need to adjust back to PST.
# TODO(bbeck): Daylight savings time is probably going to bite me on this, I should set
# the BIOS clock to UTC.
seconds=$2
utctime=`date -d "1970-01-01 $seconds sec" +"%Y-%m-%d %T"`
time=`date -d "$utctime -0000" +"%Y-%m-%d %T"`
# end of hack
logger "setting wakeup time to $time."
echo "$time" > /proc/acpi/alarm
result=`cat /proc/acpi/alarm`
if [ "$time" == "$result" ]; then
logger "wakeup time set properly"
else
logger "wakeup time not set (got $result)"
fi
The nvram-wakeup command is set to myth-grub-poweroff:
#!/bin/sh
echo "savedefault --default=4 --once" | grub
which triggers grub config 4 in my menu.lst on the next boot:
title PowerOff
savedefault --default=0
cat /boot/grub/default
halt
reboot and poweroff commands are set to
/sbin/reboot and /sbin/poweroff, respectively
Shutdown/Wakeup options in mythtv-setup are configured as follows:
Block shutdown before client is connected is checked.
Idle timeout: 60s
Max. wait for recording: 30m (I'm recording several shows that are 30 minutes apart. No point to shut down in between)
Startup before rec: 180s
Wakeup time format: yyyy-MM-ddThh:mm:ss
Set wakeuptime command: mythshutdown --setwakeup $time
Server halt command: sudo mythshutdown --shutdown
Pre-shutdown check command: mythshutdown --check
Friday, January 19, 2007
Automated shutdown on power failure - Trial by fire
I installed apcupsd last year. I tested it through to see that all power states are properly recognized, but never did a full power down test to make sure that the system shuts down when battery power runs low. Today we lost power for over 1 1/2 hours and it worked just perfectly:
Battery started running low after an hour, and apcupsd initiated a clean system shutdown. When the power returned the server rebooted just fine and went merrily on its way. Neat.
Jan 19 07:00:02 chef syslogd: restart
Jan 19 14:11:34 chef apcupsd[26943]: Power failure.
Jan 19 14:11:40 chef apcupsd[26943]: Running on UPS batteries.
Jan 19 15:11:21 chef apcupsd[26943]: Battery charge below low limit.
Jan 19 15:11:21 chef apcupsd[26943]: Initiating system shutdown!
Jan 19 15:11:21 chef apcupsd[26943]: User logins prohibited
Jan 19 15:11:21 chef apcupsd[26943]: Attempting to kill the UPS power!
Jan 19 15:11:24 chef syslogd: exiting on signal 15
Jan 19 15:34:48 chef syslogd: restart
Jan 19 15:34:48 chef /bsd: OpenBSD 3.8-stable (RAID) #1: Thu Apr 20 21:55:59 PDT 2006
Jan 19 15:34:48 chef /bsd: root@chef.lostentry.org:/usr/src/sys/arch/i386/compile/RAID
Battery started running low after an hour, and apcupsd initiated a clean system shutdown. When the power returned the server rebooted just fine and went merrily on its way. Neat.
Wednesday, January 03, 2007
Monday, December 25, 2006
Friday, December 15, 2006
Rain, Wind, Storm ... No Power
I'm in Seattle this week. The rain comes and goes as usual for this time of the year.
Yesterday afternoon a major storm hit the Northwest. At 5pm we decided to shut down the servers and network in the office, since we had ongoing brownouts and briefly lost power. Outside, the wind was howling around the building, the rain blowing accross the street horizontally. Windows were rattling. Lake Washington had a good surf going, you could see it even from the office. Most of the employees went home.
We took off to drive to a co-worker's house in Bellevue. The office parking lot was flooded, the garage was flooded, and the street gutters were full of water. The normally 15 minute drive to Bellevue took us over an hour on the side-streets. Multiple stop lights were out and cars waiting their turn all over the place. Very orderly though, I must say. Once we got there we had good food and lots of fun. I tried playing Tennis on the Wii as well as a few other games.
Here's a picture of a flodded garage. It's hard to see, but water depth was about 1 foot.
11:30pm
I got back to the apartment with light rain and a decent amount of wind. I planned to be in the office early to bring up the infrastructure back up once the storm has blown over. It was supposed to peak at 2am.
5:00am
Well, yeah... I got a call from the local helpdesk manager not to bother. I notice the power is out in my apartment. "The power is out in 90% of western Washington." Oh... Well then, I'm going back to sleep now.
6:00am
"The office building is dead. 3 feet of water in the lower level of the garage" Guess it's unlikely I'm going to work today. I'll see when and where I can find some coffee and breakfast. In an hour I'll call Patricia to find out what's going on at Sea-Tac, and if my flight this afternoon is still on.
8:00am
Power still out. I take a shower in the dark bathroom. The water is lukewarm. I consider myself lucky. After some consideration and looking out of the window, I decide to pack my stuff and get it down to the car. No point hanging out in the apartment with no power or heat. I want some coffee.
The trip down the pitchblack stairwell with no windows was ... interesting. Good thing the display of my cell phone is this bright.
9:00am
Still no power. I stopped by the office to found the building locked with a couple employees outside chatting. The lower level of the garage is still flooded. They are pumping the water out, only making slow progress. I don't envy the owners of the few cars left in there.
The guy stocking our mini-kitchens left some danish and cranberry cake outside the lobby doors. Good. Still craving a coffee. It starts raining again. "All the power is out in the city of Kirkland", a police officer who was checking on one of the local banks tells me. Bellevue may have power, I'm told, so I decide to make my way down I-405 towards the airport.
The floating bridge accross Lake Washington is still closed. They closed it last night before the brunt of the storm came in, since it's unsafe to cross with heavy winds. Which means all the traffic headed to Seattle has to go down to I-90 and across Mercer Island. I'm in the middle of that traffic. Crap.
10:30am
I tried taking side-streets looking for some coffee place and to bypass the mess on I-405. Success for the latter, but still no coffee. Eventually I get south of I-90, make it via Factoria and Coalcreek Parkway back to I-405 and out to the airport.
11:30am
I got to the airport early enough to catch an earlier flight back to San Jose. Phew. Looking forward to see Patricia and the kids.
Lessons learned:
Sunday, December 17th:
Power was restored to the office this morning. As I'm writing this there are still over 200,000 people without power in western Washington. Down from over a million Friday morning. I'm just reminded again how much we depend on and are used to the conveniences of modern live. Electricity, clean water, garbage pickup. This was a weather event, people could prepare at least a little bit. However, I'm living in earthquake country. Those things happen without warning. We better get our earthquake kit back together (we had to throw everything out after a rat hit the jackpot and got into the storage box...).
Yesterday afternoon a major storm hit the Northwest. At 5pm we decided to shut down the servers and network in the office, since we had ongoing brownouts and briefly lost power. Outside, the wind was howling around the building, the rain blowing accross the street horizontally. Windows were rattling. Lake Washington had a good surf going, you could see it even from the office. Most of the employees went home.
We took off to drive to a co-worker's house in Bellevue. The office parking lot was flooded, the garage was flooded, and the street gutters were full of water. The normally 15 minute drive to Bellevue took us over an hour on the side-streets. Multiple stop lights were out and cars waiting their turn all over the place. Very orderly though, I must say. Once we got there we had good food and lots of fun. I tried playing Tennis on the Wii as well as a few other games.
11:30pm
I got back to the apartment with light rain and a decent amount of wind. I planned to be in the office early to bring up the infrastructure back up once the storm has blown over. It was supposed to peak at 2am.
5:00am
Well, yeah... I got a call from the local helpdesk manager not to bother. I notice the power is out in my apartment. "The power is out in 90% of western Washington." Oh... Well then, I'm going back to sleep now.
6:00am
"The office building is dead. 3 feet of water in the lower level of the garage" Guess it's unlikely I'm going to work today. I'll see when and where I can find some coffee and breakfast. In an hour I'll call Patricia to find out what's going on at Sea-Tac, and if my flight this afternoon is still on.
8:00am
Power still out. I take a shower in the dark bathroom. The water is lukewarm. I consider myself lucky. After some consideration and looking out of the window, I decide to pack my stuff and get it down to the car. No point hanging out in the apartment with no power or heat. I want some coffee.
The trip down the pitchblack stairwell with no windows was ... interesting. Good thing the display of my cell phone is this bright.
9:00am
Still no power. I stopped by the office to found the building locked with a couple employees outside chatting. The lower level of the garage is still flooded. They are pumping the water out, only making slow progress. I don't envy the owners of the few cars left in there.
The guy stocking our mini-kitchens left some danish and cranberry cake outside the lobby doors. Good. Still craving a coffee. It starts raining again. "All the power is out in the city of Kirkland", a police officer who was checking on one of the local banks tells me. Bellevue may have power, I'm told, so I decide to make my way down I-405 towards the airport.
The floating bridge accross Lake Washington is still closed. They closed it last night before the brunt of the storm came in, since it's unsafe to cross with heavy winds. Which means all the traffic headed to Seattle has to go down to I-90 and across Mercer Island. I'm in the middle of that traffic. Crap.
10:30am
I tried taking side-streets looking for some coffee place and to bypass the mess on I-405. Success for the latter, but still no coffee. Eventually I get south of I-90, make it via Factoria and Coalcreek Parkway back to I-405 and out to the airport.
11:30am
I got to the airport early enough to catch an earlier flight back to San Jose. Phew. Looking forward to see Patricia and the kids.
Lessons learned:
- Don't expect to be able to get back into the office building the next morning. Take the stuff you might need.
- Carry a flashlight. I'll get one of those little keychain lights. Way better than nothing.
- Listen to the news and traffic reports. Find one of those AM news channels. I got a pretty good picture on what's going on. They advised to avoid I-405 between Bellevue and I-90. I should have taken I-405 north to I-5 and on to the airport through Seattle.
- Always carry some cash. Most ATMs and credit card pay stations don't work without utility power.
Sunday, December 17th:
Power was restored to the office this morning. As I'm writing this there are still over 200,000 people without power in western Washington. Down from over a million Friday morning. I'm just reminded again how much we depend on and are used to the conveniences of modern live. Electricity, clean water, garbage pickup. This was a weather event, people could prepare at least a little bit. However, I'm living in earthquake country. Those things happen without warning. We better get our earthquake kit back together (we had to throw everything out after a rat hit the jackpot and got into the storage box...).
Friday, December 08, 2006
Lucky snapshot
Saturday, December 02, 2006
Subscribe to:
Posts (Atom)