JMeter负载测试线程转储

发布于 2024-09-25 22:56:47 字数 363 浏览 0 评论 0原文

我正在使用 JMeter 进行负载测试,但我的一些线程只是挂起。我想进行线程转储,但我的 Linux 机器上没有执行以下任何工作

首先使用 JMeter 进程 id

jps -l

然后

sudo -u <username> jstack <pid>

获取以下消息

15141:无法打开套接字文件:目标进程未响应或 HotSpot VM 未加载 时,可以使用 -F 选项

当目标进程没有响应甚至

kill -3 15141

没有任何结果

I am using JMeter for load testing and some of my threads just hang. I want to do a thread dump but none of the following work from my linux machine

First get JMeter process id using

jps -l

Then did

sudo -u <username> jstack <pid>

and get the following msg

15141: Unable to open socket file: target process not responding or HotSpot VM not loaded
The -F option can be used when the target process is not responding

even

kill -3 15141

comes up with nothing

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

泪眸﹌ 2024-10-02 22:56:47

经过大量谷歌搜索和反复试验后,找到了解决方案

要进行线程转储,请使用命令行启动 JMeter。
打开终端 (A)

$ cd /media/9260C06E60C05A9D/Downloads/jakarta-jmeter-2.4/bin
$ ./jmeter > temp

在另一个终端 (B)
获取 JMeter 的进程 ID

$ jps -l
$ kill -QUIT 21735

现在检查临时文件中的线程转储。

为了使用jstack,请确保用户和组用户与运行jstack的用户相同

After lot of googling and trial and error found the solution

To take thread dumps, start JMeter using command line.
Open terminal (A)

$ cd /media/9260C06E60C05A9D/Downloads/jakarta-jmeter-2.4/bin
$ ./jmeter > temp

In another terminal (B)
Get the process id of JMeter

$ jps -l
$ kill -QUIT 21735

Now check temp file for thread dump.

In order to use jstack make sure the user and group user are the same as the user running jstack

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文