2

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

  1. linux生产服务器和linux开发服务器是否需要相同的内核。如果没有,那么如何添加对它的支持?
  2. 生产服务器中存在的最低要求是什么?是否需要用 debuginfo 编译生产服务器的内核?
  3. 如何使某个特定组中的用户能够运行 stap 脚本?
4

2 回答 2

2

生产服务器和 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

于 2011-06-10T15:04:01.430 回答
1

systemtap >1.4 中的另一个功能是远程执行:

development_host% stap --remote=user@deployment_host -e 'probe begin { exit() } '

只要 deployment_host 安装了相应的 systemtap-runtime 位,交叉编译、模块传输、跟踪数据传输都通过 ssh 传输自动完成。

于 2012-11-28T14:17:25.917 回答