简体   繁体   English

Solaris SPARC:如何查看正在执行的挂起进程?

[英]Solaris SPARC: How to see what hanging process is doing?

I have a process that seems to be hanging on solaris, I have tried to attach to the process using GDB to see what it is doing but no luck. 我的进程似乎挂在了solaris上,我尝试使用GDB附加到该进程,以查看它在做什么,但是没有运气。

There is no error from what I can see, it is just sitting there... 从我所看到的没有错误,它只是坐在那里...

Are there any other tools or techniques I can use to see what the process is stuck on? 我还可以使用其他工具或技术来查看过程中遇到的问题吗?

Thanks for the help 谢谢您的帮助

Lynton 林顿

pstack <pid> will print you what all the threads within this process are doing (full stack traces, including function names, if your binary is not stripped. pstack <pid>将显示该进程中所有线程的操作(如果未剥离二进制文件,则将显示完整的堆栈跟踪信息,包括函数名称)。

truss is Linux's strace equivalent. truss是Linux的strace等效项。 It will show all the system calls that the process is doing. 它将显示该进程正在执行的所有系统调用。 It might help you in debugging. 它可能会帮助您进行调试。

DTrace is a great debugging swiss-army-knife that can show you pretty much anything you can think of. DTrace是一款出色的调试瑞士军刀,可以向您展示几乎所有您能想到的东西。 The downside is that it needs to be run with root permissions on a global zone. 缺点是它需要在全局区域上以root权限运行。 It takes some time to learn, but it's time well worth spending. 学习需要花费一些时间,但值得花时间。

Use powerful dtrace facility. 使用强大的dtrace工具。 Here the short introduction how to trace user processes. 这里简短介绍如何跟踪用户进程。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM