From 1f65cc4ffd1bd362b10d7f07d1cb9c4e7de68027 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Tue, 14 Apr 2009 12:34:12 -0700 Subject: PR9953: split up the two process.* tapsets The overlapping process.* tapsets are now separated. Those probe points documented in stapprobes(3stap) remain the same. Those that were formerly in stapprobes.process(3stap) have been renamed to kprocess, to reflect their kernel perspective on processes. --- doc/SystemTap_Beginners_Guide/en-US/References.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/SystemTap_Beginners_Guide') diff --git a/doc/SystemTap_Beginners_Guide/en-US/References.xml b/doc/SystemTap_Beginners_Guide/en-US/References.xml index ff993df2..6ab74f17 100644 --- a/doc/SystemTap_Beginners_Guide/en-US/References.xml +++ b/doc/SystemTap_Beginners_Guide/en-US/References.xml @@ -43,7 +43,7 @@ The stapprobes man page enumerates a variety of probe points supported by SystemTap, along with additional aliases defined by the SystemTap tapset library. The bottom of the man page includes a list of other man pages enumerating similar probe points for specific system components, such as - stapprobes.scsi, stapprobes.process, + stapprobes.scsi, stapprobes.kprocess, stapprobes.signal, etc. -- cgit From 06cc786840951d8467553a60c0e603a5086fc488 Mon Sep 17 00:00:00 2001 From: ddomingo Date: Thu, 30 Apr 2009 15:56:47 +1000 Subject: added tcp_connections.stp --- .../en-US/Useful_Scripts-tcp_connections.xml | 86 ++++++++++++++++++++++ .../en-US/Useful_SystemTap_Scripts.xml | 2 + 2 files changed, 88 insertions(+) create mode 100644 doc/SystemTap_Beginners_Guide/en-US/Useful_Scripts-tcp_connections.xml (limited to 'doc/SystemTap_Beginners_Guide') diff --git a/doc/SystemTap_Beginners_Guide/en-US/Useful_Scripts-tcp_connections.xml b/doc/SystemTap_Beginners_Guide/en-US/Useful_Scripts-tcp_connections.xml new file mode 100644 index 00000000..c25465b4 --- /dev/null +++ b/doc/SystemTap_Beginners_Guide/en-US/Useful_Scripts-tcp_connections.xml @@ -0,0 +1,86 @@ + + + + +
+ Monitoring Incoming TCP Connections + +script examples +monitoring incoming TCP connections + + + +examples of SystemTap scripts +monitoring incoming TCP connections + + + +monitoring incoming TCP connections +examples of SystemTap scripts + + + TCP connections (incoming), monitoring + examples of SystemTap scripts + + + incoming TCP connections, monitoring + examples of SystemTap scripts + + + + + This section illustrates how to monitor incoming TCP connections. This task is useful in + identifying any unauthorized, suspicious, or otherwise unwanted network access requests + in real time. + + + + tcp_connections.stp + + + + + + + + + While is running, it will print out the following information + about any incoming TCP connections accepted by the system in real time: + + + + Current UID + CMD - the command accepting the connection + PID of the command + Port used by the connection + IP address from which the TCP connection originated + + + + + <xref linkend="tcpconnections"/> Sample Output + +UID CMD PID PORT IP_SOURCE +0 sshd 3165 22 10.64.0.227 +0 sshd 3165 22 10.64.0.227 + + + +
+ diff --git a/doc/SystemTap_Beginners_Guide/en-US/Useful_SystemTap_Scripts.xml b/doc/SystemTap_Beginners_Guide/en-US/Useful_SystemTap_Scripts.xml index b18062f3..80e68770 100644 --- a/doc/SystemTap_Beginners_Guide/en-US/Useful_SystemTap_Scripts.xml +++ b/doc/SystemTap_Beginners_Guide/en-US/Useful_SystemTap_Scripts.xml @@ -41,6 +41,8 @@ The following sections showcase scripts that trace network-related functions and build a profile of network activity. + +
Disk -- cgit From 6820dda776595280e6dc535df32648b47d21e329 Mon Sep 17 00:00:00 2001 From: ddomingo Date: Tue, 5 May 2009 15:43:56 +1000 Subject: added ioblktime.stp to guide --- .../en-US/Useful_Scripts-ioblktime.xml | 111 +++++++++++++++++++++ .../en-US/Useful_SystemTap_Scripts.xml | 2 + 2 files changed, 113 insertions(+) create mode 100644 doc/SystemTap_Beginners_Guide/en-US/Useful_Scripts-ioblktime.xml (limited to 'doc/SystemTap_Beginners_Guide') diff --git a/doc/SystemTap_Beginners_Guide/en-US/Useful_Scripts-ioblktime.xml b/doc/SystemTap_Beginners_Guide/en-US/Useful_Scripts-ioblktime.xml new file mode 100644 index 00000000..e586d81a --- /dev/null +++ b/doc/SystemTap_Beginners_Guide/en-US/Useful_Scripts-ioblktime.xml @@ -0,0 +1,111 @@ + + + +
+ Periodically Print I/O Block Time + +script examples +monitoring I/O block time + + + +examples of SystemTap scripts +monitoring I/O block time + + + +monitoring I/O block time +examples of SystemTap scripts + + + +I/O block time, monitoring +examples of SystemTap scripts + + + +printing I/O block time (periodically) +examples of SystemTap scripts + + + + This section describes how to track the amount of time each block I/O requests spends + waiting for completion. This is useful in determining whether there are too many + outstanding block I/O operations at any given time. + + + + ioblktime.stp + + + + + + + + + + + computes the average waiting time for block I/O per device, + and prints a list every 10 seconds. As always, you can revise this refresh rate by + editing the specified value in probe timer.s(10), end {. + + + In some cases, there can be too many outstanding block + I/O operations, at which point the script can exceed the default number of + MAXMAPENTRIES. MAXMAPENTRIES is the maximum number of + rows in an array if the array size is not specified explicitly when declared. If the script + exceeds the default MAXMAPENTRIES value of 2048, run the script again with + the stap option -DMAXMAPENTRIES=10000. + + + + + <xref linkend="ioblktime"/> Sample Output + + device rw total (us) count avg (us) + sda W 9659 6 1609 + dm-0 W 20278 6 3379 + dm-0 R 20524 5 4104 + sda R 19277 5 3855 + + + + + displays the device name, operations performed + (rw), total wait time of all operations (total(us)), + number of operations (count), and average + wait time for all those operations (avg (us)). The times tallied by the + script are in microseconds. + + + + +
\ No newline at end of file diff --git a/doc/SystemTap_Beginners_Guide/en-US/Useful_SystemTap_Scripts.xml b/doc/SystemTap_Beginners_Guide/en-US/Useful_SystemTap_Scripts.xml index 80e68770..4d999b53 100644 --- a/doc/SystemTap_Beginners_Guide/en-US/Useful_SystemTap_Scripts.xml +++ b/doc/SystemTap_Beginners_Guide/en-US/Useful_SystemTap_Scripts.xml @@ -56,6 +56,7 @@ +
@@ -71,6 +72,7 @@ + + + + This section illustrates how to monitor TCP packets received by the system. This is useful in + analyzing network traffic generated by applications running on the system. + + + + + tcpdumplike.stp + + + + + + + + + While is running, it will print out the following information + about any received TCP packets in real time: + + + + Source and destination IP address (saddr, + daddr, respectively) + Source and destination ports (sport, dport, + respectively) + Packet flags + + + + To determine the flags used by the packet, uses the following + functions: + + + + urg - urgent + ack - acknowledgement + psh - push + rst - reset + syn - synchronize + fin - finished + + + + The aforementioned functions return 1 or 0 to + specify whether the packet uses the corresponding flag. + + + + <xref linkend="tcpdumplike"/> Sample Output + +----------------------------------------------------------------- + Source IP Dest IP SPort DPort U A P R S F +----------------------------------------------------------------- + 209.85.229.147 10.0.2.15 80 20373 0 1 1 0 0 0 + 92.122.126.240 10.0.2.15 80 53214 0 1 0 0 1 0 + 92.122.126.240 10.0.2.15 80 53214 0 1 0 0 0 0 + 209.85.229.118 10.0.2.15 80 63433 0 1 0 0 1 0 + 209.85.229.118 10.0.2.15 80 63433 0 1 0 0 0 0 + 209.85.229.147 10.0.2.15 80 21141 0 1 1 0 0 0 + 209.85.229.147 10.0.2.15 80 21141 0 1 1 0 0 0 + 209.85.229.147 10.0.2.15 80 21141 0 1 1 0 0 0 + 209.85.229.147 10.0.2.15 80 21141 0 1 1 0 0 0 + 209.85.229.147 10.0.2.15 80 21141 0 1 1 0 0 0 + 209.85.229.118 10.0.2.15 80 63433 0 1 1 0 0 0 +[...] + + + +
+ diff --git a/doc/SystemTap_Beginners_Guide/en-US/Useful_SystemTap_Scripts.xml b/doc/SystemTap_Beginners_Guide/en-US/Useful_SystemTap_Scripts.xml index 4d999b53..eeab9b27 100644 --- a/doc/SystemTap_Beginners_Guide/en-US/Useful_SystemTap_Scripts.xml +++ b/doc/SystemTap_Beginners_Guide/en-US/Useful_SystemTap_Scripts.xml @@ -42,7 +42,7 @@ - +
Disk -- cgit