def getStats(self):
info_dict = {}<EOL>args = [varnishstatCmd, '<STR_LIT>']<EOL>if self._instance is not None:<EOL><INDENT>args.extend(['<STR_LIT>', self._instance])<EOL><DEDENT>output = util.exec_command(args)<EOL>if self._descDict is None:<EOL><INDENT>self._descDict = {}<EOL><DEDENT>for line in output.splitlines():<EOL><INDENT>mobj = re.match('<STR_LIT>', <EOL>line)<EOL>if mobj:<EOL><INDENT>fname = mobj.group(<NUM_LIT:1>).replace('<STR_LIT:.>', '<STR_LIT:_>')<EOL>info_dict[fname] = util.parse_value(mobj.group(<NUM_LIT:2>))<EOL>self._descDict[fname] = mobj.group(<NUM_LIT:4>)<EOL><DEDENT><DEDENT>return info_dict<EOL>
Runs varnishstats command to get stats from Varnish Cache.

        @return: Dictionary of stats.