web load testing with siege on CentOS 5

Recently I’ve needed to do some heavy load/stress testing of a web service at work. We have an API load test tool, but it’s designed to hit our soap server. I needed to hit a javascript file through our new load-balancer – and hit it hard.

We started with Apache Bench (ab) which worked well enough until we realized that it wasn’t doing ssl. The address uses https protocol. So I did a bit of research and found seige.  It’s an ideal tool for this purpose – easy to use from the command line and also supports a configuration file.

Here’s some basic instructions to get it up and running on CentOS 5:

  • Get the latest version:

$ wget ftp://ftp.joedog.org/pub/siege/siege-latest.tar.gz

  • expand the archive
  • make sure you have the ssl libs installed:

$ sudo yum install mod_ssl openssl

  • cd into the siege directory
  • build and install:

./configure --with-ssl=/usr/bin/openssl
sudo make install

  • confirm:

siege -V

  • Note: the instructions suggest installing the tool in a more obvious place that the default, but I didn’t do that.
  • Now you can copy the sample siegerc to your home directory to change the default options:

$ cp docs/siegerc ~/.siegerc
$ cd ~
$ vim .siegerc

  • The default siegerc file is well documented and easy to configure.
  • Time to run it:

$ siege https://www.[yoursecuresite].???

Here’s an example summary report that you get after the test is done or stopped:
HTTP/1.1 200 0.08 secs: 7914 bytes ==> /index.html

Lifting the server siege... done.
Transactions: 311 hits
Availability: 100.00 %
Elapsed time: 1.13 secs
Data transferred: 2.35 MB
Response time: 0.11 secs
Transaction rate: 275.22 trans/sec
Throughput: 2.08 MB/sec
Concurrency: 30.55
Successful transactions: 311
Failed transactions: 0
Longest transaction: 0.35
Shortest transaction: 0.02

installing wine on Snow Leopard

For the most part Snow Leopard was an almost seamless upgrade from Leopard for me. Whenever there’s a major OS X update, some things take a little while to catch up. So I have some understanding when lower level tools require some extra steps to get working.

Wine took a bit of debugging and googling to figure out. Maybe this will help someone else.


I pretty much followed these instructions, with a little variation at the end: http://davidbaumgold.com/tutorials/wine-mac/ Here’s a summary:

  1. install the Xcode dev tools from the Snow Leopard DVD. These are not installed be default. Make sure you select the X11 tools to be installed
  2. Install or upgrade MacPorts: http://www.macports.org/install.php
  3. Install wine with MacPorts:

>> sudo port install wine-devel +universal

Now that should work. However, I didn’t do it that way. I did it without the ‘+universal’ switch and that’s where my troubles began. If you are now in a place where you’re getting this error:

>>sudo port install wine-devel
---> Computing dependencies for wine-devel
---> Extracting wine-devel
Error: You cannot install wine-devel for the architecture(s) i386
Error: because /opt/local/lib/libexpat.dylib only contains the architecture(s) x86_64.
Error: Try reinstalling the port that provides /opt/local/lib/libexpat.dylib with the +universal variant.
Error: Target org.macports.extract returned: incompatible architectures in dependencies
Error: Status 1 encountered during processing.
You need to figure out what port uses that lib and force a universal upgrade. Here's how:
>>port provides /opt/local/lib/libexpat.dylib
/opt/local/lib/libexpat.dylib is provided by: expat

So expat is the culprit. Now lets get it upgraded:

>>sudo port upgrade --enforce-variants expat +universal

I ended up doing this about a dozen times, once for each of the wine dependancies that wine complained about. I eventually got wine installed.

I suppose you could script this by getting all the Wine deps and doing some copy and pasting. That would probably be quicker.


Here’s a post I found that streamlines the process a bit.

selections from my trip-hop playlist

I spent last weekend at a board gaming retreat we call WBC-West. We stayed at Doug’s family’s house in central Oregon and played (mostly) board wargames. When you’re hanging out inside all day playing games, it’s nice to have some tunes going and several of our iPods took turns as DJ.

