如何在 Linux 中从 procfs 获取 jobid
我想从 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您在 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).