Installing the CVS bundle for TextMate for Mac OSX

Posted by Tim on October 15th, 2007

More for my own reference than anything else, here is how you install the CVS bundle for TextMate using a subversion client.

1. If you don’t already have a subversion, try the precompiled version here.

2. Set the LC_CTYPE variable to use UTF-8
export LC_CTYPE=en_US.UTF-8

3. Make a bundles directory if you have not already installed others
mkdir -p /Library/Application\ Support/TextMate/Bundles

4. Change to your bundles directory
cd /Library/Application\ Support/TextMate/Bundles/

5. Install the CVS bundle using the svn client
/usr/local/bin/svn co http://macromates.com/svn/Bundles/trunk/Bundles/CVS.tmbundle

6. Relaunch TextMate and you should now see a CVS bundle!
picture-1.png

Custom TextMate commands for ruby and scp

Posted by Tim on October 1st, 2007

If you’re a Mac user and you’re not using TextMate, then hurry up and join the bandwagon. This is a powerful text editor for Mac OSX, which I use for just about any type of project be it C#, Java, PHP, Perl or even COBOL. What makes this tool so powerful is your ability to customize it to your heart’s content.

Take for example the following scenario. I use this editor to code from my sandbox, and use custom bundles to maintain versioning with my CVS server. Most bundles are a command click away, say for example, I need to add a file to the repository, I just hit Ctrl-Shift-Z and I’m presented with a CVS specific dialog.

Read more »

Understanding the effect of MQ persistence on disk performance

Posted by Tim on September 28th, 2007

Recently I have been trying to determine what the impact of using MQ message persistence is on disk subsystem performance. There is alot of literature from IBM recommending ideal configurations to support MQ persistence, so I won’t turn this into a post that recommends ideal settings. What I did want to achieve though, was to get a better understanding of how MQ interacts with the disk subsystem when using message persistence, so that I could plan for capacity and make better recommendations for tuning on a production SAN environment.

Read more »

Automating your scripts with WWW::Mechanize

Posted by Tim on September 24th, 2007

CPAN provides a great module for Perl called WWW:Mechanize. To quote CPAN:

WWW::Mechanize, or Mech for short, helps you automate interaction with a website. It supports performing a sequence of page fetches including following links and submitting forms. Each fetched page is parsed and its links and forms are extracted. A link or a form can be selected, form fields can be filled and the next page can be fetched. Mech also stores a history of the URLs you’ve visited, which can be queried and revisited.

This post details how to install the module as well as a quick example of automation that logs in to a secure website (MyThree.com.au) and extracts information (Bill Info & Data Usage) without ever having to leave your console …

Read more »

Screw CPU, what about heat? MacBook Pros that run hot!

Posted by Tim on September 3rd, 2007

I’ve been using a MacBook Pro for about 12 months now, and whilst I love this machine and its capabilities, it does tend to run at high temperatures. I use my laptop as a desktop replacement mostly, and whilst on my desk, I pretty much run parallels (virtual machines) all day long. This sees a constant use of CPU around 10:20%+ for usr:sys …

Most notably is the collection of heat around the power supply and leading edge of the keyboard on the thin strip before the monitor. Now I don’t sit here willingly burning my hands on these hot spots, but the heat is noticeable and can be uncomfortable to work with all day. Traveling on the train gets worse, as the heat tends to cook my left thigh…

Read more »

Problem solving in general and MQ 2195 reason codes

Posted by Tim on August 10th, 2007

So I spent the best part of a day assisting our sys admin and developer resolve MQ errors that a COBOL client was throwing when opening more than one concurrent connection to a clustered queue manager.

Because the architecture had recently changed to a cluster, and my load harness was no longer getting the desired response times, we all went down the track of investigating issues with clustering as this was the new kid on the block. Whilst the developer and sys admin revealed many other interesting tid bits of information regarding correct configuration and the like, we still could not collectively resolve the problem: the COBOL code was throwing a 2195 reason code on multiple MQCONN calls to the queue manager.

Read more »

Using Microsoft’s log parser to analyse web server traffic

Posted by Tim on August 8th, 2007

IIS logs if setup properly can be an extremely useful source of information during load testing and for other activities such as capacity planning. Another load tester sings its praise here and provides good justification of why you should use it.

The log parser comes for free with the IIS resource pack but you can also get it individually here.

Read more »

Using perl to get, put and delete on Amazon S3 storage

Posted by Tim on August 6th, 2007

Amazon web services development domain have provided some neat perl code here such that you can simply put, get or delete objects inside an Amazon S3 storage bucket with something like this:

