PowerShell script for Service Console memory

Here is a script that will query all your ESX hosts and create a report of what their Service Console memory is set to.  Like most people I always set this to 800MB after an install, but when you are dealing with a large environment it’s all too easy to miss some.  Having your Service Console memory set too low can create some very peculiar errors and cause a complete lockup of certain processes (which then requires a host reboot).

I am certainly no PowerShell expert and must credit Mr Hugo Peeters (www.peetersonline.nl) with all the logic behind the script. I just want to post the whole script so everyone can benefit.

Grab the script here. Just rename it with a “.ps1” extension, edit the script to point to your VC and run it as usual.

If the Actual and Configured values are different, this means that you’ve changed the Service Console memory but not yet rebooted.

#################

P.S. If you do discover any hosts that aren’t set with the full 800MB, you’ll want to run a “free –m” at the Console to see how large the Swap Partition is. Hopefully this will be the recommended 1600MB, to ensure the “Service Console x 2” rule. If not, you really have 3 options:

  • Leave the memory set as it is.
  • Rebuild the host with the correct partitioning.
  • Augment the Swap Partition with a Swap File on another partition (there are a couple of excellent forum posts explaining how to do this if you’re not sure).

5 thoughts on “PowerShell script for Service Console memory

  1. I have this problem recently which caused absolute chasos in my organisation. Thanks for the script!

  2. You do not need to rebuild your ESX host to fix the Service Console memory. The memory can be altered from 272MB to 800 MB in VirtualCenter. This is in regards to ESX 3.5.0. The memory change will require a reboot of your ESX host.

  3. Ignore my comment above, I thought Forbes Guthrie was referring to the amount of memory allocated to the Service Console, not the swap space.

  4. I wasn’t aware that most people give their SC 800MB by default. In 4 years, I’ve never given the SC more than the installation default…unless I knew the client wanted to install agents or other extra stuff in the SC. Are people seeing their SC run out of RAM by taking the defaults…and not installing anything extra?

    1. Hi Chris, I’d say its a very common “customization”. Yes, this can be particularly important if you install any extra agents in the Service Console. However, I’ve also seen memory issues on vanilla ones too. If you ever get close to oversubscribing your hosts, then this is definitely something you’d want to look at. Running out of memory like this will just kill your whole host. I’ve seen it on production servers and it ain’t pretty.

Leave a Reply