]> sourceware.org Git - systemtap.git/commitdiff
added tcp_connections.stp
authorddomingo <ddomingo@redhat.com>
Thu, 30 Apr 2009 05:56:47 +0000 (15:56 +1000)
committerddomingo <ddomingo@redhat.com>
Thu, 30 Apr 2009 05:56:47 +0000 (15:56 +1000)
doc/SystemTap_Beginners_Guide/en-US/Useful_Scripts-tcp_connections.xml [new file with mode: 0644]
doc/SystemTap_Beginners_Guide/en-US/Useful_SystemTap_Scripts.xml

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 (file)
index 0000000..c25465b
--- /dev/null
@@ -0,0 +1,86 @@
+<?xml version='1.0'?>
+<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+]>
+
+
+       <section id="tcpconnectionssect">
+               <title>Monitoring Incoming TCP Connections</title>
+<indexterm>
+<primary>script examples</primary>
+<secondary>monitoring incoming TCP connections</secondary>
+</indexterm>
+
+<indexterm>
+<primary>examples of SystemTap scripts</primary>
+<secondary>monitoring incoming TCP connections</secondary>
+</indexterm>
+
+<indexterm>
+<primary>monitoring incoming TCP connections</primary>
+<secondary>examples of SystemTap scripts</secondary>
+</indexterm>           
+<indexterm>
+       <primary>TCP connections (incoming), monitoring</primary>
+       <secondary>examples of SystemTap scripts</secondary>
+</indexterm>
+<indexterm>
+       <primary>incoming TCP connections, monitoring</primary>
+       <secondary>examples of SystemTap scripts</secondary>
+</indexterm>   
+<!--                           
+<indexterm>
+       <primary>script examples</primary>
+       <secondary>net/socket.c, tracing functions from</secondary>
+</indexterm>
+
+<indexterm>
+       <primary>examples of SystemTap scripts</primary>
+       <secondary>net/socket.c, tracing functions from</secondary>
+</indexterm>
+
+<indexterm>
+       <primary>net/socket.c, tracing functions from</primary>
+       <secondary>examples of SystemTap scripts</secondary>
+</indexterm>
+-->
+
+<para>
+       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. 
+</para>
+
+<formalpara id="tcpconnections">
+               <title>tcp_connections.stp</title>
+<para>
+<programlisting>
+<xi:include parse="text" href="extras/testsuite/systemtap.examples/network/tcp_connections.stp" xmlns:xi="http://www.w3.org/2001/XInclude" />
+</programlisting>
+</para>
+</formalpara>          
+
+<para>
+       While <xref linkend="tcpconnections"/> is running, it will print out the following information
+       about any incoming TCP connections accepted by the system in real time:
+</para>
+
+<itemizedlist>
+       <listitem><para>Current <command>UID</command></para></listitem>
+       <listitem><para><command>CMD</command> - the command accepting the connection</para></listitem>
+       <listitem><para><command>PID</command> of the command</para></listitem>
+       <listitem><para>Port used by the connection</para></listitem>
+       <listitem><para>IP address from which the TCP connection originated</para></listitem>
+</itemizedlist>
+       
+       
+<example id="tcpconnectionsoutput">
+       <title><xref linkend="tcpconnections"/> Sample Output</title>
+<screen>
+UID            CMD    PID   PORT        IP_SOURCE\r
+0             sshd   3165     22      10.64.0.227\r
+0             sshd   3165     22      10.64.0.227
+</screen>
+</example>
+
+</section>
+
index b18062f3021179d62738fda766ec05b2aaabfc1e..80e68770aa6b4d930a4fb3cc32c43b09644802c4 100644 (file)
@@ -41,6 +41,8 @@
        <para>The following sections showcase scripts that trace network-related functions and build a profile of network activity.</para>
        <xi:include href="Useful_Scripts-nettop.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
        <xi:include href="Useful_Scripts-sockettrace.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+       <xi:include href="Useful_Scripts-tcp_connections.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+
 </section>             
 <section id="mainsect-disk">
        <title>Disk</title>
This page took 0.032309 seconds and 5 git commands to generate.