用于生产服务器的 Systemtap
我想使用 systemtap 从远程访问中提取 Linux 生产服务器的详细信息。我对此有一些疑问:
- Linux生产服务器和Linux开发服务器是否有必要使用相同的内核。如果没有那么如何添加对此的支持?
- 生产服务器中存在的最低要求是什么?是否需要使用debuginfo编译生产服务器的内核?
- 如何让某个特定组的用户能够运行stap脚本?
I want to use systemtap for extracting details of my linux production server from remote access. I have some of the doubts regarding this:
- Whether is it necessary to have same kernel in both the linux production server and linux development server.If not then how to add the support for that?
- What are the minimum requirements to be present in the production server? Whether is it necessary to compile the kernel of the production server with the debuginfo ?
- How to enable users in some particular group to run the stap scripts?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(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/使用-usage.html
The kernel running on the production server and linux development server do not need to be identical. The SystemTap Beginners Guide describes doing cross-compile where instrumentation for one kernel version is built on a machine currently running different kernel version. This is described in:
http://sourceware.org/systemtap/SystemTap_Beginners_Guide/cross-compiling.html
The production server just needs the systemtap-runtime package. The production server does not need the kernel-devel or kernel-debuginfo installed when using the cross compile method.
There are stapusr and stapdev groups that allow people to run scripts. stapusr allows one to run existing script in /lib/modules/uname -r/systemtap directory (probably what is wanted in the case of running cross-compiled systemtap scripts). stapdev allow one to compile a script.
The stapusr and stapdev groups are described in:
http://sourceware.org/systemtap/SystemTap_Beginners_Guide/using-usage.html
systemtap >1.4 中的另一个功能是远程执行:
development_host% stap --remote=user@deployment_host -e 'probe begin { exit() } '
其中交叉编译、模块传输、跟踪数据传输只要部署主机安装了相应的 systemtap-runtime 位,所有这些操作都会通过 ssh 传输自动完成。
Another capability in systemtap >1.4 is remote execution:
development_host% stap --remote=user@deployment_host -e 'probe begin { exit() } '
where cross-compilation, module transfer, trace data transfer are all automagically done via an ssh transport, as long as the deployment_host has corresponding systemtap-runtime bits installed.