我想使用 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/