'Return current state of supervisord as a struct
@return struct A struct with keys int statecode, string statename'

def getState(self):

    self._update('getState')
    state = self.supervisord.options.mood
    statename = getSupervisorStateDescription(state)
    data = {'statecode': state, 'statename': statename}
    return data
