Esempio n. 1
0
 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'])))
Esempio n. 2
0
 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'])))
Esempio n. 3
0
    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)
Esempio n. 4
0
 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'])))
Esempio n. 5
0
 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'])))
Esempio n. 6
0
    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)
Esempio n. 7
0
 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'])))