检查 Linux 上被杀死的进程

发布于 2024-12-22 08:52:05 字数 87 浏览 3 评论 0原文

我发现运行 Debian 的服务器上有几个进程被杀死。我可以确认机器没有重新启动。我想知道是否有办法检查机器上被杀死的进程。

我拥有所需的权限。

I found a couple of processes killed on a server running Debian. I can confirm that the machine was not restarted. I was wondering if there was a way to check the killed processes on the machine.

I have the required permissions.

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

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

发布评论

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

评论(2

私藏温柔 2024-12-29 08:52:05

您可以使用systemtap来跟踪信号的来源和目的地。在您的系统上设置 systemtap 并不简单,但在我看来非常值得付出努力。

下面是一个跟踪 SIGKILL 的示例探针(来自示例 ):

probe signal.send {
  if (sig_name == "SIGKILL")
    printf("%s was sent to %s (pid:%d) by %s uid:%d\n",
           sig_name, pid_name, sig_pid, execname(), uid())
}

You can use systemtap to track signal origins and destinations. Setting up systemtap on your system is not trivial, but well worth the effort IMO.

Here's an example probe to track SIGKILL (from the examples ):

probe signal.send {
  if (sig_name == "SIGKILL")
    printf("%s was sent to %s (pid:%d) by %s uid:%d\n",
           sig_name, pid_name, sig_pid, execname(), uid())
}
心不设防 2024-12-29 08:52:05

http://djangstorm.com/Content/pkill.html。 pkill -e 在这种情况下会有所帮助。

http://djangstorm.com/Content/pkill.html. pkill -e will help in this case.

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