Skip to content
Snippets Groups Projects
Commit e6060c13 authored by Chad Kerner's avatar Chad Kerner
Browse files

cleaned up output

parent bbfaae41
No related branches found
No related tags found
No related merge requests found
......@@ -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()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment