Retrieve the status of a service `name` or all services
        for the current init system.
431681
def status(self, **kwargs):
        
        self.services = dict(
            init_system=self.init_system,
            services=[]
        )
851351
public final ServiceStatusType getServiceStatus(){
    	//Initial value for status just in case "true" of "false" is not found
		ServiceStatusType serviceStatus = ServiceStatusType.UNKNOWN;
    	if ("true".equals(status)){
    		serviceStatus = ServiceStatusType.RUNNING;
    	} else if ("false".equals(status)){
    		serviceStatus = ServiceStatusType.STOPPED;
    	}		    	
    	return serviceStatus;
	}
974904
def service_available(service_name):
    """"""
    try:
        subprocess.check_output(
            ['service', service_name, 'status'],
            stderr=subprocess.STDOUT).decode('UTF-8')
    except subprocess.CalledProcessError as e:
        return b'unrecognized service' not in e.output
    else:
        return True
957192
def is_ready(self, service_name):
        
        service = self.get_service(service_name)
        reqs = service.get('required_data', [])
        return all(bool(req) for req in reqs)
855754
def get_state(self) -> str:
        """"""
        xdoc = self.connection.soap_action('/ws/ControllerService',
                                           'getState', "")
        if xdoc:
            return xdoc.find('./SOAP-ENV:Body/ns1:getState1/ns1:state',
                             IHCSoapClient.ihcns).text
        return False
161898
def get_service_enabled(self, name, accounts_list=None, search_filter=None, region=None):
        """"""
        if not accounts_list:
            accounts = self.get_all(search_filter=search_filter)
        else:
            accounts = accounts_list

        if self.version == 1:
            accounts = accounts['accounts']

        enabled = []
        for account in accounts:
            if self.version == 1:
                account_filter = "accounts[?id=='{id}']".format(id=account['id'])
            else:
                account_filter = "[?id=='{id}']".format(id=account['id'])

            service = self.get_service(name, search_filter=account_filter)

            if self.version == 1:
                if service:
                    service = service['enabled']  # no region information available in v1
            else:
                if not region:
                    service_filter = "status[?enabled]"
                else:
                    service_filter = "status[?(region=='{region}' || region=='all') && enabled]".format(region=region)

                service = jmespath.search(service_filter, service)

            if service:
                enabled.append(account)

        return enabled
1083950
def get_service(self, name):
    
    return services.get_service(self._get_resource_root(), name, self.name)
1164388
def status(self, all_instances=None, instance_ids=None, filters=None):
        """"""
        params = {}
        if filters:
            params["filters"] = make_filters(filters)
        if instance_ids:
            params['InstanceIds'] = instance_ids
        if all_instances is not None:
            params['IncludeAllInstances'] = all_instances
        statuses = self.call("DescribeInstanceStatus",
                             response_data_key="InstanceStatuses",
                             **params)
        return statuses
119544
def get_interfaces_status():
    """"""
    status = {}
    for driverClass in CLASSES:
        try:
            instance = driverClass()
            status[instance.get_name()] = instance.get_status()
        except Exception:
            raise
    return status
1198061
def get_instantiated_service(self, name):
        
        if name not in self.instantiated_services:
            raise UninstantiatedServiceException
        return self.instantiated_services[name]
891781
def status(name, init_system, verbose):
    
    try:
        status = Serv(init_system, verbose=verbose).status(name)
    except ServError as ex:
        sys.exit(ex)
    click.echo(json.dumps(status, indent=4, sort_keys=True))
1246725
def set_status(self, name, status):
        
        getattr(self.system, name).status = status
        return True
936935
def get_status(self):
        

        try:
            api_response = self.api.read_namespaced_service_status(self.name, self.namespace)
        except ApiException as e:
            raise ConuException(
                "Exception when calling Kubernetes API - read_namespaced_service_status: %s\n" % e)

        return api_response.status
88412
def do_status(self, service):
        
        if service:
            self.do_show("services", single=service)
        else:
            self.do_show("services")
1304600
def get_short_status(self, hosts, services):
        
        mapping = {
            0: "O",
            1: "W",
            2: "C",
            3: "U",
            4: "N",
        }
        if self.got_business_rule:
            return mapping.get(self.business_rule.get_state(hosts, services), "n/a")

        return mapping.get(self.state_id, "n/a")
334971
async def get_status_info(self) -> Tuple[str, str, int]:
        """"""
        return await self.gateway.commands.GetStatusInfo()
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)