jprofiler_监控远程linux服务器的tomcat进程(实践)
2023-09-11 14:21:35 时间
一、软件列表:
windows和linux的jprofiler的版本必须一致
1、jprofiler_linux_9_1_1.tar.gz
2、jprofiler_windows_x64 9_1_1
3、本地安装tomcat7(windows)
4、linux安装tomcat7(linux)
二、操作步骤
1、将jprofiler_linux_9_1_1.tar.gz拷贝到linux /usr/local目录下,并使用tar命令解压
2、生成startup_jprofiler.sh文件(该文件最后会拷贝到linux的tomcat bin目录下,并执行脚本,才能监控tomcat)
打开:Session-->Integration Wizards-->New Remote Integration
这里注意在linux手上开启端口8849
这里需要定位到本机的tomcat bin目录下
3、拷贝startup_jprofiler.sh到linux的tomcat bin目录下
a) 脚本授权:chmod 777 startup_jprofiler.sh
b) 执行脚本:./startup_jprofiler.sh
执行脚本可能报错:Error occurred during initialization of VM
Could not find agent library /usr/local/bin/linux-x64/libjprofilerti.so in absolute path, with error: /usr/local/bin/linux-x64/libjprofilerti.so: cannot open shared object file: No such file or directory
原因:对应目录下找不到文件libjprofilerti.so
解决:
cd /usr/local/jprofiler9/bin/linux-x64
cp libjprofilerti.so /usr/local/bin/linux-x64/libjprofilerti.so
c) 执行输出
windows下重新执行步骤1,最后选择立即执行即可
三、注意事项
1、执行脚本报错
执行脚本:./startup_jprofiler.sh
执行脚本可能报错:Error occurred during initialization of VM
Could not find agent library /usr/local/bin/linux-x64/libjprofilerti.so in absolute path, with error: /usr/local/bin/linux-x64/libjprofilerti.so: cannot open shared object file: No such file or directory
原因:对应目录下找不到文件libjprofilerti.so
解决:
cd /usr/local/jprofiler9/bin/linux-x64
cp libjprofilerti.so /usr/local/bin/linux-x64/libjprofilerti.so
2、jprofiler连接不上
原因:未开启默认端口8849
vim /etc/sysconfig/iptables
service iptables restart
四、参考资料
相关文章
- 【华为云技术分享】关于Linux下Nginx的安装及配置
- linux下redis执行bgsave时,报overcommit_memory错误问题
- [linux]Linux下的log
- linux系统644、755、777权限详解
- linux 连接wifi
- Linux下使用crontab执行一个shell脚本
- linux bc计算器命令:分别计算整数的平方与平方根结果
- [Docker] 镜像源配置 for Linux
- linux rsync
- 【Linux 内核 内存管理】物理内存组织结构 ② ( 内存模型 | 平坦内存 | 稀疏内存 | 非连续内存 | 内存管理系统三级结构 | 节点 Node | 区域 Zone | 页 Page )
- 【Android 逆向】Linux 文件权限 ( Linux 权限简介 | 系统权限 | 用户权限 | 匿名用户权限 | 读 | 写 | 执行 | 更改组 | 更改用户 | 粘滞 )
- 使用windos电脑模拟搭建集群(四)web环境 linux+nginx+jdk+tomcat
- 【Linux】linux经常使用基本命令
- L54.linux命令每日一练 -- 第八章 Linux磁盘与文件系统管理命令 -- umount和df
- Linux下shell脚本实战之批量新建用户
- 如何在 Linux 中设置以太网绑定
- 嵌入式Linux开发,Ubuntu22下交叉编译报错:arch64-linux-gnu-gcc: error while loading shared libraries: libstdc++.so.
- Shell脚本运行hive语句 | hive以日期建立分区表 | linux schedule程序 | sed替换文件字符串 | shell推断hdfs文件文件夹是否存在
- 【Deepin 20系统】Linux系统安装Pytorch、Torch
- 【实施工程师之家】linux安装tomcat(yum安装tomcat)
- Linux 一文详解缓冲区buffer和缓存cache
- Linux LVM逻辑卷相关管理