get the key's info stats

        :param name: str     the name of the redis key
        :param subcommand: REFCOUNT | ENCODING | IDLETIME
        :return: Future()
551218
def object(self, infotype, key):
        
        with self.pipe as pipe:
            return pipe.object(infotype, self.redis_key(key))
434542
def _get_stats_from_socket(self, name):
        
        try:
            json_blob = subprocess.check_output(
                [self.config['ceph_binary'],
                 '--admin-daemon',
                 name,
                 'perf',
                 'dump',
                 ])
        except subprocess.CalledProcessError as err:
            self.log.info('Could not get stats from %s: %s',
                          name, err)
            self.log.exception('Could not get stats from %s' % name)
            return {}

        try:
            json_data = json.loads(json_blob)
        except Exception as err:
            self.log.info('Could not parse stats from %s: %s',
                          name, err)
            self.log.exception('Could not parse stats from %s' % name)
            return {}

        return json_data
464931
def get_subkey(self,name):
        
        subkey = Key(name,self)
        try:
            hkey = subkey.hkey
        except WindowsError:
            raise AttributeError("subkey '%s' does not exist" % (name,))
        return subkey
99698
def callback_liveOut_pipe_in(named_count, state_uid, **kwargs):
    ''

    cache_key = _get_cache_key(state_uid)
    state = cache.get(cache_key)

    # If nothing in cache, prepopulate
    if not state:
        state = {}

    # Guard against missing input on startup
    if not named_count:
        named_count = {}

    # extract incoming info from the message and update the internal state
    user = named_count.get('user', None)
    click_colour = named_count.get('click_colour', None)
    click_timestamp = named_count.get('click_timestamp', 0)

    if click_colour:
        colour_set = state.get(click_colour, None)

        if not colour_set:
            colour_set = [(None, 0, 100) for i in range(5)]

        _, last_ts, prev = colour_set[-1]

        # Loop over all existing timestamps and find the latest one
        if not click_timestamp or click_timestamp < 1:
            click_timestamp = 0

            for _, the_colour_set in state.items():
                _, lts, _ = the_colour_set[-1]
                if lts > click_timestamp:
                    click_timestamp = lts

            click_timestamp = click_timestamp + 1000

        if click_timestamp > last_ts:
            colour_set.append((user, click_timestamp, prev * random.lognormvariate(0.0, 0.1)),)
            colour_set = colour_set[-100:]

        state[click_colour] = colour_set
        cache.set(cache_key, state, 3600)

    return "(%s,%s)" % (cache_key, click_timestamp)
1223546
def stats(self, key=None):
        
        # TODO: Stats with key is not working.

        returns = {}
        for server in self.servers:
            returns[server.server] = server.stats(key)

        return returns
413418
def subcommand(self, command_name=None):
        
        def wrapper(decorated):
            cmd_name = command_name or decorated.__name__
            subparser = self.subparsers.add_parser(cmd_name,
                                                   description=decorated.__doc__)
            for args, kwargs in describe_arguments(decorated):
                subparser.add_argument(*args, **kwargs)
            subparser.set_defaults(func=decorated)
            return decorated
        return wrapper
447838
def info(name):
    '''
    
    '''
    try:
        data = pwd.getpwnam(name)
        return {'name': data.pw_name,
                'passwd': data.pw_passwd,
                'account_created': get_account_created(name),
                'login_failed_count': get_login_failed_count(name),
                'login_failed_last': get_login_failed_last(name),
                'lstchg': get_last_change(name),
                'max': get_maxdays(name),
                'expire': get_expire(name),
                'change': get_change(name),
                'min': 'Unavailable',
                'warn': 'Unavailable',
                'inact': 'Unavailable'}

    except KeyError:
        log.debug('User not found: %s', name)
        return {'name': '',
                'passwd': '',
                'account_created': '',
                'login_failed_count': '',
                'login_failed_last': '',
                'lstchg': '',
                'max': '',
                'expire': '',
                'change': '',
                'min': '',
                'warn': '',
                'inact': ''}
556721
def getbit(self, name, offset):
        
        with self.pipe as pipe:
            return pipe.getbit(self.redis_key(name), offset)
928657
def get_command(self, name):
        
        name = adapt_name_for_rest(name)
        url = '/mdb/{}/commands{}'.format(self._instance, name)
        response = self._client.get_proto(url)
        message = mdb_pb2.CommandInfo()
        message.ParseFromString(response.content)
        return Command(message)
58882
def getStats(self):
        
        info_dict = {}
        args = [varnishstatCmd, '-1']
        if self._instance is not None:
            args.extend(['-n', self._instance])
        output = util.exec_command(args)
        if self._descDict is None:
            self._descDict = {}
        for line in output.splitlines():
            mobj = re.match('(\S+)\s+(\d+)\s+(\d+\.\d+|\.)\s+(\S.*\S)\s*$', 
                            line)
            if mobj:
                fname = mobj.group(1).replace('.', '_')
                info_dict[fname] = util.parse_value(mobj.group(2))
                self._descDict[fname] = mobj.group(4)
        return info_dict
244379
def pttl(self, key):
        
        """
        Returns time to live in milliseconds if output_ms is True, else returns seconds.
        """
        key = self._encode(key)
        if key not in self.redis:
            # as of redis 2.8, -2 is returned if the key does not exist
            return long(-2) if self.strict else None
        if key not in self.timeouts:
            # as of redis 2.8, -1 is returned if the key is persistent
            # redis-py returns None; command docs say -1
            return long(-1) if self.strict else None

        time_to_live = get_total_milliseconds(self.timeouts[key] - self.clock.now())
        return long(max(-1, time_to_live))
802760
function getKeyDetailsString (key, redisConnection, data, next) {
  redisConnection.get(key, function (err, val) {
    if (err) {
      api.log('getRedisString: ' + err, 'error');
    }

    var details = {
      key: key,
      type: 'string',
      value: val
    };
    
    data.response.details = details;
    next();
  });
}
921719
def info(name):
    '''
    
    '''
    try:
        grinfo = grp.getgrnam(name)
    except KeyError:
        return {}
    else:
        return {'name': grinfo.gr_name,
                'passwd': grinfo.gr_passwd,
                'gid': grinfo.gr_gid,
                'members': grinfo.gr_mem}
720066
def GetSubkeyByName(self, name):
    
    if not self._registry_key and self._registry:
      self._GetKeyFromRegistry()

    return self._subkeys.get(name.upper(), None)
1027998
def qstat(self, queue_name, return_dict=False):
        
        rtn = self.execute_command('QSTAT', queue_name)

        if return_dict:
            grouped = self._grouper(rtn, 2)
            rtn = dict((a, b) for a, b in grouped)

        return rtn
1058166
def incrby(self, name, amount=1):
        
        with self.pipe as pipe:
            return pipe.incrby(self.redis_key(name), amount=amount)
1008837
def get_info(self, key=None, Id=None) -> dict:
        """"""
        if key is not None:
            Id = self[key].Id
        return self.infos.get(Id,{})