Posts

Showing posts from June, 2009

ssh config file

alias hosts and specify options so don't have to prepend username like user@host. Can use * as wildcard in hostname Host prod User troy Port 22 HostName somehost.com ForwardX11 yes Compression yes

nawk

Created to parse HAProxy log for graphing grep'd out the page requests of interest, then parsed the file to graph in Open Office awk '{fu=gsub("/"," ",$9); print substr($1,6)" "$2" "$3" "$9" "$14" "$15" "substr($17,2)" "$18}' someTextFile.txt fu=gsub("/"," ",$9) turns "3/4/5/6/7" into "3 4 5 6 7"

Configuring USB support for VirtualBox under Ubuntu 8.10 Intrepid Ibis

You have to use the right version of VirtualBox to get USB support, NOT open-source edition (OSE) listed in Synaptic package manager, follow this post Follow this HOWTO to enable USB support

Extract private key from Java Keystore .jks and convert to PEM for OpenSSL

Certificates, file format, conversion Keytool to OpenSSL conversion tips HowTo export private key from keystore

System.nanoTime() returns sporadic values on multi-processor Solaris on VMWare

Consecutive calls to System.nanoTime() return sporadic differences that are zero, negative, large/huge, and stuck/hung/frozen/not changing for long periods on multi-processor Solaris x86 on/under VMWare. This has not been reproduced on non-VMWare multi-processor systems and single-processor VMWare systems. A trouble ticket was opened with VMWare and they indicated the %RDY was too high at 50 - 100% instead of 5%. They also recommend single-processor VMs vs. multi-processor VMs. The bottom line is that if the code does not run deterministically. Yes nanoTime issues cause real errors Dual processor Fedora 11 on VMWare does not exhibit zero, negative, or stuck nano times, so this appears to be a Solaris on VMWare issue. So as it turns out the VMWare instance created for windows was reloaded with both Fedora 11 and Solaris 5.10 and none of them exhibited the issue. So it seems that the VM image defaults for Windows vs. Solaris may be the issue. Dual processor Windows Server 2008 with Java

Setting up Stunnel for HAProxy SSL support

Stunnel requires OpenSSL Solaris 10 already has OpenSSL, so skip the following part: Download OpenSSL source here $ cd /usr/local/util $ wget ftp://ftp.sunfreeware.com/pub/freeware/intel/10/openssl-0.9.8k-sol10-x86-local.gz $ gunzip openssl-0.9.8k-sol10-x86-local.gz $ pkgadd -d openssl-0.9.8k-sol10-x86-local $ rm openssl-0.9.8k-sol10-x86-local If building from source: OpenSSL requires Perl 5 $ perl -version This is perl, v5.8.4 built for i86pc-solaris-64int ... Build and install OpenSSL as follows: $ ./config $ make $ make test $ make install OpenSSL installs in /usr/local/ssl by default. Get Stunnel source here The Stunnel version needs to be one that there is an HAProxy x-forwarded-for patch for, i.e., 4.22 $ cd /usr/local/util $ wget http://www.stunnel.org/download/stunnel/src/stunnel-4.22.tar.gz $ gunzip stunnel-4.22.tar.gz $ tar -xvf stunnel-4.22.tar $ rm stunnel-4.22.tar Download appropriate Stunnel x-forwarded-for source IP patch from HAProxy site $ wget http://hap

Quartz EE SE open-source Job Scheduler

Home Runs as stand-alone or in EE server. Quartz is included in JBoss. Supports cron type syntax, and is customizable. Has JMX bean to list scheduled events and when they will trigger.

Backup solutions

TimeVault like Apple TimeMachine rdiff-backup amanda flyback tar

Oracle on Windows vs. *nix port redirect issue

Oracle on Windows by default redirects connections to another port which does not occur by default on *nix. Oracle connection manager does not do this by default.

Scheduling/timing errors under Solaris on AMD, not Intel

System.nanoTime() returns large value and doesn't increase or increases sporadically.

Package by Feature not by Layer

Directory structure by feature is preferred over by layer.

Loading new JAXB in old JRE

HOWTO load new JAXB in an older JRE