当该过程即将退出时,在过程(在Linux中)进行过程堆栈(PSTACK)

发布于 2025-02-13 12:35:46 字数 273 浏览 1 评论 0原文

我需要在Linux环境中运行的过程(CPP进程)上进行过程堆栈(PSTACK)。该过程可以在各种情况下(通常或异常)退出。因此,我们不确定该过程何时存在,因此,当该过程获得退出调用时,还可以编写脚本以获取PSTACK吗?

我正在尝试执行以上操作,因为我们有一个过程异常终止的过程,该过程没有生成任何核心文件(是的,ulimt值是正确的),而且我都无法在var/log/log/sakess中找到任何杀戮信号。

因此,我决定编写一个脚本以获取该过程即将退出时获取PSTACK。如果有人能帮助我,那就太好了。

I have a requirement to take a process stack(pstack) on a process(cpp process) running in linux environment . The process can exit in various scenarios(normally or abnormally).So we are not sure when the process can exist , so is it still possible to write a script to get the pstack when the process gets an exit call ?

I am trying to do the above because we have a process getting terminated abnormally which is not generating any core file(yes the ulimt values are proper) ,and neither i could find any kill signals in var/log/messages.

Hence i decided to write a script for getting the pstack when the process is about to exit. It would be great if anyone could help me on this.

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文