(self, name)
return json_data
Return the parsed JSON data returned when ceph is told to
        dump the stats from the named socket.

        In the event of an error error, the exception is logged, and
        an empty result set is returned.
Return the parsed JSON data returned when ceph is told to
        dump the stats from the named socket.
Return the parsed JSON data returned when ceph is told to dump the stats from the named socket .
def _get_stats_from_socket(self, name):
        """Return the parsed JSON data returned when ceph is told to
        dump the stats from the named socket.

        In the event of an error error, the exception is logged, and
        an empty result set is returned.
        """
        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
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