Handle multiple nodes in cluster
This commit is contained in:
parent
35840b9eb7
commit
e6719ab571
5 changed files with 295 additions and 237 deletions
|
|
@ -48,6 +48,9 @@ def insert_wh_into_logfile(path, site, user, psw):
|
|||
logs = []
|
||||
records = {}
|
||||
for line in lines[1:]:
|
||||
if line[0] in "#\n":
|
||||
logs.append({"comment": line})
|
||||
continue
|
||||
cols = line.removesuffix("\n").split(" ")
|
||||
log = {}
|
||||
for col in range(len(cols)):
|
||||
|
|
@ -61,6 +64,9 @@ def insert_wh_into_logfile(path, site, user, psw):
|
|||
outfile = open(path+"-wh", "w")
|
||||
outfile.write(lines[0])
|
||||
for log in logs:
|
||||
if "comment" in log:
|
||||
outfile.write(log["comment"])
|
||||
continue
|
||||
line = ""
|
||||
for col in colnames:
|
||||
if line != "":
|
||||
|
|
@ -97,7 +103,7 @@ def get_psw():
|
|||
return psw
|
||||
|
||||
def main():
|
||||
if len(sys.argv) < 5:
|
||||
if len(sys.argv) < 4:
|
||||
print("Usage:")
|
||||
print("python g5watt.py <user> <site> <logfile_path>")
|
||||
exit(0)
|
||||
|
|
|
|||
Loading…
Reference in a new issue