Category Archives: Uncategorized

Uncategorized

windbg :: analysing a memory leak in w3wp.exe

As the scope of my role increases, I find that I am conducting a lot more deep diagnostics and analysis myself. I find it hard to be the guy that just ‘finds’ issues and then passes it on to the developer to do the digging. The least I could do is give them a little more guidance on where the performance issue exists, right ? Maybe, maybe not, but secretly, I like it.
So, we had this memory leak, it was a small one, but still, a leak is a leak. I managed to run the performance test for 2 days straight, and take quite a few memory/crash dumps along the way to analyse them to see what was leaking. I thought, if I could show the dev’s where the leak was, they could just go and fix it…at least, that was my thought process. The only issue, is that WinDbg is quite a scary tool if you don’t know what you’re doing, so I’ll try and cover 0.1% of using it here. read more »

Uncategorized

perfmon :: relog perfmon .tsv or .csv files to .blg

When we run batch jobs, we don’t use Loadrunner, we just run our Vugen script inside Vugen. Its perfect because we don’t need load, we’re just sending sql commands to a DB and starting/stopping services. This means that we dont get to use Loadruner’s awesome metrics collection engine to correlate results. So we kick off jobs in Perfmon.
Ideally, saving them as BLG *(Binary files) is great because you can use the Perfmon GUI to view the metrics. But when you save them as TSV or CSV (for whatever reason) you lose the GUI ease of use. Luckily ‘relog’ has the feature to convert the log. read more »

Uncategorized

vugen :: reduce script size

So, we recently upgraded to Loadrunner 12.50. I can’t say that I’m a fan of the new layout and clunky interface, but we will address that in another blog post, as it will take up a lot of space.
What has come to my attention is the ridiculous size of the scripts while you’re editing/building/modifying them. It has become such a concern to us that our current scripts directory is sitting at 19.5GB, and if that’s not ridiculous enough, we’re looking at 226K files. So I write a little script to delete all the unneeded files.
Proceed at your own risk! read more »

Uncategorized

unix :: backup your webserver (ubuntu, debian, whatevs)

So, a while ago, a friend and I decided to buy a VPS that would host all our sites. He has his VMs and I have mine. Until he decides to expand his disk and cause some fatal system issues (which he denies), and my sites all go down in a burning heap of death.
It was then that I realised that my backup regime is not really all what its cracked up to be, a common issue, So I decided to get my act together. I modified a script mostly written (but not perfect) and integrated it with a dropbox uploader script which will send your backup files to dropbox, which is simply awesome! read more »

Uncategorized

osx :: spotlight not indexing

So, my Macbook air has been upsetting me lately. I use spotlight a lot, as I have lots of ‘stuff’ in ‘lots of places’ and I can never find it. So I use spotlight, as most mac users would. I found that when I used it, it never returned anything. After trying fix after fix, I found something that worked. Its quick and easy. read more »

Uncategorized

excel :: generate text based on cell colour

I work with a lot of spreadsheets. A lot. Every time I look at them and think “this could have been presented better”.
Recently I received a spreadsheet that contained three different types of data in it, but the data was jumbled, and the only way to differentiate was by cell colour. Strange, I know. I needed a filter column that had each type so I could easily extrapolate the data, so I whipped up a quick macro. read more »

Uncategorized

ubuntu :: push notification with postfix and dovecot

I’ve recently setup my own mailserver, to host my own emails. I already owned a web server, so it wasn’t too big of a deal, but I did notice one small thing that was lacking. I use an iPhone and noticed that I wasn’t able to get Push notifications. This is annoying, since I don’t really ‘check’ my email. But then I stumbled across a small little package that gives me the functionality, all with minimal configuration. read more »

Uncategorized

mssql :: create db users without knowing sa password

So, a client comes in, installs their app on our database server and leaves. It’s all good, everything works, but I want to see the database…They changed our sa password so I cant meddle with the database. Now forgive me, but this is my server, not yours, I own the data, I own the hardware so its mine. But what to do when you cant get into the server to add a user..simple. read more »

Uncategorized

unix :: scan and email a ‘sent mail’ log

I have a few web servers…just a few. One of my web servers provides a reminder system in which it scans a classified every few minutes, and emails subscribers when the website changes and matches a users search criteria. It’s handy, but sometimes I wonder if people are getting their emails. To combat this, I added myself as a subscriber and I receive emails every day, however I still wanted to know how many of my subscribers are getting their emails. The only way was to troll through the mail log and check it.If you’ve ever seen a unix mail log, its messy, and ugly. Sure, you can get your information out, but its annoying. I’m not bad with grep and can whip up a quick statement to reformat the output of the log, but I wanted something better, so I wrote a little script.
read more »

Uncategorized

sql :: reformatting HTML to plain text

I received a request from a colleague asking me if I could reformat HTML in a cell to be readable so we could send it out to a customer (mssql db). Initially, I thought “easy”. How wrong I was.
As per normal, I scoured the net, as I’m sure someone else has done this, and came across , which is awesome, but its too generic. It strips everything between <> tags. We have embedded xml sometimes and I still need that to be displayed. Looks like I have to put all the HTML tags in that need to be stripped, individually…
read more »