diff --git a/tdf b/tdf index 73117e3f135cf7f495773c3345727a8f90fa9bcf..184a68cde90244ad5b36fa232800b927f10384e6 100755 --- a/tdf +++ b/tdf @@ -8,7 +8,7 @@ import pprint CSV_HEADER='Taiga Mount,Allocation(TB),Used(KB),BlockSoft(KB),BlockHard(KB),BlockGrace,Files,FilesSoft,FilesHard,FilesGrace' -HOST='taiga-exp01.ncsa.illinois.edu' +HOST='taiga-nfs.ncsa.illinois.edu' PORT=5555 options = {} @@ -59,6 +59,10 @@ def print_help(): This utility will print out the usage information for your mapped Taiga exports: + > ./tdf + Taiga Export Alloc(kbytes) Quota(kbytes) Used(kbytes) Avail(kbytes) Use% Files + /taiga/ncsa/cavl 161061273600 161061273600 111208277820 49852995780 69% 22952882 + > ./tdf -h Taiga Export Alloc(T) Quota(T) Used(T) Avail(T) Use% Files /taiga/ncsa/cavl 150 150.0 103.5 46.5 69% 22931759 @@ -84,9 +88,13 @@ if __name__ == '__main__': sys.exit(1) # Establish the connection and receive the data - with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s: - s.connect((HOST, PORT)) - data = s.recv(4096) + try: + with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s: + s.connect((HOST, PORT)) + data = s.recv(4096) + except: + print("Error Connecting To: %s : %s" % ( HOST, PORT) ) + sys.exit(1) for line in data.splitlines(): lined = line.decode()