def get(self, cluster, environ, topology, instance): pplan = yield access.get_physical_plan(cluster, environ, topology) host = pplan['stmgrs'][pplan['instances'][instance]['stmgrId']]['host'] result = json.loads((yield access.get_instance_mem_histogram( cluster, environ, topology, instance))) self.write('<pre><br/>$%s>: %s<br/><br/>%s</pre>' % ( host, tornado.escape.xhtml_escape(result['command']), tornado.escape.xhtml_escape(result['stdout'])))
def get(self, cluster, environ, topology, instance): pplan = yield access.get_physical_plan(cluster, environ, topology) host = pplan['stmgrs'][pplan['instances'][instance]['stmgrId']]['host'] result = json.loads((yield access.run_instance_jmap( cluster, environ, topology, instance))) notes = "<br/>\n".join([ "* May Take longer than usual (1-2 min) please be patient." "* Use scp to copy heap dump files from host. (scp %s:/tmp/heap.bin /tmp/)" % host]) self.write('<pre>%s<br/>$%s>: %s<br/><br/>%s</pre>' % ( notes, host, tornado.escape.xhtml_escape(result['command']), tornado.escape.xhtml_escape(result['stdout'])))
def get(self, cluster, environ, topology): start_time = time.time() pplan = yield access.get_physical_plan(cluster, environ, topology) result_map = dict( status = "success", message = "", version = common.VERSION, executiontime = time.time() - start_time, result = pplan ) self.write(result_map)
def get(self, cluster, environ, topology, instance): ''' :param cluster: :param environ: :param topology: :param instance: :return: ''' pplan = yield access.get_physical_plan(cluster, environ, topology) host = pplan['stmgrs'][pplan['instances'][instance]['stmgrId']]['host'] result = json.loads((yield access.get_instance_jstack( cluster, environ, topology, instance))) self.write('<pre><br/>$%s>: %s<br/><br/>%s</pre>' % ( host, tornado.escape.xhtml_escape(result['command']), tornado.escape.xhtml_escape(result['stdout'])))
def get(self, cluster, environ, topology, instance): ''' :param cluster: :param environ: :param topology: :param instance: :return: ''' pplan = yield access.get_physical_plan(cluster, environ, topology) host = pplan['stmgrs'][pplan['instances'][instance]['stmgrId']]['host'] result = json.loads( (yield access.get_instance_mem_histogram(cluster, environ, topology, instance))) self.write('<pre><br/>$%s>: %s<br/><br/>%s</pre>' % (host, tornado.escape.xhtml_escape(result['command']), tornado.escape.xhtml_escape(result['stdout'])))
def get(self, cluster, environ, topology): ''' :param cluster: :param environ: :param topology: :return: ''' start_time = time.time() pplan = yield access.get_physical_plan(cluster, environ, topology) result_map = dict(status="success", message="", version=common.VERSION, executiontime=time.time() - start_time, result=pplan) self.write(result_map)
def get(self, cluster, environ, topology, instance): ''' :param cluster: :param environ: :param topology: :param instance: :return: ''' pplan = yield access.get_physical_plan(cluster, environ, topology) host = pplan['stmgrs'][pplan['instances'][instance]['stmgrId']]['host'] result = json.loads( (yield access.run_instance_jmap(cluster, environ, topology, instance))) notes = "<br/>\n".join([ "* May Take longer than usual (1-2 min) please be patient." "* Use scp to copy heap dump files from host. (scp %s:/tmp/heap.bin /tmp/)" % host ]) self.write( '<pre>%s<br/>$%s>: %s<br/><br/>%s</pre>' % (notes, host, tornado.escape.xhtml_escape(result['command']), tornado.escape.xhtml_escape(result['stdout'])))