It happened

My wife Kelsey had a giant baby boy — 10 pounds 12 ounces, 23 inches long. I’m having a blast with my son. Harmon.  Details are at our joint blog http://kelseyandaaron.blogspot.com/

Advertisements

About to be a dad

I’m skipping work today.  Kelsey started having contractions at 11:45 last night.  They have progressed steadily and it will probably be any time, though they’re still relatively mild, they’re getting closer together.  We’ll go to the midwife when the contractions are 5 minutes apart and 1 minute long.

I’m installing Ubuntu on a desktop and working on getting an email server working for herculeangrp.org to fill the time — but I don’t think I’ve mentioned that yet.  I probably won’t get any of that done.

We’re having second breakfast now (hashbrown patties and juice.)  Kelsey said she’s going to make cookies, but I think we might run out of time before then.  We just need to occupy our time until she’s ready.  We’ll go for a walk later, and the ribs are thawing.

The baby’s officially 2 weeks late by Kelsey’s reckoning, but only 8 days over by my guess.  The doctor & ultrasound technician who inspected her yesterday estimated his weight at 9 1/2 pounds and head size at 10 cm.  That’s a pretty big baby.  Everything looked healthy, though.

It’s a pretty overwhelming thought that I’m about to be a dad.  I don’t know if I’ve ever given it that much real consideration (except over the last 9 months).  How good of a dad will I be?  Will I be able to provide for my family?  Will I be someone they’ll look up to?  Will I be able to teach them to play sports and fix cars, the types of things dad’s are supposed to be good at — which I’m not.

I’m sure Harmon will be a great kid, whatever his parents are like.  He’s got a pretty good mom, anyway.  I expect he’ll be bigger and stronger and smarter than me before I know it.  I can’t wait to take him swimming, and fishing, and sailing.  I can almost see how he’ll watch over his younger brothers and sisters, protecting Samantha, and keeping the younger boys in line.

PHP crashes with these extensions on Windows XP

I’m putting this list here so I can find it again.  I hope people will add to or subtract from it.

I’m using PHP 5.2.5 on Windows XP with Apache 2.2.10 (ssl included).  The only test I’ve done so far on this machine is phpinfo()

Below are the PHP extensions that I had to comment out to get it to work on windows.  All but php_threads give a warning, but php_threads gives none.

php_exif.dll
php_fdf.dll
php_mcrypt.dll
php_mhash.dll
php_mssql.dll
php_mysql.dll
php_mysqli.dll
php_oci8.dll
php_pspell.dll
php_snmp.dll
php_mcrypt_filter.dll
php_netools.dll
php_sam.dll
php_threads.dll

Here’s my full list of extensions from php.ini. Commented out ones have been disabled.

[PHP_BZ2]
extension=php_bz2.dll
[PHP_CURL]
extension=php_curl.dll
[PHP_DBA]
extension=php_dba.dll
[PHP_EXIF]
#extension=php_exif.dll
[PHP_FDF]
#extension=php_fdf.dll
[PHP_GD2]
extension=php_gd2.dll
[PHP_GETTEXT]
extension=php_gettext.dll
[PHP_IMAP]
extension=php_imap.dll
[PHP_LDAP]
extension=php_ldap.dll
[PHP_MBSTRING]
extension=php_mbstring.dll
[PHP_MCRYPT]
#extension=php_mcrypt.dll
[PHP_MHASH]
#extension=php_mhash.dll
[PHP_MIME_MAGIC]
extension=php_mime_magic.dll
[PHP_MING]
extension=php_ming.dll
[PHP_MSSQL]
#extension=php_mssql.dll
[PHP_MYSQL]
#extension=php_mysql.dll
[PHP_MYSQLI]
#extension=php_mysqli.dll
[PHP_OCI8]
#extension=php_oci8.dll
[PHP_OPENSSL]
extension=php_openssl.dll
[PHP_PDO]
extension=php_pdo.dll
[PHP_PGSQL]
extension=php_pgsql.dll
[PHP_PSPELL]
#extension=php_pspell.dll
[PHP_SHMOP]
extension=php_shmop.dll
[PHP_SNMP]
#extension=php_snmp.dll
[PHP_SOAP]
extension=php_soap.dll
[PHP_SOCKETS]
extension=php_sockets.dll
[PHP_SQLITE]
extension=php_sqlite.dll
[PHP_TIDY]
extension=php_tidy.dll
[PHP_XMLRPC]
extension=php_xmlrpc.dll
[PHP_ZIP]
extension=php_zip.dll
[PHP_AMF]
extension=php_amf.dll
[PHP_APD]
extension=php_apd.dll
[PHP_CPDF]
extension=php_cpdf.dll
[PHP_CRACK]
extension=php_crack.dll
[PHP_CVSCLIENT]
extension=php_cvsclient.dll
[PHP_DIO]
extension=php_dio.dll
[PHP_DOCBLOCK]
extension=php_docblock.dll
[PHP_FILEINFO]
extension=php_fileinfo.dll
[PHP_HARU]
extension=php_haru.dll
[PHP_HTSCANNER]
extension=php_htscanner.dll
[PHP_HTTP]
extension=php_http.dll
[PHP_ID3]
extension=php_id3.dll
[PHP_JAVA]
extension=php_java.dll
[PHP_MAILPARSE]
extension=php_mailparse.dll
[PHP_MCRYPT_FILTER]
#extension=php_mcrypt_filter.dll
[PHP_NETOOLS]
#extension=php_netools.dll
[PHP_NTUSER]
extension=php_ntuser.dll
[PHP_OGGVORBIS]
extension=php_oggvorbis.dll
[PHP_OPERATOR]
extension=php_operator.dll
[PHP_PARSEKIT]
extension=php_parsekit.dll
[PHP_PDF]
extension=php_pdf.dll
[PHP_PHAR]
extension=php_phar.dll
[PHP_PHPDOC]
extension=php_phpdoc.dll
[PHP_POP3]
extension=php_pop3.dll
[PHP_RADIUS]
extension=php_radius.dll
[PHP_RUNKIT]
extension=php_runkit.dll
[PHP_SAM]
#extension=php_sam.dll
[PHP_SDO]
extension=php_sdo.dll
[PHP_SMTP]
extension=php_smtp.dll
[PHP_SPL_TYPES]
extension=php_spl_types.dll
[PHP_SSH2]
extension=php_ssh2.dll
[PHP_STATS]
extension=php_stats.dll
[PHP_THREADS]
#extension=php_threads.dll
[PHP_TIMEZONEDB]
extension=php_timezonedb.dll
[PHP_TRANSLIT]
extension=php_translit.dll
[PHP_UPLOADPROGRESS]
extension=php_uploadprogress.dll
[PHP_WIN32PS]
extension=php_win32ps.dll
[PHP_WIN32SCHEDULER]
extension=php_win32scheduler.dll
[PHP_WIN32SERVICE]
extension=php_win32service.dll
[PHP_WIN32STD]
extension=php_win32std.dll
[PHP_ZLIB_FILTER]
extension=php_zlib_filter.dll

