Google Cloud Dataflow VM上的jstack和其他工具 [英] jstack and other tools on google cloud dataflow VMs
本文介绍了Google Cloud Dataflow VM上的jstack和其他工具的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以在为Dataflow作业创建的VM上运行jstack? 我试图查看作业在哪里花费了大部分CPU时间,却找不到安装它的地方.
Is there a way to run jstack on the VMs created for Dataflow jobs? I'm trying to see where the job spends most of the CPU time and I can't find it installed.
谢谢, G
推荐答案
我发现可以解决的变通方法:
A workaround which I found to work:
- 登录计算机
- 使用
sudo docker ps
查找运行"python -m taskrunne"的Docker容器
- 使用
sudo docker exec -i -t 9da88780f555 bash
连接到容器(将容器ID替换为步骤2中找到的ID) - 使用
apt-get install openjdk-7-jdk
安装openjdk-7-jdk
- 找到Java可执行文件的进程ID
- 运行
/usr/bin/jstack 1437
- Log on to the machine
- Find the docker container that runs "python -m taskrunne" using
sudo docker ps
- Connect to the container using
sudo docker exec -i -t 9da88780f555 bash
(replacing the container id with the one found in step 2) - Install openjdk-7-jdk using
apt-get install openjdk-7-jdk
- Find the process id of the java executable
- Run
/usr/bin/jstack 1437
这篇关于Google Cloud Dataflow VM上的jstack和其他工具的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文