I put on my trip-hop playlist that I have been building, pruning and refining over the last several years. It’s a mix of techno downtempo, chill and trip-hop that I listen to at work. For me, it’s a great mix to listen to while working as there are not a ton of lyrics to distract, but there’s always good beat to keep you going. I think it works well as gaming background for similar reasons. I got some complements and inquires on the playlist – Eric even said that he’s going to spend his next month’s eMusic quota on bands from the list. So now after 2 post-weekend emails requesting more info on the list, here’s the scoop:

  • 9 Lazy 9
    • The Herb
  • Amon Tobin
    • Bricolage
    • Out From Out Where
    • Permutation
    • Remixes & Collaborations
    • Supermodified
  • Blockhead
    • Downtown Science
    • Music By Cavelight
    • Uncle Tony’s Coloring Book
  • Bonobo
    • Animal Magic
    • Days to Come
    • Dial ‘M’ for Monkey
    • Live Sessions EP
    • One off Remixes and B-Sides
    • Solid Steel Presents: It Came from the Sea
    • Sweetness
  • Chris W. Paine
    • Weird Conversations
  • Cut Chemist
    • The Audience’s Listening
  • Czarny Wladek
    • Wolnosc
  • DJ /rupture
    • Uproot
  • DJ Krush
    • Kakusei
  • DJ Shadow
    • Entroducing……
    • Preemptive Strike
    • Private Press
    • Bombay the Hard Way
  • Free the Robots
    • Free the Robots EP
  • Gotan Project
    • Inspiracion-Espiracion Remix
    • La Revancha del Tango
    • Lunatico
    • Mare Tranquillitatis
  • Greyboy
    • Land of the Lost
  • Groove Armada
    • AnotherLateNight
    • Back to Mine
    • Goodbye Country (Hello Nightclub)
    • Love Box
    • Northern Star
    • Vertigo
  • Helicopter Down!
    • Junshi
  • Kruder Dorfmeister
    • The K&D Sessions
  • Massive Attack
    • 100th Window
    • Blue Lines
    • Mezzanine
    • Nexus (Bootleg)
    • No Protection: Massive Attack Vs. Mad Professor
    • Pi (Symbol)
    • Protection
    • Rising Tears
    • the karmacoma e.p.
  • Mocean Worker
    • Aural & Hearty
    • Enter The MoWo!
    • Home Movies From The Brainforest
  • Orbital
    • Snivilisation
  • Portishead
    • Dummy
    • Portishead
    • Third
  • RJD2
    • Dead Ringer
  • St. Germain
    • Tourist
  • Strange Republik
    • Infiltration
    • No Tomorrow
  • Thievery Corporation
    • 18th Street Lounge Comp.
    • DJ Kicks
    • Hi-Fidelity Lounge
    • Om Lounge, Vol. 1
    • Radio Retaliation
    • Sounds From The Thievery Hi-Fi
    • The Cosmic Game
    • The Mirror Conspiracy
    • The Outernational Sound
    • The Richest Man In Babylon
  • Thunderball
    • Scorpio Rising
  • U.N.K.L.E
    • Psyence Fiction
  • Ulrich Schnauss
    • A Strangely Isolated Place
    • Far Away Trains Passing By
  • Wax Tailor
    • Hope And Sorrow
    • Tales Of The Forgotten Melodies
  • Zero 7
    • Simple Things

Wow, that’s a long list. I regularly refine it, so not all tracks from all these albums are actually part of it, but still…

If you have any suggestions of other bands or albums for me, please comment.

Enjoy the chill.

Mac Tips and Tricks – part 1 – Handy apps and utils

This is the first installment in a series I will be posting about how to get the most from your Mac. I run into a lot of switchers and often get questions about how to do stuff on the Mac. So instead of copying, pasting and updating the same email repeatedly, I can now refer them to my blog 😉

Let me know if there are any specific areas that you would like me to cover in the future.

Disclaimer: The opinions expressed in this article (and my whole blog for that matter) are mine and mine alone. Additionally, I have not received compensation related to any of the software mentioned here.

