def gather_sample(self, stat_file):
        for line in stat_file:
            # We just look for the different "inuse" lines and output their
            # socket type along with the count.
            m = re.search('(\w+): inuse (\d+)', line)
            if m is not None:
                self.print_sample("app.net.sockets_in_use", int(m.group(2)),
                                  m.group(1).lower())
Gathers the metrics from the sockstat file.
dataset/ETHPy150Open scalyr/scalyr-agent-2/scalyr_agent/builtin_monitors/linux_process_metrics.py/SockStatReader.gather_sample