A collection of logging subsystem statuses
        
        :rtype: Status
165136
def logging_subsystem(self):
        
        for item in self:
            if item.name.startswith('Logging'):
                for s in item_status(item):
                    yield s
200739
def read_pid_status(pid="self"):
    
    data = {}
    with open("/proc/%s/status" % (pid,), "rb") as status_file:
        for row in status_file:
            fields = row.split()
            if fields and fields[0] in [b"VmRSS:", b"Threads:", b"FDSize:"]:
                try:
                    data[fields[0].decode("ascii")[:-1]] = int(fields[1])
                except ValueError:
                    data[fields[0].decode("ascii")[:-1]] = fields[1].decode("ascii")
    return data
498014
def status(self):
        
        return {
            self.original: {
                'formatted_filename': self.out_location,
                'state': self.state,
                'messages': '\n\t'.join(self.messages),
            }
        }
472570
def hardware_status(self):
        
        result = self.make_request(
            NodeCommandFailed,
            resource='appliance_status')
        return HardwareStatus(result.get('hardware_statuses', []))
349211
def get_load_status(self):
        
        url, method = self.command_set['daemonstatus'][0], self.command_set['daemonstatus'][1]
        response = http_utils.request(url, method_type=method, return_type=http_utils.RETURN_JSON)
        if response is None:
            logging.warning('%s failure: not found or connection fail' % sys._getframe().f_code.co_name)
            response = DaemonStatus().__dict__
        return response
219068
def status(app_name=None, only_cozy=False, as_boolean=False):
    '''
    '''
    apps = {}
    # Get all apps status & slip them
    apps_status = subprocess.Popen('cozy-monitor status',
                                   shell=True,
                                   stdout=subprocess.PIPE).stdout.read()
    apps_status = apps_status.split('\n')

    # Parse result to store them in apps dictionary
    for app_status in apps_status:
        if app_status:
            app_status = ANSI_ESCAPE.sub('', app_status).split(': ')
            if len(app_status) == 2:
                current_status = app_status[1]
                if as_boolean:
                    if app_status[1] == 'up':
                        current_status = True
                    else:
                        current_status = False
                if only_cozy and app_status[0] not in SYSTEM_APPS:
                    apps[app_status[0]] = current_status
                else:
                    apps[app_status[0]] = current_status

    # Return app status if get as param or return all apps status
    if app_name:
        return apps.get(app_name, None)
    else:
        return apps
285480
def check_status(self):
        """"""
        # Recompute the status of the tasks
        # Ignore OK and LOCKED tasks.
        for task in self:
            if task.status in (task.S_OK, task.S_LOCKED): continue
            task.check_status()

        # Take into account possible dependencies. Use a list instead of generators
        for task in self:
            if task.status == task.S_LOCKED: continue
            if task.status < task.S_SUB and all(status == task.S_OK for status in task.deps_status):
                task.set_status(task.S_READY, "Status set to Ready")
49106
def log_status(plugin, filename, status):
    ''''''
    display = ':'.join((plugin, filename)) + ' '
    log.info('%s [%s]', '{:.<70}'.format(display), status)
265551
def status(deps=DEPENDENCIES, linesep=os.linesep):
    """"""
    maxwidth = 0
    col1 = []
    col2 = []
    for dependency in deps:
        title1 = dependency.modname
        title1 += ' ' + dependency.required_version
        col1.append(title1)
        maxwidth = max([maxwidth, len(title1)])
        col2.append(dependency.get_installed_version())
    text = ""
    for index in range(len(deps)):
        text += col1[index].ljust(maxwidth) + ':  ' + col2[index] + linesep
    return text[:-1]
44349
def _update_statuses(self, sub_job_num=None):
        
        # initialize status dictionary
        status_dict = dict()

        for val in CONDOR_JOB_STATUSES.values():
            status_dict[val] = 0

        for node in self.node_set:
            job = node.job
            try:
                job_status = job.status
                status_dict[job_status] += 1
            except (KeyError, HTCondorError):
                status_dict['Unexpanded'] += 1

        return status_dict
521637
def getStatus(self):
    """"""
    command = '$GS'
    status = self.sendCommand(command)
    return states[int(status[1])]
168846
def status(logger):
    
    aborted = logger.get_aborted_actions()
    succeeded = logger.get_succeeded_actions()
    total = aborted + succeeded
    if total == 0:
        return 'No actions done'
    elif total == 1 and succeeded == 1:
        return 'One action done (succeeded)'
    elif total == 1 and succeeded == 0:
        return 'One action done (failed)'
    elif total == succeeded:
        return '%d actions total (all succeeded)' % total
    elif succeeded == 0:
        return '%d actions total (all failed)' % total
    else:
        msg = '%d actions total (%d failed, %d succeeded)'
        return msg % (total, aborted, succeeded)
745533
def status(self):
        
        if 'sandbox_type' in self.engine.data:
            if self.engine.sandbox_type == 'none':
                return False
            return True
        return False
