Returns all service statuses
977233
def _get_svc_list(service_status):
    '''
    
    '''
    prefix = '/etc/rc.d/'
    ret = set()
    lines = glob.glob('{0}*'.format(prefix))
    for line in lines:
        svc = _get_svc(line, service_status)
        if svc is not None:
            ret.add(svc)

    return sorted(ret)
952995
def GetClientsByStatus(self):
    """"""
    started = self.GetClients()
    completed = self.GetCompletedClients()
    outstanding = started - completed

    return {
        "STARTED": started,
        "COMPLETED": completed,
        "OUTSTANDING": outstanding
    }
391823
def _get_status(self):
        """"""
        if self._state in ["processed", "error"]:
            return self._state
        
        get_resp = requests.get(self.location, cookies={"session": self.session})

        self._state = get_resp.json()["status"]
        self.slice_time = get_resp.json()["slice_time"]
        
        return self._state
995859
async def service_status(self, name):
        

        return await self.send_command(OPERATIONS.CMD_QUERY_STATUS, {'name': name},
                                       MESSAGES.QueryStatusResponse, timeout=5.0)
61041
def map_services(self):
        """"""
        # the Vera rest API is a bit rough so we need to make 2 calls
        # to get all the info e need
        self.get_simple_devices_info()

        j = self.data_request({'id': 'status', 'output_format': 'json'}).json()

        service_map = {}

        items = j.get('devices')

        for item in items:
            service_map[item.get('id')] = item.get('states')

        self.device_services_map = service_map
354147
public function getStatuses()
    {
        return [
            self::STATUS_PENDING,
            self::STATUS_PROCESSING,
            self::STATUS_COMPLETE,
            self::STATUS_FAILED,
            self::STATUS_REFUNDED,
            self::STATUS_REFUNDED_PARTIAL,
        ];
    }
1069803
def get():
    
    livestatus = mk_livestatus()
    hosts = livestatus.get_hosts()
    services = livestatus.get_services()
    result = {}
    result['hosts'] = hosts
    result['services'] = services
    return result
256315
def available_services():
    
    all_datas = ()
    data = ()

    for class_path in settings.TH_SERVICES:
        class_name = class_path.rsplit('.', 1)[1]
        # 2nd array position contains the name of the service
        data = (class_name, class_name.rsplit('Service', 1)[1])
        all_datas = (data,) + all_datas
    return all_datas
29639
def status(name, sig=None):
    '''
    
    '''

    proxy_fn = 'dummy.service_status'
    resp = __proxy__[proxy_fn](name)
    if resp['comment'] == 'stopped':
        return False
    if resp['comment'] == 'running':
        return True
86181
def list_services(self):
        
        services = list(self.services.keys())
        services.sort()
        return services
505800
def status(self):
        
        orig_dict = self._get(self._service_url('status'))
        orig_dict['implementation_version'] = orig_dict.pop('Implementation-Version')
        orig_dict['built_from_git_sha1'] = orig_dict.pop('Built-From-Git-SHA1')
        return Status(orig_dict)
1291425
def status(name, sig=None):
    '''
    
    '''
    cmd = 'svstat {0}'.format(_service_path(name))
    out = __salt__['cmd.run_stdout'](cmd, python_shell=False)
    try:
        pid = re.search(r'\(pid (\d+)\)', out).group(1)
    except AttributeError:
        pid = ''
    return pid
579416
def get_all_services(self, view = None):
    
    return services.get_all_services(self._get_resource_root(), self.name, view)
542018
public static function getStatusList()
    {
        // @todo: check for a complete list of available CloudFront statuses
        return [
            self::STATUS_OK => 'Completed',
            self::STATUS_TO_SEND => 'STATUS_TO_SEND',
            self::STATUS_TO_FLUSH => 'STATUS_TO_FLUSH',
            self::STATUS_ERROR => 'STATUS_ERROR',
            self::STATUS_WAITING => 'InProgress',
        ];
    }
334971
async def get_status_info(self) -> Tuple[str, str, int]:
        """"""
        return await self.gateway.commands.GetStatusInfo()
163834
function checkStatus() {
  return server.ping(this, function(err, res) {
    if (err) {
      return out.error("error occurred: %j", err);
    }
    if (res.running) {
      return out.success("service running");
    }
    return out.error("service not running");
  });
}
1331893
def _computeStatus(self, dfile, service):
        """"""

        # If only one service requested
        if service:
            if not dfile['services'].has_key(service):
                return self.ST_UNTRACKED
            else:
                return dfile['services'][service]['status']

        # Otherwise go through all services and compute
        # a sensible status
        first_service_key=dfile['services'].keys()[0]

        # Save off one of the statuses so we can compute
        # if they are all the same between services.
        first_status=dfile['services'][first_service_key]['status']

        all_status_match=True

        # Return ST_COMPLICATED "C" if status
        # differs
        for service in dfile['services']:
            if dfile['services'][service]['status']!=first_status:
                return self.ST_COMPLICATED

        return first_status