From 85380c4f7464a04769ac5c1f69e82e7db3d8234d Mon Sep 17 00:00:00 2001 From: Sandy Walsh Date: Wed, 28 Jan 2015 12:14:43 -0800 Subject: [PATCH] Fix silly mistake with api results. Was using the worker information. Not the api nodes. Change-Id: I66f36931ba4c53df49a62670e3cd60f17f22c7c2 --- bin/stv3_status.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/bin/stv3_status.py b/bin/stv3_status.py index a51e7ee..4e021cf 100644 --- a/bin/stv3_status.py +++ b/bin/stv3_status.py @@ -73,7 +73,7 @@ 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'"] + commands = ["ps auxww | grep -E 'yagi-event|pipeline_worker'"] for cell in cell_names: commands.append("tail --lines %s /var/log/stv3/yagi-%s.log" % (lines, cell)) @@ -88,16 +88,15 @@ for worker in worker_hostnames: o.write(ret[i+1]) for api in api_hostnames: - commands = ["ps aux | grep -E 'gunicorn'", - "tail --lines %s /var/log/stv3/gunicorn.log" % (lines, )) - ] + commands = ["ps auxww | grep gunicorn", + "tail --lines %s /var/log/stv3/gunicorn.log" % (lines, )] print "--- api: %s" % (api, ) - ret = ssh(worker, commands, username, password, port) + ret = ssh(api, commands, username, password, port) print ret[0] - print "Writing %s-gunicorn.log" % (worker,) - with open("%s-gunicorn.log" % (worker,), "w") as o: + print "Writing %s-gunicorn.log" % (api,) + with open("%s-gunicorn.log" % (api,), "w") as o: o.write(ret[1]) prefixes = '|'.join(queue_prefixes)