stv3_status tweaks
More efficient calls. Proper outut. Change-Id: I2511e60cf084db48b88874f43764ce20b8f361c9
This commit is contained in:
parent
46bdb0f2e5
commit
a28a545e47
@ -72,16 +72,19 @@ lines = config.get('tail_lines', '100')
|
||||
queue_prefixes = config.get('queue_prefixes', ['monitor'])
|
||||
|
||||
for worker in worker_hostnames:
|
||||
commands = ["ps aux | grep -E 'yagi-event|pipeline_worker'"]
|
||||
for cell in cell_names:
|
||||
print "--- Worker: %s Cell: %s" % (worker, cell)
|
||||
ret = ssh(worker,
|
||||
["tail --lines %s /var/log/stv3/yagi-%s.log" %
|
||||
(lines, cell),
|
||||
"ps aux | grep -E 'yagi-event|pipeline_worker'"],
|
||||
username, password, port)
|
||||
with open("yagi-%s.log" % cell, "w") as o:
|
||||
o.write(ret[0])
|
||||
print ret[1]
|
||||
commands.append("tail --lines %s /var/log/stv3/yagi-%s.log" %
|
||||
(lines, cell))
|
||||
|
||||
print "--- worker: %s" % (worker, )
|
||||
ret = ssh(worker, commands, username, password, port)
|
||||
|
||||
print ret[0]
|
||||
for i, cell in enumerate(cell_names):
|
||||
print "Writing %s-yagi-%s.log" % (worker, cell)
|
||||
with open("%s-yagi-%s.log" % (worker, cell), "w") as o:
|
||||
o.write(ret[i+1])
|
||||
|
||||
prefixes = '|'.join(queue_prefixes)
|
||||
for rabbit in rabbit_hostnames:
|
||||
|
Loading…
x
Reference in New Issue
Block a user