def get_stats(self, stat_args = None):
data = []<EOL>for s in self.servers:<EOL><INDENT>if not s.connect(): continue<EOL>if s.family == socket.AF_INET:<EOL><INDENT>name = '<STR_LIT>' % ( s.ip, s.port, s.weight )<EOL><DEDENT>elif s.family == socket.AF_INET6:<EOL><INDENT>name = '<STR_LIT>' % ( s.ip, s.port, s.weight )<EOL><DEDENT>else:<EOL><INDENT>name = '<STR_LIT>' % ( s.address, s.weight )<EOL><DEDENT>if not stat_args:<EOL><INDENT>s.send_cmd('<STR_LIT>')<EOL><DEDENT>else:<EOL><INDENT>s.send_cmd('<STR_LIT>' + stat_args)<EOL><DEDENT>serverData = {}<EOL>data.append(( name, serverData ))<EOL>readline = s.readline<EOL>while <NUM_LIT:1>:<EOL><INDENT>line = readline()<EOL>if not line or line.strip() in ('<STR_LIT>', '<STR_LIT>'):<EOL><INDENT>break<EOL><DEDENT>stats = line.split('<STR_LIT:U+0020>', <NUM_LIT:2>)<EOL>serverData[stats[<NUM_LIT:1>]] = stats[<NUM_LIT:2>]<EOL><DEDENT><DEDENT>return(data)<EOL>
Get statistics from each of the servers.

        @param stat_args: Additional arguments to pass to the memcache
            "stats" command.

        @return: A list of tuples ( server_identifier, stats_dictionary ).
            The dictionary contains a number of name/value pairs specifying
            the name of the status field and the string value associated with
            it.  The values are not converted from strings.