Difference between revisions of "SystemTap"

From ArchWiki
Jump to: navigation, search
(Systemtap)
(Added category, naturalized grammar)
Line 1: Line 1:
 +
{{Category: Kernel}}
 
{{i18n|Help:Systemtap}}
 
{{i18n|Help:Systemtap}}
  
 
[http://sourceware.org/systemtap/ Systemtap] provides free software (GPL)
 
[http://sourceware.org/systemtap/ Systemtap] provides free software (GPL)
 
infrastructure to simplify the gathering of information about the running Linux system.
 
infrastructure to simplify the gathering of information about the running Linux system.
 
  
 
==Easy and fast==
 
==Easy and fast==
Officially it is recommanded to build a ''linux-custom'' package to run systemtap.
+
Officially, it is recommended to build a ''linux-custom'' package to run systemtap, but rebuilding the original {{Pkg|linux}} package can be very easy and efficient.
But rebuild the original {{Pkg|linux}} package can be very easy and efficient.
+
  
 
===Prepare===
 
===Prepare===
 
You can run {{ic|sudo abs; cp -r /var/abs/core/linux .}} to get the original kernel build files.
 
You can run {{ic|sudo abs; cp -r /var/abs/core/linux .}} to get the original kernel build files.
  
Edit '''config''' (for 32-bit system) or '''config.x86_64''' (for 64-bit system), turn on this options:
+
Edit '''config''' (for 32-bit systems) or '''config.x86_64''' (for 64-bit systems), turn on these options:
 
* CONFIG_DEBUG_INFO=y
 
* CONFIG_DEBUG_INFO=y
 
* CONFIG_KPROBES=y
 
* CONFIG_KPROBES=y
Line 20: Line 19:
 
* CONFIG_MODULE_UNLOAD=y
 
* CONFIG_MODULE_UNLOAD=y
 
* CONFIG_UTRACE=y
 
* CONFIG_UTRACE=y
By default only ''CONFIG_DEBUG_INFO'' and ''CONFIG_KPROBES'' is not set.
+
By default only ''CONFIG_DEBUG_INFO'' and ''CONFIG_KPROBES'' are not set.
  
Suppose you just modified '''config.x86_64''', now save and close it.
+
Once modifying '''config.x86_64''', save and close it.
Run {{ic|md5sum config.x86_64}} to get a new md5-sum.
+
Run {{ic|md5sum config.x86_64}} to get a new md5sum.
  
 
In '''PKGBUILD''' file, the {{ic|<nowiki>md5sums=('sum-of-first' ... 'sum-of-last')</nowiki>}} in the end has the same order with
 
In '''PKGBUILD''' file, the {{ic|<nowiki>md5sums=('sum-of-first' ... 'sum-of-last')</nowiki>}} in the end has the same order with
Line 36: Line 35:
 
{{Pkg|linux}} and {{Pkg|linux-headers}} should be reinstalled, {{Pkg|linux-docs}} does not matter.
 
{{Pkg|linux}} and {{Pkg|linux-headers}} should be reinstalled, {{Pkg|linux-docs}} does not matter.
  
Via this method, external modules (e.g. {{Pkg|nvidia}} and {{Pkg|virtualbox}}) don't need to be rebuild.
+
Via this method, external modules (e.g. {{Pkg|nvidia}} and {{Pkg|virtualbox}}) don't need to be rebuilt.
  
 
===Systemtap===
 
===Systemtap===
simply install systemtap from [[AUR]]: {{AUR|systemtap}}, all done.
+
Simply install systemtap from [[AUR]]: {{AUR|systemtap}}, all done.
  
 
==Build custom kernel==
 
==Build custom kernel==
 
Please reference this [http://sourceware.org/git/?p=systemtap.git;a=blob_plain;f=README;hb=HEAD README]
 
Please reference this [http://sourceware.org/git/?p=systemtap.git;a=blob_plain;f=README;hb=HEAD README]

Revision as of 18:46, 8 June 2012

This subsection contains articles on how to compile/modify/boot the Arch Linux kernels.

This template has only maintenance purposes. For linking to local translations please use interlanguage links, see Help:i18n#Interlanguage links.


Local languages: Català – Dansk – English – Español – Esperanto – Hrvatski – Indonesia – Italiano – Lietuviškai – Magyar – Nederlands – Norsk Bokmål – Polski – Português – Slovenský – Česky – Ελληνικά – Български – Русский – Српски – Українська – עברית – العربية – ไทย – 日本語 – 正體中文 – 简体中文 – 한국어


External languages (all articles in these languages should be moved to the external wiki): Deutsch – Français – Română – Suomi – Svenska – Tiếng Việt – Türkçe – فارسی

Systemtap provides free software (GPL) infrastructure to simplify the gathering of information about the running Linux system.

Easy and fast

Officially, it is recommended to build a linux-custom package to run systemtap, but rebuilding the original linux package can be very easy and efficient.

Prepare

You can run sudo abs; cp -r /var/abs/core/linux . to get the original kernel build files.

Edit config (for 32-bit systems) or config.x86_64 (for 64-bit systems), turn on these options:

  • CONFIG_DEBUG_INFO=y
  • CONFIG_KPROBES=y
  • CONFIG_RELAY=y
  • CONFIG_DEBUG_FS=y
  • CONFIG_MODULES=y
  • CONFIG_MODULE_UNLOAD=y
  • CONFIG_UTRACE=y

By default only CONFIG_DEBUG_INFO and CONFIG_KPROBES are not set.

Once modifying config.x86_64, save and close it. Run md5sum config.x86_64 to get a new md5sum.

In PKGBUILD file, the md5sums=('sum-of-first' ... 'sum-of-last') in the end has the same order with source=('first-source' ... 'last-source'), put your new md5sum in the write place.

Build and Install

Optional: you can set MAKEFLAGS="-j16" in /etc/makepkg.conf to speed up the compilation.

Run makepkg to compile, then simply sudo pacman -U *.pkg.tar.gz to install the packages. pacman will tell you reinstall, That's great!

linux and linux-headers should be reinstalled, linux-docs does not matter.

Via this method, external modules (e.g. nvidia and virtualbox) don't need to be rebuilt.

Systemtap

Simply install systemtap from AUR: systemtapAUR, all done.

Build custom kernel

Please reference this README