./s3curl.pl --id=[aws-access-key-id] --key=[aws-secret-access-key] -- http://s3.amazonaws.com/[bucket-name]/[key-name]

I modified the author’s code to make it a bit more win32 friendly, as it is no surprise that DPHOTO uses perl and a win32 platform to launch its tertiary backups.

Read more »

Using perl to read your win32 event log

Posted by Tim on August 6th, 2007

I often use a combination of cygwin with ssh to remotely manage windows servers, as I find this to be a quicker (and hopefully safer) method of access to my windows boxes. To that end, I often need to check windows application event logs. Typically you’d use the mmc, but all I want to do mostly is check the last 10 or 100 entries for things like break in attempts, or application warnings/failures etc.

Read more »

Mighty mouse makeover

Posted by Tim on August 1st, 2007

I’ve been having a lot of problems with my Apple mighty mouse lately. Particularly with the scroll wheel which would scroll up but not down. I think eating chips and surfing the web was getting things too greasy. Apple lend us some advice here on how to clean your wheel in a non-destructive manner.

But if you’re like me on holidays, and you feel like getting busy with a stanley knife and that troublesome mouse you can follow these instructions.

Read more »

A macbookpro sure slim diet

Posted by Tim on June 21st, 2007

As my current contract with Telstra comes to a close, test summary reports are signed off and my brain approaches shutdown mode in preparation for a 5 week holiday, I decided to give my Mac Book Pro a much needed crash diet.

