Wednesday, August 19, 2009

Freeware IIS web log analysis - Golden Phrases!

I've never been able to find a really good log analyser for Windows that doesn't expire or cost money - the main one I use is WebLog Analyser Lite but I've noticed that after a few months the search engine phrases stop updating. Probably just a bug that will get fixed sometime but annoying since I at least partly have a website because I am interested in who finds it - and how.

I'm fascinated for instance that I overall get more traffic from "Bing" than Google. Wow. People use Bing?

Anyway, I've found another program to analyse just the search engine phrases people use to find my site and its got a great name - "Golden Phrases"! It works fine with IIS logs and under Windows 2008 Server and can be downloaded from My favourite phrases people used to get to me (though not the biggest I should add) include:
  • "The most dangerous moment for a bad government is when it begins to reform" (hmmm, deep)
  • "king john administrative skill" (how should I know? Never met the man)
  • "northampton boring town" (no, it's not!)
  • "Structure of the Nazi government? Chaotic?" (yep)
  • "" (no kidding!)
  • "who is obsessed" (I really don't know the answer to this. Not me though)
  • "clingy baby 8 months constant whinging" (I feel very sorry for you. Been there, done that)
  • "Children boys Babys" (That is really not how you spell babies)
  • "an alliance between middle-class reformers and working-class voters brought about" (brought about what? Don't leave us in suspense!)
  • "night at the museum 2" (I've never seen it and I'm fairly sure have never mentioned it!)

Wednesday, August 12, 2009

Manually creating an ICA file for Xenapp 5

Bit of proper stone-age technology here! I had a need to create an ICA file to launch a Citrix app for use with EdgeSight for Load Testing (just kick off one app, in a seamless window, including authentication, without using a Web Interface server) and found no easy way of doing it.

Searching on Google comes up with two possibilies for making an ICA file. One is to use the management tools (which haven't been able to do this for about 6 years) and the other is to open your web interface, right click on one of the apps, and save the target. It'll save as *.ICA, sure; but is about 4 times longer than it needs to be and goes through the web interface, funnily enough.

So, time for Notepad! ICA files are just text files with a different extension, so start a new file in Notepad (or Notepad++ in my case) and copy what is below (which is an example to open Word 2007). Tested as working on Xenapp 5 and Presentation Server 4.0. In this case I'm saving a plain text password, which might not be ideal for you. Hopefully the fields to change will be obvious!

Word 2007=
[Word 2007]
Address=Word 2007
InitialProgram=#Word 2007
WinStationDriver=ICA 3.0

UPDATE 9 November 2009

You do all this research, find out how something works and then find Cirtix released a free tool to do the same time 2 years ago. Typical.

Tuesday, August 11, 2009

Using EdgeSight for load testing Xenapp

Something that we have been needing a lot of recently as we design a new Citrix Xenapp 5 farm is some way of load testing the new servers we're building so we can see how to get the best "density" (i.e. how to cram the most users on a server without them complaining).

If we asked Citrix they would tell us 64-bit is good and using XenServer is also good - so having Windows Server 2008 installed about 2-3 times on each physical server instead of just once.

A new-ish option is Edgesight - this has been around for years but is now available for Citrix Enterprise customers without paying extra money. This is rather good at monitoring CPU, Disk, etc on servers and also has a component called Edgesight For Load Testing, which is essentially a way of getting a few desktops to hammer the server with pre-recorded Citrix sessions.

A bit like a denial of service attack.

Anyway, had a lot of fun (not) creating a standalone server using SQL Express 2008 to handle this, so this is basically what I did...

  • Download the software from My Citrix. Note EdgeSight and EdgeSight for Load Testing are not the same download. That made me scratch my head for a good 10 minutes until the penny dropped.
  • Install Windows Server 2003 or 2008 - personally I found 2008 a bit slower and used about 6gb more disk space for no obvious benefit so used 2003.
  • Install SQL Server Express 2008 with Advanced Features. Don't be tempted to try SQL 2005 Express, it doesn't work. The Advanced Features bit is needed as Reporting Services is a vital component. Note that when you get to the Instance name, don't change it to Default Instance, leave it as an Instance called SQLEXPRESS. This caught me out - I usually use Default Instance if I can but later EdgeSight refused to use it, claiming that Reporting Services was not configured correctly.
  • Install the SQL Server 2005 Backward Compatibility Components.
  • (Alternatively you could just point EdgeSight at a "real" SQL Server if it has Reporting Services - 2005 or 2008 is fine in this case).
  • Install EdgeSight - this should be fairly self explainatory. The only bits that tripped me up were in the SQL Setup.
  • Setup your "Company" - install agents on the Citrix/Xenapp servers themselves (this requires a reboot - darn) and they should appear in the interface so you can monitor alerts, CPU, memory, etc.
  • Install Xenapp for Load Testing Controller on the same server and Xenapp for Load Testing Launcher on a few desktop machines.
  • Configure scripts and hammer the server!

Notice it runs out of details completely at the end - its time to figure out how Load Testing really works...

Thursday, August 6, 2009

Label list on Blogger "published vis FTP" IIS Blog.

I've been trying for ages to get a decent label (categories, tags, whatever you want to call them) list or cloud working on my site. Since I publish via FTP and don't have my blog on blogspot my options are limited. Most of the remaining solutions seem to involve Apache (nope) or PHP (nope) or widgets (again...), but I have now found one that works just fine! I just needed to edit my template and make a couple of edits to get it working.

So thanks to the author for posting - shame I didn't read this a couple of years ago!

Windows 7 editions demystified

Windows Vista was regularly and rightly teased for having too many versions, and since Windows 7 is "Vista fixed", no matter what Microsoft say, they have apparently greatly simplified things. Except it appears on the face of it to be as bad as before.

So here's my take on things for the confused:

Windows 7 E Editions: Microsoft threatened these editions, which would be same as below but with no Internet Explorer. It was just to try to stop the EU giving them another half-billion euro fine and they changed their mind anyway. So you can't buy them. On the right is an artist's impression of these fictional editions.
Windows 7 Starter: Perfectly usable EXCEPT you can't change the desktop background. Oh, and you can't buy it, only have it preinstalled on a Netbook.
Windows 7 Home Basic: Like Starter but you can change the background. And you can't buy it either, unless you live in the third world.
Windows 7 Home Premium: Essentially complete, though you can't join a domain. Everyone at home should buy this.
Windows 7 Professional: Just like Home Premium but twice the cost and can join a domain. Has things no-one will use like encryption. Everyone at work should use this.
Windows 7 Enterprise: Just like Professional but with a load of features 99% of users will certainly never use and would possibly have trouble spelling. Oh, and you can't buy this either unless you are one of Microsoft's bigger customers.
Windows 7 Ultimate: Literally identical to Enterprise except you can buy it for cash from a shop. And at triple the cost of Home Premium, we're talking a lot of cash. Only useful if you are a home user with more than 16gb of RAM - so almost nobody then.

There, simple!

Wikipedia have elaborated slightly on my insightful analysis...

Tuesday, August 4, 2009

SQL Server - Shrinking LDF files

No rocket science in this post, I'm more putting these commands on here in case I ever lose them!

Log (LDF) files are obviously very important on a SQL Server and shouldn't just be wiped out every time you need some disk space - most of the time its not worth forcibly shrinking them since they'll just grow back to their old size. Its better to actually backup the transaction logs so SQL Server reuses the space within them and leave yourself the option of a point-in-time restore.

Saying that, every so often you do just know they only contain junk and won't ever be that big again - say with an archive database that's just been imported and will never change, and sometime in a disk space crisis they're the only option, so these commands will safely discard them and take them back to about 1mb. Be warned though, you've just nailed all your logs, its then best to immediately do a full backup on said database. Replace DATABASE and DATABASE_log with your actual DB name and its logs name (look in its properties through Management Studio).

First execute:


Then execute:


And as if by magic, the logs are gone. Now backup, backup, backup...

Monday, August 3, 2009

Command Prompt during Windows 7 and Vista setups

After my last pointless post about launching a Command Prompt during Windows XP setup I did a bit of digging and found that:

(a) Every version Windows since Windows 2000 has allowed this during setup
(b) I appear to be the last person in the world to realise this feature existed. Apart from my colleagues, who were as impressed as anyone can be by this useless titbit.

I had to try whether the new and shiny Windows 7 had the same feature and it does! Shift-F10 during setup allows you to see the command prompt, and presumably damage Windows at its formative stages if you see fit. I am assuming Windows 2008 R2 does the same but am not sad enough to try this and screenshot it.

In the case below I limited myself to running Diskpart and looking at the crazy disk partitions that exist during Setup. I believe the reason the drive letters are "wrong" is that Windows 7 Setup deploys an image of a half built Windows 7 PC as its first stage, presumably greatly speeding up the deployment.

And I can't think of a use for that information either.

Windows 7 command prompt during setup:

Breaking out of Windows XP and 2003 Setup to command prompt

I have no idea whether this will ever be of any use, but apparently it is possible during the graphical stage of Windows XP and Windows 2003 Server setup to break out into a command prompt. I believe I had to do this once a long time ago on an XP machine to resolve a driver problem by manually renaming a file, but using it once in 7 years probably does not rank it as a crucial thing to know. There is another option that changes the setup screens to a Windows 2000-style setup which gives a bit more information about what is going on, but this may prove even less useful!

Anyway, its Shift-F10 (for command prompt) and Shift-F11 (for the slightly and inexplicably different setup screens) to access these technological wonders.

I'll update this if I ever find a genuine use for these features!

Windows XP Setup Command Prompt

Windows XP "Old Style Setup"

Windows 2003 Server Command Prompt

Windows 2003 Server "Old Style" Setup

Sunday, August 2, 2009

VMware Server 2 - great, fallen, etc

I remember the first time I used VMware Server back in 2006 - it was a happy day. Finally I was free from Microsoft's paltry virtualisation (Virtual Server - really, it wasn't so good, was it?) and while VMware Server had a curiously old fashioned feel it was stable and capable, and VMware Converter was a great way of hoovering up bad old physical servers and cramming them into VMware.

What happened? Why am I all excited about the new Windows 7 version of Virtual PC? Why is my preferred way of virtualising a Desktop PC to use VMware Converter and then immediately use a converter to turn it into a VHD that can be used in Vitual PC, Hyper-V or even Xen?

VMware Server 2.0 What were they thinking? What is that web interface all about? I've just spent about two hours trying to get it working on a PC with another Tomcat application only to find that they were scrapping for the same port. What was wrong with the old thick client? It is very slow when it does work and is very annoying to use, especially on a small screen. I've never spent so long scrolling up and down and left and right. But I have to use it sometimes because, to be fair, its support for 64-bit OS's is very good.

Hmmm, I wonder whether it is time to look at VirtualBox...