jvm_collector.py 文件源码

python
阅读 19 收藏 0 点赞 0 评论 0

项目:ops_agent 作者: sjqzhang 项目源码 文件源码
def start_jstatus_process(self, java_bin):
        self.jstatus_jvm_option = self.get_jvm_option(java_bin)
        cmd = '%s %s -jar %s -D %s -L %s -l %s -P %s start' % (
            java_bin,
            self.jstatus_jvm_option, 
            self.jstatus_path, 
            self.jstatus_data, 
            self.jstatus_log_level, 
            self.jstatus_log,
            self.jstatus_port
        )
        cmd = 'nohup %s &' % cmd
        popen = subprocess.Popen(cmd, shell=True, close_fds=True)
        popen.communicate()
        code = popen.returncode
        if not code:
            self.logger.info('start jstatus success')
        else:
            raise JvmCollectorExcept('start jstatus error')
        gevent.sleep(10)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号