NetScaler: Generate a simple usage statistic per Vserver

One of my co-workers recently approached me, that he needed a simple shell script which would generate a simple report about a Vserver’s current connections. After ironing out a few things with him (he had the intention of it being on a CIFS share on our file-server – which I changed to a simple HTML page) I went to work.

Out came two scripts. One is the collection instance, and the other is the processing instance. First the collection script runs, finds the current HA master node and then collects the Vserver’s current connections. After that script has dumped the information (date, time, current connections) into a file, the processing script will go and create a simple HTML page that’ll show exactly those informations.

You’ll also need to have configured the public key authentification on both HA nodes, since entering a password in combination with scripting is a bit lame.

 

 

VMware templates: post-processing for SUSE Linux Enterprise Server and openSUSE

Well, I’ve been fiddling around with SLES and openSUSE VMware templates. I know it’s a stupid idea when you have a PXE server from which you could install this in a matter of minutes (seriously the SLES PXE installation takes about 5 minutes).

However, when dealing with DMZ’s (yeah, they exist!) you usually don’t have any PXE servers there. So I decided to go with simple VMware templates (like we do with Windows already), but had to iron out a few kinks.

  1. There’s no way to run a set of scripts after the deployment scripts from VMware have been run
  2. The hostname isn’t changed everywhere (/etc/postfix/main.cf for example)

 

So of I went and wrote a short (70 line ..) init script, which will do exactly that.

You’ll also need to create a file (/etc/template), which’ll hold the template’s hostname and will be used for the comparison if VMware’s post-processing is already finished.