Google Cloud Dataflow VM上的jstack和其他工具 [英] jstack and other tools on google cloud dataflow VMs

查看:55
本文介绍了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:

  1. 登录计算机
  2. 使用sudo docker ps
  3. 查找运行"python -m taskrunne"的Docker容器
  4. 使用sudo docker exec -i -t 9da88780f555 bash连接到容器(将容器ID替换为步骤2中找到的ID)
  5. 使用apt-get install openjdk-7-jdk
  6. 安装openjdk-7-jdk
  7. 找到Java可执行文件的进程ID
  8. 运行/usr/bin/jstack 1437
  1. Log on to the machine
  2. Find the docker container that runs "python -m taskrunne" using sudo docker ps
  3. Connect to the container using sudo docker exec -i -t 9da88780f555 bash (replacing the container id with the one found in step 2)
  4. Install openjdk-7-jdk using apt-get install openjdk-7-jdk
  5. Find the process id of the java executable
  6. Run /usr/bin/jstack 1437

这篇关于Google Cloud Dataflow VM上的jstack和其他工具的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