11.kafka开启jmx

ops/2025/2/6 7:51:08/

方式一:

1.进入/opt/kafka_2.13-3.3.2/bin目录

命令:

cd /opt/kafka_2.13-3.3.2/bin

[root@rhel77 ~]# cd /opt/kafka_2.13-3.3.2/bin
[root@rhel77 bin]# pwd
/opt/kafka_2.13-3.3.2/bin
[root@rhel77 bin]# 

2.备份kafka-run-class.sh

命令:

cp  kafka-run-class.sh kafka-run-class.sh.bak.20241202

[root@rhel77 bin]# cp  kafka-run-class.sh kafka-run-class.sh.bak.20241202
[root@rhel77 bin]# 
[root@rhel77 bin]# ls -l kafka-run-class.sh.*
-rwxr-xr-x 1 root root 10881 Dec  2 19:47 kafka-run-class.sh.bak.20241202
[root@rhel77 bin]# ls -l kafka-run-class.sh
-rwxr-xr-x 1 root root 10938 Dec  2 19:52 kafka-run-class.sh
[root@rhel77 bin]# 

3.编辑kafka-run-class.sh,添加如下内容,并保存

->某些服务器可能无法正确绑定ip,这时候我们需要显示指定绑定的host(ip/hostname.hostname 要做好映射关系):

按需

-Djava.rmi.server.hostname=192.1


http://www.ppmy.cn/ops/156090.html

相关文章

大模型RAG优化方案_融合bm25和语义检索

1. 写在前面 检索增强生成 (Retrieval-Augmented Generation, RAG) 是一种将检索 (Retrieval) 和生成 (Generation) 相结合的技术,它利用检索到的相关信息来增强大型语言模型 (LLM) 的生成能力。RAG 系统通常包含两个关键组件: 检索器 (Retriever):从知识库中检索与输入查询…

【玩转 Postman 接口测试与开发2_012】第十章:用 Postman 监控 API 接口

《API Testing and Development with Postman》最新第二版封面 文章目录 第十章 用 Postman 监控 API 接口1 为何要使用监控工具2 搭建一个简易的接口监视器3 设置推送邮箱4 监控失败后的重试次数设置5 超时设置6 重定向设置7 启用 SSL 验证8 监视器测试用例的添加9 监视器运行…

Linux网络 | 网络计算器客户端实现与Json的安装以及使用

前言:本节讲述序列化和反序列化的相关内容。 这节的内容是博主前一篇博客的续章, 里面用到了很多知识点都是前一篇文章的。 友友们如果要学习序列化反序列化, 直接看本篇文章是看不懂的, 请看前一篇文章:linux网络 | 序…

自制虚拟机(C/C++)(三、做成标准GUI Windows软件,扩展指令集,直接支持img软盘)

开源地址:VMwork 要使终端不弹出&#xff0c; #pragma comment(linker, "/subsystem:windows /ENTRY:mainCRTStartup") 还要实现jmp near 0x01类似的 本次的main.cpp #include <graphics.h> #include <conio.h> #include <windows.h> #includ…

Mac电脑上好用的压缩软件

在Mac电脑上&#xff0c;有许多优秀的压缩软件可供选择&#xff0c;这些软件不仅支持多种压缩格式&#xff0c;还提供了便捷的操作体验和强大的功能。以下是几款被广泛推荐的压缩软件&#xff1a; BetterZip 功能特点&#xff1a;BetterZip 是一款功能强大的压缩和解压缩工具&a…

2.4学习总结

洛谷1305代码 #include<stdio.h> #include<stdlib.h> struct treenode {char val;struct treenode* left;struct treenode* right; }; struct treenode* createnode(char val) {struct treenode* node (struct treenode*)malloc(sizeof(struct treenode));node-&…

Android 常用命令和工具解析之Battery Historian

Batterystats是包含在 Android 框架中的一种工具&#xff0c;用于收集设备上的电池数据。您可以使用adb bugreport命令抓取日志&#xff0c;将收集的电池数据转储到开发机器&#xff0c;并生成可使用 Battery Historian 分析的报告。Battery Historian 会将报告从 Batterystats…

WebSocket——环境搭建与多环境配置

一、前言&#xff1a;为什么要使用多环境配置&#xff1f; 在开发过程中&#xff0c;我们通常会遇到多个不同的环境&#xff0c;比如开发环境&#xff08;Dev&#xff09;、测试环境&#xff08;Test&#xff09;、生产环境&#xff08;Prod&#xff09;等。每个环境的配置和需…