gpt4 book ai didi

linux-kernel - 用于生产服务器的 Systemtap

转载 作者:行者123 更新时间:2023-12-04 06:23:50 30 4
gpt4 key购买 nike

我想使用 systemtap 从远程访问中提取我的 linux 生产服务器的详细信息。对此,我有一些疑问:

  • linux生产服务器和linux开发服务器是否有必要使用相同的内核。如果没有,那么如何添加对它的支持?
  • 生产服务器的最低要求是什么?是否需要用 debuginfo 编译生产服务器的内核?
  • 如何让某个特定组的用户运行 stap 脚本?
  • 最佳答案

    运行在生产服务器和 linux 开发服务器上的内核不需要完全相同。 SystemTap 初学者指南描述了如何进行交叉编译,其中一个内核版本的检测是在当前运行不同内核版本的机器上构建的。这在:

    http://sourceware.org/systemtap/SystemTap_Beginners_Guide/cross-compiling.html

    生产服务器只需要 systemtap-runtime 包。使用交叉编译方式时,生产服务器不需要安装 kernel-devel 或 kernel-debuginfo。

    有 stapusr 和 stapdev 组允许人们运行脚本。 stapusr 允许在/lib/modules/uname -r/systemtap 目录中运行现有脚本(可能是在运行交叉编译的 systemtap 脚本的情况下需要的)。 stapdev 允许编译脚本。

    stapusr 和 stapdev 组的描述如下:

    http://sourceware.org/systemtap/SystemTap_Beginners_Guide/using-usage.html

    关于linux-kernel - 用于生产服务器的 Systemtap,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6248036/

    30 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com