Solaris SPARC:如何查看挂起进程正在做什么?
我有一个进程似乎挂在Solaris 上,我尝试使用GDB 附加到该进程以查看它在做什么,但没有成功。
从我所看到的来看,没有错误,它只是坐在那里......
我可以使用任何其他工具或技术来查看进程卡在什么地方吗?
帮助
感谢林顿的
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.
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
pstack
将打印该进程中所有线程正在执行的操作(完整的堆栈跟踪,包括函数名称,如果您的二进制文件未剥离。truss
是 Linux 的strace
相当于它会显示该进程正在执行的所有系统调用,它可能会帮助您进行调试。缺点是它需要在全局区域上以 root 权限运行,这需要一些时间来学习,但这是值得花费的时间。
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.truss
is Linux'sstrace
equivalent. 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. The downside is that it needs to be run with root permissions on a global zone. It takes some time to learn, but it's time well worth spending.
使用强大的 dtrace 工具。
这里简短介绍如何跟踪用户进程。
Use powerful dtrace facility.
Here the short introduction how to trace user processes.