Part 1 – Handy applications and utilities

OS X 10.5.x (leopard) has a pretty nice set of built-in features and applications. But there’s always room for improvement. The following is a list of free, shareware and commercial tools that I recommend.

System Utilities
LaunchBar – A keyboard driven launcher, navigator and general productivity tool. This is the first thing I install on any Mac that I use. Shareware. An alternative to quicksilver, very similar, but some feature differences. Quicksilver is free and will probably work just fine for you. They’re charging a bit more for the latest version of LaunchBar (24 euros – about $31) and it’s probably a bit too much. I got the first version for $12 and have been upgrading since.

Growl – system wide notifications, lots of supporting apps – free

MenuMeters – all your machine’s vitals in configurable displays in your menu bar – free

Adium – All-in-one instant messaging client. Supports a ton of different protocols in a highly configurable app. Free

Google Notifier – If you use gmail or google canendar, I highly recommend this.

Default Folder – Simply brilliant. Besides remembering where you last opened files from on a per app basis and giving hot keys to specific locations, this will allow you to mouse-over a Finder window and have your open/save dialog goto that directory. Just try it or let me demo if for you. Unfortunately, the latest version is a bit expensive at $35.

Network and File utilities:

Chicken of the VNC – handy VNC client for your remoting needs – free

RDC – Remote Desktop Connect. Open a VNC-like network session with a windows box, only faster. The best Mac app that M$ has released, evar.

Parallels – Virtualization for when you have to foray into other OS’s locally. Latest version has coherence and supports most USB devices (even ones not supported by OSX). Commercial.

Toast – CD/DVD burning app. Commercial.

muCommander – General purpose file manager with excellent network features, based on Norton Commander. Free.

Cyberduck – Handy s/ftp app – if you do that sort of thing with a GUI. Free/Nagware.

Laptop Specific stuff
SlimBatteryMonitor – big improvement over the one built into the OS , and free.
Note: I used to have more of these, but the MBP and Leopard have incorporated their functionality.

Dev tools
TextMate – A fantastic editor and IDE. Configurable, scriptable, pluggable. BBEdit is a fading memory for me. Commercial, $54.
iTerm – Replacement for Terminal.app – tabbed interface, uses Linux compatible keyset, bookmarks. – free
CocoaMySQL – GUI for management of your MYSql DBs – free
svnX – GUI for SVN. A little rough around the edges, but stable and useful – free

Data management and prodctivity:

Dropbox – Secure, remote file storage and syncing. I use this for application specific data files and small backups. Free for your first 2BG, pay for more.

Evernote – My current favorite tool. This is the data management solution that I have been trying to find/hack/create for years. It’s a personal wiki/cms with rich formatting, tags, categories and easy importing from email and web. But what really sells it for me are the client apps with syncing and offline use. There are clients for Mac, Win, iPhone and others. They all keep synchronized with each other and allow offline editing. I can’t tell you how much time I’ve spent trying to solve this problem for myself with combinations of web apps, Mac apps, scripts, etc. Finally I have one place to put all my data where I can access and update it whether I’m at home, work, on the bus or at a coffee shop. The first 40MB a month are free – which is plenty if you’re mostly storing text, like me. You can pay for more.

VoodooPad – A wiki wrapped up in an application. Great for notes, lists, reference, etc. However I think Evernote will soon completely replace this for me. Shareware.

1Password – Secure, encrypted login/password/data storage with excellent browser and iPhone integration. $40, but you can often find it discounted or even free bundled with other apps.

Things – A well designed todo list and task manager, one of the best I’ve ever used. It’s based on GTD, but you don’t have to use it that way. Has an iPhone app that is useful independently and well integrated, but costs additional also. $50 for the Mac, $10 for iPhone.

Skitch – Uber-screenshot tool. Capture screens, edit the images, share them on the web, all-in-one. Free.


Twitterific – Handy twitter client. Free with ads, pay to get rid of them.

VLC – Plays just about any video you throw at it. Can be controlled by the IR remote that comes with your MBP. Cross platform. Free

