Returns the status of this router

        :returns: inactive, shutting down, running or suspended.
429862
def get_status(self):
        

        status = yield from self._hypervisor.send('vm get_status "{name}"'.format(name=self._name))
        if len(status) == 0:
            raise DynamipsError("Can't get vm {name} status".format(name=self._name))
        return self._status[int(status[0])]
1180191
@Transient
    public String getStatus()
    {
        if(hasFailed()) return FAILED; 
        if(hasSucceeded()) return SUCCESS; 
        if(ignored != 0) return IGNORED; 
        return NOT_RUNNED; 
    }
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
1265599
def get_exitstatus(self):
        
        logger.debug("Exit status is {0}".format(self._spawn.exitstatus))
        return self._spawn.exitstatus
885842
def status(self):
        
        message = self.end_message if self.end_message else self.start_message
        if message:
            return message.contents[ACTION_STATUS_FIELD]
        else:
            return None
976828
def status(self):
        """"""
        my_name = os.path.basename(sys.argv[0])
        if self._already_running():
            message = "{0} (pid  {1}) is running...\n".format(my_name, self.pid)
            sys.stdout.write(message)
            return 0
        sys.stdout.write("{0} is stopped\n".format(my_name))
        return 3
435807
def status(self, indices=None):
        
        path = self.conn._make_path(indices, (), '_status', allow_all_indices=False)
        return self.conn._send_request('GET', path)
745533
def status(self):
        
        if 'sandbox_type' in self.engine.data:
            if self.engine.sandbox_type == 'none':
                return False
            return True
        return False
920429
protected function currentStatus()
    {
        if (! $masters = app(MasterSupervisorRepository::class)->all()) {
            return 'inactive';
        }

        return collect($masters)->contains(function ($master) {
            return $master->status === 'paused';
        }) ? 'paused' : 'running';
    }
521637
def getStatus(self):
    """"""
    command = '$GS'
    status = self.sendCommand(command)
    return states[int(status[1])]
1317917
def get_status(self, hosts, services):
        
        if self.got_business_rule:
            mapping = {
                0: "UP",
                1: "DOWN",
                4: "UNREACHABLE",
            }
            return mapping.get(self.business_rule.get_state(hosts, services), "n/a")

        return self.state
105308
def is_running(self):
        
        return self._process.state() in [self._process.Running, self._process.Starting]
258794
def device_status(self):
        """"""
        return {
            'active': self.device['active'],
            'offline': self.device['offline'],
            'last_update': self.last_update,
            'battery_level': self.battery_level,
        }
1003537
def suspend(self):
        

        status = yield from self.get_status()
        if status == "running":
            yield from self._hypervisor.send('vm suspend "{name}"'.format(name=self._name))
            self.status = "suspended"
            log.info('Router "{name}" [{id}] has been suspended'.format(name=self._name, id=self._id))
953485
def get_status(self, hosts, services):
        

        if self.got_business_rule:
            mapping = {
                0: u'OK',
                1: u'WARNING',
                2: u'CRITICAL',
                3: u'UNKNOWN',
                4: u'UNREACHABLE',
            }
            return mapping.get(self.business_rule.get_state(hosts, services), "n/a")

        return self.state
813419
def _get_vm_status(self):
        

        result = yield from self._control_vm("info status", [
            b"debug", b"inmigrate", b"internal-error", b"io-error",
            b"paused", b"postmigrate", b"prelaunch", b"finish-migrate",
            b"restore-vm", b"running", b"save-vm", b"shutdown", b"suspended",
            b"watchdog", b"guest-panicked"
        ])
        if result is None:
            return result
        status = result.rsplit(' ', 1)[1]
        if status == "running" or status == "prelaunch":
            self.status = "started"
        elif status == "suspended":
            self.status = "suspended"
        elif status == "shutdown":
            self.status = "stopped"
        return status
507326
def do_status(self):
        
        
        # Get the PID of the service
        pid    = self.pid.get()
        
        # Status color / attributes
        status_color  = 'green' if pid else 'red'
        status_dot    = self._colorize(UNICODE['dot'], status_color, encode=True)
        
        # Active text
        active_txt    = {
            'active':   '{} since {}'.format(self._colorize('active (running)', 'green'), self.pid.birthday()[1]),
            'inactive': 'inactive (dead)'
        }
        
        # Print the status message
        print(status_dot, end=' ')
        print('{}.service - LSB: {}'.format(self.name, self.desc))
        print('   Loaded: loaded (/etc/init.d/{})'.format(self.name))
        print('   Active: {}'.format(active_txt['active' if pid else 'inactive']))
        
        # Extra information if running
        if pid:
            ps = self.pid.ps()
            print('  Process: {}; [{}]'.format(pid, ps[0]))
            if ps[1]:
                for c in ps[1]:
                    print('    Child: {}'.format(c))
        print('')