Site Reliabililty at Scale – Discussion Roundup

There have been several useful discussion threads on the LinkedIn Site Reliability at Scale group (http://www.linkedin.com/groups?home=&gid=4200099) recently:

Continue reading Site Reliabililty at Scale – Discussion Roundup

ThoughtWorks AWS Training in London

Just back from the ThoughtWorks AWS training in London at Wallace Space. Great day: good pace, with some excellent discussions and lots of learning.

Continue reading ThoughtWorks AWS Training in London

UK Scale Camp 2010 – Braindump

I’ve just returned from UK Scale Camp 2010 (@scalecampuk), organised by The Guardian (and the indefatigable Michael Brunton-Spall, ). Here are some notes:

Overview

I liked the “unconference” format (no formal programme; attendees vote for their favourite sessions in advance), and ended up in four of the many sessions:

  • DevOps on Windows
  • Log Analysis for Search Results
  • DB Changes without Downtime
  • Handling Errors at Scale

WMIC – command-line control of WMI functions

Before Windows PowerShell and all the flexibility (and complexity) that brings, there was WMIC, the command-line client for WMI.

WMIC works out of the box with Windows XP and later (including Server 2003 and Vista), and allows access to operations provided via WMI: “a powerful, user-friendly interface to the WMI namespace”. Upon first use, the WMIC environment is installed:

C:\> WMIC

Please wait while WMIC is being installed...

Several tasks which normally feel very GUI-oriented, such as checking the battery status, are made very “command-line” with WMIC:

C:\> WMIC Path Win32_Battery Get BatteryStatus /Format:List

BatteryStatus=1

In this case, the batter is discharging. You can see the beginnings of PowerShell in the syntax and detailed status/operations available. Another useful command is useraccount, to return details of the user accounts on the system:

C:\> WMIC useraccount list brief
AccountType  Caption                  Domain     FullName       Name   SID
512          SKELTON-M\Administrator  SKELTON-M  Administrator         S-1-5-21-68**03330-*********-839**2115-500
512          SKELTON-M\Guest          SKELTON-M  Guest                 S-1-5-21-68**03330-*********-839**2115-501
...

Or how about terminating a specific process (notepad.exe) from the command-line? Here we go:

C:\> WMIC process where name='notepad.exe' call terminate

Executing (\\SKELTON-M\ROOT\CIMV2:Win32_Process.Handle="4652")->terminate()
Method execution successful.
Out Parameters:
instance of __PARAMETERS
{
        ReturnValue = 0;
};

It’s helpful to install the WMI Administative Tools, so you can explore the WMI namespace and investgate the operations available to you via WMIC. For example, to determine the name of the time zone currently used by the system, use the TimeZone path:

C:\> WMIC Path Win32_TimeZone Get StandardName /Format:List

StandardName=GMT Standard Time

The time zone for my computer currently is “GMT Standard Time”.

For simple operations which do not merit PowerShell scripts or installation, WMIC is a good choice.

Default values skew data

In Raymond Chen’s brilliantly diverse blog The Old New Thing, he asks:

Why are so many fake LiveJournal blogs written by 29-year-olds?

The answer probably lies in default values for datetime variables: January 1, 1980 is the “year zero” for DOS date/time values, and – lo and behold – anyone born on that date is 29 years old in 2009.