Graphic Converter – Reads and writes most ANY graphic format. Does decent editing and even has some automation/script-ability. Also a quick image browser. Shareware. If you want something free that does a bit more than iPhoto, try Seashore.

GimmeSomeTune – iTunes extension with great hotkey functionality and some other nice features.

That’s my current list. I’d be interested in your opinions on these. What apps do you use and like?

Best name for a fictional cheese shop ever

“Cheese Gotta have it”

Mentioned on this week’s episode of Weeds.

My latest online addiction

My latest online addiction is the gleemax site hosted by our friends at Wizards of the Coast. They are in alpha (i.e. free) testing of this online boardgame site. It has several of WotCs best acquisitions: Acquire, Axis & Allies, Guillotine, Vegas Showdown and the one that I can’t stop playing, Robo Rally. You can play solo against bots or you can try to get some other humans to play. I can only speak to the AI for Robo Rally (as that’s all I’ve played), but it’s pretty good. The bots are hard to beat. The code is being worked on and they appear to be responding to user feedback. I’ve seen one update so far. I haven’t come across any major bugs. My big complaint right now is that it can get laggy when you play with other humans. It’s all in java, so it works great on my Mac and should be fine in linux and that other OS. My handle is (of course) HazMatt, join me for a game sometime.

Mac System info on your desktop

There are a small handful of windows apps that I think are pretty useful and don’t have better Mac equivalents. bginfo_ss.jpg BgInfo is one of these. It used to be an independent freeware app, but microsquish thought it was cool enough to acquire – at least it’s still free (for now). What is does is simple: it aggregates a bunch of different bits of information about the system it’s running on and merges it with the desktop background. This may not seem very useful to most people since most people only use one or two different computers and don’t really care about things like their Default Gateway or MAC Address. However, for those who work in a dev/IT environment where they switch between a bunch of different machines or better yet, have a lab of boxes that they don’t use regularly – this is extremely handy.

Now I could not find a utility that does what BgInfo does for the Mac – at least not specifically. Then I remembered about GeekTool. GeekTool is the Shopsmith to BgInfo’s hand drill. I plan to write another post dedicated to Mac utilities where I’ll go into more detail on GeekTool, but for now we’ll just get started. If you know of something else that does what BgInfo can do on the Mac, please let me know – I’m not totally addicted to big hammers.

Here’s what you do:

  • Install GeekTool
  • Paste the following ruby code into a text file and save it somewhere like ~/scripts or ~/Library/Scripts as sys_info.rb:
@user = `whoami`
@system = `scutil --get ComputerName`
@ip = (`ifconfig en0 | grep netmask`).split
@vers = (`sw_vers | grep ProductVersion`).split
@hw_info = `system_profiler`
@up = (`uptime`).split(',')
if @vers[1].include?('10.5')
  @hw_name = 'Processor Name'
  @hw_speed = 'Processor Speed'
  @hw_name = 'CPU Type'
  @hw_speed = 'CPU Speed'
puts "User: #{@user}"
puts "Computer: #{@system}"
puts "IP: #{@ip[1]}"
puts "OS Version: #{@vers[1]}"
puts @hw_info.grep(/#{@hw_name}/).to_s.strip
puts @hw_info.grep(/#{@hw_speed}/)[0].to_s.strip
puts @hw_info.grep(/Memory:/)[0].to_s.strip
puts "Uptime: #{@up[0].strip}"
  • Open the GeekTool preference pane and add a new entry. Select Shell from the pop-up menu.


  • In the Command box, enter: ruby ~/scripts/sys_info.rb (change to your path and file name)
  • Set the refresh for 300
  • Now you should see a box somewhere on your desktop and it should have 8 lines of juicy info.
  • Play with the other tabs to set the font style and background.
  • You can drag and resize the box to wherever you like.

I know this works on OS X Tiger and Leopard and it should work fine on Panther. BTW – GeekTool works great on Leopard.
If you have any suggestions, changes or additions to this, please share.

Previous Older Entries