Like owner like macbook, this beast was getting a little pudgy around the middle, so I decided to axe the following:

  • GarageBand. Well, I’ve finally convinced myself that I really don’t want to be that bedroom DJ producer, so this was the first thing to be given the arse. Look for the bulky demo files in Application Support and you can save 2.0GB+ of space. Deleted.
  • AppleSoundLoops. I mean really, who needs that extra 1.9+GB of apple sound loops also provided courtesy of GarageBand. Deleted.
  • iTunes. Yeah I know, how could I? Well the fact is I’m starting to think iTunes sucks. I don’t use ITM (who wants to pay for crappy 128 bit rates?) and I hate having to store all of my songs on my laptop AND on my ipod. I just wanna store them on the ipod and be done with it. So deleted the iTunes library on the laptop and am now running with yet another ipod manager [yamipod]
  • YamiPod

  • Backups To keep things organised, I’m continuing to use iBackup which essentially uses rsync to keep my laptop and spare usb drive in sync with a simple gui. At the end of the day, another 30.0GB+ saved and I can now go nuts with virtual machines on parallels.
  • The gambler’s fallacy killed by pure maths

    Posted by Tim on June 12th, 2007

    Statistics (and the ability to gather/present) are an essential tool for performance testing. At the time of learning basic stats in high school and university I was plagued with the problem of not seeing the real life application of these tools. Sure, exercises and scenarios conducted simulated real life, but in reality, the meaning of stats escaped me. Fast forward 10 years and I am now rediscovering the joy of such measurements. In fact, those university text books get more of a workout now than previously during study.

    I have already posted a few times about presenting stats using common tools like Microsoft Excel. I am still learning the stats package ‘r’ as I see that to be more powerful and extensible. In the interim I use a combination of Excel, MySQL and PHP to prepare and analyse stats. As this contract winds down and I prepare for the next, I’ve come across a useful application of stats to keep me entertained.

    A friend of mine recently stumbled across a well known roulette strategy called the martingale strategy.

    Originally, martingale referred to a class of betting strategies popular in 18th century France. The simplest of these strategies was designed for a game in which the gambler wins his stake if a coin comes up heads and loses it if the coin comes up tails. The strategy had the gambler double his bet after every loss , so that the first win would recover all previous losses plus win a profit equal to the original stake. Since a gambler with infinite wealth will with probability of 1 eventually flip heads, the martingale betting strategy was seen as a sure thing by those who practiced it…

    Read more »

    RWI 00239 The server has reached the maximum number of simultaneous connections

    Posted by Tim on May 25th, 2007

    Once again on the topic of performance testing Business Objects, when executing a benchmark for a web intelligence report with goal being to see how many concurrent users it could support, the following error mesage was being generated in the vuser log:
    RWI 00239 The server has reached the maximum number of simultaneous connections
    Connection failed. The server has reached the maximum number of simultaneous connections. (Error: RWI 00239) (Error: INF )

    What to do?

    Read more »

    How to make an ISO using mkisofs

    Posted by Tim on May 22nd, 2007

    I find when testing I need to archive copious amounts of data. Occasionally I need to create a bootable disk image for use in the creation of virtual machines or impromptu test labs. Storing this information and images in the ISO format is quite handy.

    Most people will already know how to make an ISO image using their favourite disk tool. Nero & MagicISO are two popular programs that come to mind. But for those that like to keep it free, try the following from your terminal instead …

    Read more »

    Don’t forget Perl one liners

    Posted by Tim on May 18th, 2007

    If you have the requirement to manipulate multitudes of input messages / log files / data templates with dynamic variables, you may be left wondering what is the best approach. One could argue in a friendly way for hours about which language is the best to achieve this outcome (almost like pc vs. mac), but since I often find myself working on mixed environments, you can’t go past perl one liners…

    Read more »

    Business Objects correlation

    Posted by Tim on May 18th, 2007

    I have been working on some template LoadRunner scripts for Business Objects Web Intelligence / Crystal Reports which require good ole fashioned manual correlation.

    Before writing this post, in the background I have been working on a tool comparison between LoadRunner and my increasing favourite JMeter with a simple (?) scripting exercise that goes through recording, replaying and correlating data for Business Objects. Common to both tools, is the requirement to correlate essential run time data. As my good Dutch friend Desiderius Erasmus once told us in 1466 …

    In the land of the blind, the one-eyed man is king.
    [In regione caecorum rex est luscus.]

    Knowing how to correlate is key …

    But how?

    Read more »

    SSH and SCP over alternate ports

    Posted by Tim on May 5th, 2007

    For an internet facing SSH server, it is probably common practice to have sshd listening on a non-standard port. Coupled with key pair authentication, this reduces the profile you present to simple brute force attacks.

    Connecting to a SSH server on a non standard port is relatively simple:

    ssh -p <yourPort> username@servername.com

    You may however need to copy files from the SSH server on an alternate port. Easy:

    scp -P <yourPort> username@servername.com:/path/to/remote/file ~/home/path/to/local/file

    But what happens if you’re using a proprietary client other than scp from the console that won’t support non standard ports?

    Read more »

    Faking it! (UDP packets that is…)

    Posted by Tim on May 3rd, 2007

    An associate of mine recently wanted a load script that could simulate thousands of UDP packets carrying a custom payload coming from different IP addresses. They were implementing a customised RFID solution that needed to simulate load from a lot of sources (think active RFID tags).

    There are many different ways you can accomplish this, solutions like LoadRunner will offer the ability to spoof source IP addresses, but in this case the client couldn’t afford hefty licensing fees. So getting back to basics, I launched the *flood* from a cygwin shell running ruby.

    The code looked a little like this…

    Read more »

    Monitoring queue statistics in MQ

    Posted by Tim on April 30th, 2007

    When load testing MQ you are no doubt going to need to be able to monitor queue statistics in terms of how many messages have been enqueued and dequeued within a given timeframe. You can use native runmqsc commands to query queues in order to find current queue depths but this is just a snapshot in time. In order to be able to monitor how many messages have been or gone, you need to sample the queue over time. Here is a good synopsis of options…

    A good way to achieve this is my using the PCF support package provided by IBM.

    The WebSphere MQ Programmable Command Formats (PCF) provide the capability to perform administration tasks on a queue manager by sending and receiving WebSphere MQ messages of a special format. PCF request messages are sent to the queue manager’s command queue, where they are processed by the command server and replies returned to the designated reply-to queue.

    This SupportPac contains a set of Java classes representing PCF header structures as well as an agent that can be used to simplify the task of communicating with a target queue manager and thus enable the use of WebSphere MQ Programmable Command Formats for queue manager administration.

    Using a simple java object as documented in sample code, you can query queue stats of your choice. My implementation simply prints out the queue you are connected to, along with enqueue, dequeue and total queue size stats over an arbitrary time frame (eg. last 2 seconds). This can easily be called from a simple shell script.

    Read more »

    Curve dampening for a custom load harness

    Posted by Tim on April 30th, 2007

    Recently I wrote a test harness that had a ‘discovery’ mode. That is, given a target service level agreement (SLA), what transaction pacing or throughput did the load harness have to apply in order to achieve the SLA response times. Now my maths is a tad scratchy, but I knew that I could somehow figure out the equation to determine how much the load balancer should adjust throughput in order to achieve the desired response time. In my mind I pictured a horizontal line that is the target, and a sinusoidal line that is the actual response time that varies according to load. If I could just figure out how to dampen that curve, I would have the magic formula!

    Read more »