#!/usr/bin/env python

import MySQLdb
import sys

if __name__ == '__main__':
    if len(sys.argv) == 1:
        usage()
        sys.exit(1)
    node = sys.argv[1]
    filesMonitoring = MySQLdb.connect( 'ippc11.ipp.ifa.hawaii.edu',
                                       'ippuser', 'ipp',
                                       'FilesMonitoring' )
    letters = '0123456789abcdef'
    for letter1 in letters:
        for letter2 in letters:
            query = 'SHOW CREATE TABLE Files_%s_%s%s;' % ( node,
                                                           letter1,
                                                           letter2 )
            cursor = filesMonitoring.cursor()
            cursor.execute(query)
            rows = cursor.fetchall()
            cursor.close()
            print rows[0][1].replace('\n', '\\n');
