#!/usr/bin/python

import sys
import glob

line = "%s\t" % (sys.argv[1])

files = glob.glob("*-server-memory.txt")

data = [int(x.strip()) for x in file(files[0]).readlines()]
data = max(data)

line = line + str(data) + "\t"

files = glob.glob("*-network.txt")

for f in files:
    if not f.endswith("-server-network.txt"):
        data = file(f).read()
        data = data.strip()

line = line + data

fp = file(sys.argv[2], "a")
fp.write(line + "\n")