installing ZenOSS

I found a great article on installing ZenOss

http://www.installationwiki.org/Installing_Zenoss

It covers RedHat/CentOS, Debian, and source installs. One minor typo I noticed. It has ‘service snmp start’ where it should read ‘service snmpd start’. Also it doesn’t mention you could run ‘chkconfig snmpd on’.

One thing I ran into was a dead PID file from a failed install. I think it had to do with net-snmp-libs not being up to date (another minor omission.) A quick search turned up:

http://www.linuxforums.org/forum/servers/116115-snmpd-dead-but-pid-file-exist.html

Short answer is I had to rip out net-snmp and reinstall.

Still ran into trouble with the RPM install (not prompting?) for things like mysql username/password and port number. You can edit the latter in /opt/zenoss/etc/zope.conf and the former in zenoss/bin/zenoss_init_pre though at that point I just ripped it out and ran zenoss-stack-2.2.4-linux.bin which prompts for the mysql root password and zope port number.

But that hung too!

So I killed it and ran:

/etc/init.d/zenoss-stack start
which complained:

/usr/local/zenoss/mysql/scripts/ctl.sh : mysql (pid 23145) already running

since mysqld was already running

On another VM (CentOS 5.1 on VMWare on Windows instead of CenOS 5.0 on Xen) it started up no problems, however.
The default install is insecure and you should change your mysql, zope, os, and admin logins.

Network monitoring tools

Complex deployments require monitoring.  It starts with a shell script that pings a remote server occasionally.  Then you’ve got “hey I just rebooted” emails added to init.d.  You might write some tests using wget or curl or expect (or even an automation tool like selenium to verify functionality.)  It can get out of hand.

Let’s start off with a list of monitoring tools.  I’m not endorsing anything here, just building a list and hoping for feedback:

  • Nagios – very popular open source network monitoring
  • Zenoss – newer network monitoring tool. uses Zope
  • Hyperic – commerical, free basic version
  • OpenNMS – open source network management platform

Additional tools

  • Lilac Platform – used to configure Nagios
  • Cacti – network graphing, often used with Nagios

SNMP is a standard protocol for checking network status.  Everything from switches to SAN arrays can use SNMP to report their status.  You can wrap JMX beans in SNMP.  And you can write scripts that verify complex functionality and publish SNMP data, and then use your network monitoring tools to check status, send emails and pages, or take whatever action is needed.

Test data Builders

An interesting article about Test data builders

http://nat.truemesh.com/archives/000714.html

Imagine the situation of testing a typical website. You are trying to test PageX, but first you have to create a user and login. But pageX is completely different whether the user is a new visitor, existing member, or an admin. So you need to create all three users. You create three scripts that whip through the registration (or bypassit ) and run your tests. Eventually you decide you want to refactor into a factory so you can do UserFactory.createMemberUser(), etc.

But then you need to test PageX for paying members but not for free members. Complexity is spiraling out of control (okay, maybe not in this simple example, but…) and your Factory is looking more like a maze. If OSHA were to see the plumbing in your factory…

Here’s a potential solution. The Builder model. You can create configuration methods that implement your variations and use only the level of detail you need to construct your test user. You can then do: UserBuilder.createUser() and get a default user, or be very specific: UserBuilder.createUser().withMemberLogin().withPremiumMembership().withCreditCardAutomaticBilling().withBlueEyes(), etc.