Commit 1661daab authored by Tom Ritter's avatar Tom Ritter
Browse files

Write out the newest scanner's timestamp instead of the last numerical scanner's timestamp

parent dd3d01fa
...@@ -855,10 +855,12 @@ def main(argv): ...@@ -855,10 +855,12 @@ def main(argv):
n_print = nodes.values() n_print = nodes.values()
n_print.sort(lambda x,y: int(y.pid_error*1000) - int(x.pid_error*1000)) n_print.sort(lambda x,y: int(y.pid_error*1000) - int(x.pid_error*1000))
scan_age = 0
for scanner in scanner_timestamps.iterkeys(): for scanner in scanner_timestamps.iterkeys():
scan_age = int(round(scanner_timestamps[scanner],0)) this_scan_age = int(round(scanner_timestamps[scanner],0))
if scan_age < time.time() - MAX_SCAN_AGE: scan_age = scan_age if scan_age > this_scan_age else this_scan_age
plog("WARN", "Bandwidth scanner "+scanner+" stale. Possible dead Timestamp: "+time.ctime(scan_age)) if this_scan_age < time.time() - MAX_SCAN_AGE:
plog("WARN", "Bandwidth scanner "+scanner+" stale. Possible dead Timestamp: "+time.ctime(this_scan_age))
out = file(argv[-1], "w") out = file(argv[-1], "w")
out.write(str(scan_age)+"\n") out.write(str(scan_age)+"\n")
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment