From 6d24a6c909520290b1c508ae1624a218f19e93f1 Mon Sep 17 00:00:00 2001 From: ddomingo Date: Mon, 15 Sep 2008 15:21:57 +1000 Subject: minor revisions as per dsmith --- .../en-US/Introduction.xml | 4 +-- doc/SystemTap_Beginners_Guide/en-US/Scripts.xml | 39 ++++++++++++++++++---- .../en-US/Understanding_How_SystemTap_Works.xml | 2 +- 3 files changed, 36 insertions(+), 9 deletions(-) (limited to 'doc/SystemTap_Beginners_Guide/en-US') diff --git a/doc/SystemTap_Beginners_Guide/en-US/Introduction.xml b/doc/SystemTap_Beginners_Guide/en-US/Introduction.xml index 6f1b2a0a..b19f5e48 100644 --- a/doc/SystemTap_Beginners_Guide/en-US/Introduction.xml +++ b/doc/SystemTap_Beginners_Guide/en-US/Introduction.xml @@ -5,7 +5,7 @@ Introduction - SystemTap is a tracing and probing tool that provides users deep technical insight into what the operating system (particularly, the kernel) is doing at any given time. It provides information similar to the output of tools like netstat, ps, top, and iostat; however, SystemTap is designed to provide information that is more "granular" in nature. + SystemTap is a tracing and probing tool that provides users to study and monitor the activities of the operating system (particularly, the kernel) in fine detail. It provides information similar to the output of tools like netstat, ps, top, and iostat; however, SystemTap is designed to provide information that is more "granular" in nature. @@ -23,7 +23,7 @@ Without SystemTap, monitoring the activity of a running kernel would require a tedious instrument, recompile, install, and reboot sequence. SystemTap is designed to eliminate this, allowing users to gather the same information by simply running its suite of tools against specific tapsets or SystemTap scripts. - However, SystemTap was initially designed for users with intermediate to advanced knowledge of the kernel. This could present a steep learning curve for administrators or developers whose knowledge of the Linux kernel is little to none. + However, SystemTap was initially designed for users with intermediate to advanced knowledge of the kernel. As such, much of the existing documentation for SystemTap is primarily for advanced users. This could present a steep learning curve for administrators or developers whose knowledge of the Linux kernel is little to none. In line with that, the main goals of the SystemTap Beginner's Guide are as follows: diff --git a/doc/SystemTap_Beginners_Guide/en-US/Scripts.xml b/doc/SystemTap_Beginners_Guide/en-US/Scripts.xml index bed0bd06..8426dc70 100644 --- a/doc/SystemTap_Beginners_Guide/en-US/Scripts.xml +++ b/doc/SystemTap_Beginners_Guide/en-US/Scripts.xml @@ -13,9 +13,12 @@ As stated in , SystemTap scripts are made up of two components: events and handlers. Once a SystemTap session is underway, SystemTap monitors the operating system for the specified events and executes the handlers as they occur. + Note An event and its corresponding handler is collectively called a probe. A SystemTap script can have multiple probes. + + A probe's handler is also commonly referred to as a probe body. @@ -92,11 +95,34 @@ probe kernel.function("*@net/socket.c").return { } syscall.[system_call] - The entry to the system call [system_call]. Similar to kerne.function, appending a return to the statement specifies the exit of the system call. For example, to specify the entry of the system call close, use syscall.close.return. + The entry to the system call [system_call]. Similar to kernel.function, appending a return to the statement specifies the exit of the system call. For example, to specify the entry of the system call close, use syscall.close.return. To identify what system calls are made by a specific program/command, use strace command. + + + timer.ms() + + An event that specifies a handler to be executed "after X number of milliseconds". For example: + +Using timer.ms + +probe timer.ms(4000) +{ + exit() +} + + + + + is an example of a probe that allows you to terminate the script after 4000 milliseconds (or 4 seconds). When used in conjunction with another probe that traps a large quantity of data, a probe using timer.ms() allows you to limit the information your script is collecting (and printing out). + + + + + +