Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(51)

Unified Diff: utils/monitor.py

Issue 3294021: Increased threads to 50, added update timestamp for HTML pages. (Closed) Base URL: ssh://git@chromiumos-git//autotest.git
Patch Set: Increased timeout when creating graphics. Created 10 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/monitor.py
diff --git a/utils/monitor.py b/utils/monitor.py
index d205c1279337547ddda1f1bbe89c3f82dd3a4a25..71e9272aae6a6812cbc4d2d89da77d8daf3b61a6 100755
--- a/utils/monitor.py
+++ b/utils/monitor.py
@@ -156,8 +156,6 @@ class RemoteWorker(object):
def run(self):
- TB.hosts[self.h]['time'] = strftime(
- '%d%b%Y %H:%M:%S', localtime())
try:
self.client.connect(self.h, username='root',
key_filename=TB.privkey, timeout=TIMEOUT)
@@ -167,13 +165,15 @@ class RemoteWorker(object):
TB.hosts[self.h]['status'] = False
finally:
if TB.hosts[self.h]['status']:
- self.ReadRelease()
+ self.ReadRelease() # Must be done before UpdateRelease().
self.ReadFirmware()
self.UpdateRelease() # Must be done before ReadResources().
if TB.hosts[self.h]['status']:
self.ReadResources()
TB.logger.debug('Closing client for %s', self.h)
self.client.close()
+ TB.hosts[self.h]['time'] = strftime(
+ '%d%b%Y %H:%M:%S', localtime())
def ReadRelease(self):
@@ -266,7 +266,7 @@ class RemoteWorker(object):
lines.pop(lines.index(line))
if update_file:
- TB.logger.info('Updating %s', relfile)
+ TB.logger.debug('Updating %s', relfile)
shutil.move(relfile, tmpfile)
# Put the most recent update in the new file, and make the
# PTR key to point to it.
@@ -420,7 +420,7 @@ class Monitor(object):
if TB.graph:
# Graphing takes much longer, so increase the max runtime.
- maxtime = RUNTIME * 5
+ maxtime = RUNTIME * 6
else:
maxtime = RUNTIME
# Queue.join() will wait for all jobs in the queue to finish, or
@@ -751,6 +751,7 @@ class Resource(object):
newrow = True
f.write('</table><p>\n')
f.write('</center>\n')
+ f.write('<H5>Last Update: %s</H5>' % TB.hosts[hostname]['time'])
f.write('</BODY></HTML>')
f.close()
os.chmod(pathname[k], 0644)
@@ -779,6 +780,7 @@ class Resource(object):
f.write('</a></td></tr>\n')
f.write('</table><p>\n')
f.write('</center>\n')
+ f.write('<H5>Last Update: %s</H5>' % TB.hosts[hostname]['time'])
f.write('</BODY></HTML>')
f.close()
os.chmod(rrdfile, 0644)
@@ -1725,7 +1727,7 @@ def ParseArgs():
dest='log_to_stdout')
parser.add_option('--threads',
help='Number of threads to create [default: %default]',
- default=25,
+ default=50,
dest='threads')
parser.add_option('--update',
help='Collect data from hosts [default: %default]',
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698