如何在 Linux 中从 procfs 获取 jobid

发布于 2024-12-05 10:04:12 字数 112 浏览 6 评论 0原文

我想从 Linux 中的 procfs 获取 jobid。我在 /proc//status 文件中只看到 Pid 、 Ppid 。但我也需要 jobid。如果有办法获取信息,请告诉我。

谢谢 !

I would like to get the jobid from procfs in Linux. I see only Pid , Ppid in the /proc//status files. But I needed jobid too. Please let me know if there is a way to get the info.

Thanks !

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

沫尐诺 2024-12-12 10:04:12

如果您在 shell 中引用作业 ID,则只有创建该作业的 shell 才知道此信息。内核没有“作业 ID”的概念,因此不会跟踪它们,也不会通过 procfs(或任何其他方法)公开它们。

If you're referring to the job IDs in the shell, this information is known only to the shell that created the job. The kernel has no concept of 'job IDs' and therefore does not track them, or expose them via procfs (or any other method).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文