632289
function status() {
  var tasks = [],
      cwd = process.cwd();

  findRepos(function(err, repos) {
    if (err) return console.log(err);
    repos.forEach(function(repo) {
      tasks.push(function(done) {
        repo.status(function(err, status) {
          if (err) return done(err);
          if (argv.b) {
            repo.branch(function(err, head) {
              if (err) return done(err);
              done(null, {status: status, head: head});
            });
          }
          else {
            done(null, {status: status});
          }
        });
      });
    });
    async.series(tasks, function(err, results) {
      if (err) return console.log(err);

      var row,
          col,
          res,
          file,
          head = [],
          table,
          symbol;

      head.push('Repo');
      if (argv.b) {
        head.push('Branch');
      }
      head.push('Status');

      table = new Table({
        head: head,
        style: {
          compact: true,
          'padding-left': 1,
          'padding-right': 1,
          head: ['white', 'bold']
        }
      });

      results.forEach(function(res) {
        var row = [];

        row.push(res.status.repo.path.replace(cwd + '/', ''));
        if (argv.b) {
          row.push(res.head.name);
        }
        row.push(res.status.clean ? 'Clean'.green : 'Changed'.red);
        table.push(row);

        if (argv.v) {
          for (var name in res.status.files) {
            row = [];
            row.push('');
            if (argv.b) {
              row.push('');
            }
            switch (res.status.files[name].type) {
              case 'A':
                symbol = '+'.green; break;
              case 'D':
                symbol = '-'.red; break;
              case 'M':
                symbol = '*'.yellow; break;
              default:
                symbol = '~'.grey; break;
            }
            row.push(' ' + symbol + ' ' + name);
            table.push(row);
          }
        }
      });

      console.log(table.toString());
    });
  });
}
1265599
def get_exitstatus(self):
        
        logger.debug("Exit status is {0}".format(self._spawn.exitstatus))
        return self._spawn.exitstatus
173630
def _check_status(sdp_state):
    
    try:
        errval = "error"
        errdict = dict(state="unknown", reason="unknown")
        if sdp_state.current_state == "unknown":
            errdict['reason'] = 'database not initialised.'
            LOG.debug('Current state is unknown;')
            LOG.debug('Target state is %s;', sdp_state.target_state)
            LOG.debug('Current state timestamp is %s;',
                      sdp_state.current_timestamp)
        elif sdp_state.current_state is None:
            errdict['reason'] = 'Master Controller Services may have died.'
            LOG.debug('Current state is NONE;')
            LOG.debug('Target state is %s;', sdp_state.target_state)
            LOG.debug('Current state timestamp is %s;',
                      sdp_state.current_timestamp)
        elif sdp_state.target_state is None:
            errdict['reason'] = 'Master Controller Services may have died.'
            LOG.debug('Current state is  %s;',
                      sdp_state.current_state)
            LOG.debug('Target state is NONE;')
            LOG.debug('Current state timestamp is %s;',
                      sdp_state.current_timestamp)
            LOG.debug('Target state timestamp is %s;',
                      sdp_state.target_timestamp)
        elif sdp_state.current_timestamp is None:
            errdict['reason'] = 'Master Controller Services may have died.'
            LOG.debug('Current state is  %s;',
                      sdp_state.current_state)
            LOG.debug('Target state is %s;', sdp_state.target_state)
            LOG.debug('Current state timestamp is NONE')
            LOG.debug('Target state timestamp is %s;',
                      sdp_state.target_timestamp)
        elif sdp_state.target_timestamp is None:
            errdict['reason'] = 'Master Controller Services may have died.'
            LOG.debug('Current state is  %s;',
                      sdp_state.current_state)
            LOG.debug('Target state is %s;', sdp_state.target_state)
            LOG.debug('Current state timestamp is %s;',
                      sdp_state.current_timestamp)
            LOG.debug('Target state timestamp is NONE')
        elif sdp_state.current_timestamp < sdp_state.target_timestamp:
            errdict['reason'] = \
                'Timestamp for Master Controller Services is stale.'
            LOG.debug('Current state is  %s;',
                      sdp_state.current_state)
            LOG.debug('Target state is %s;', sdp_state.target_state)
            LOG.debug('Current state timestamp is %s;',
                      sdp_state.current_timestamp)
            LOG.debug('Target state timestamp is %s;',
                      sdp_state.target_timestamp)
        else:
            errval = "okay"
    except ConnectionError as err:
        errdict['reason'] = err
        LOG.debug('Connection Error %s', err)
    return errval, errdict
134932
def GetStatusInformation(self):
    
    status = processing_status.TasksStatus()

    with self._lock:
      status.number_of_abandoned_tasks = len(self._tasks_abandoned)
      status.number_of_queued_tasks = len(self._tasks_queued)
      status.number_of_tasks_pending_merge = (
          len(self._tasks_pending_merge) + len(self._tasks_merging))
      status.number_of_tasks_processing = len(self._tasks_processing)
      status.total_number_of_tasks = self._total_number_of_tasks

    return status