⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 trpr.html

📁 trpr是可以分析tcpdump和mgen日志记录
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<!DOCTYPE html PUBLIC "-//w3c//dtd html 4.0 transitional//en"><html><head>                                      <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">                                      <meta name="GENERATOR" content="Mozilla/4.76 [en] (X11; U; Linux 2.4.2-2 i686) [Netscape]">                                      <meta name="Author" content="Brian Adamson">                                      <meta name="Description" content="How to use the trpr (Tcpdump Rate Plot Real-time)program to grahically display tcpdump traces, capturedor real-time.">                                      <meta name="Keywords" content="tcpdump, plotting, network trace, data rate">  <title>trpr User's Guide</title></head>  <body>                  <center>         <h1> <i>trpr</i> 1.9b9 User's Guide</h1>        </center>         <i>Trpr</i> (TRace Plot Real-time) is a program which analyzes output   from  the <i>tcpdump</i> packet sniffing program and creates output suitable   for  plotting.&nbsp; It also specifically supports a range of functionality   for specific use of the <i>gnuplot</i> graphing program.&nbsp; <i>trpr</i>   can operate   in a "real-time" plotting mode where <i>tcpdump</i> <tt>stdout</tt>    can be  piped into <i>trpr</i> and <i>trpr</i>'s <tt>stdout</tt> in turn can be piped  directly into <i>gnuplot</i> for a sort of real-time network oscilloscope.&nbsp;   <i>Trpr</i> can also parse <i>tcpdump</i> text trace files and produce files   which can be plotted by <i>gnuplot</i> or imported into other plotting or   spreadsheet programs.&nbsp; IPv4 and IPv6 traces from<i> tcpdump </i>are supported<i>. &nbsp;Trpr</i> can also perform the same functions   with <i>drec</i> log files (See <a href="http://manimac.itd.nrl.navy.mil/MGEN">        http://manimac.itd.nrl.navy.mil/MGEN</a>         for more information on <i>drec</i> and the MGEN test tool set) and  <i>   ns-2</i>  (Berkeley's network simulator - see <a href="http://www.isi.edu/nsnam/ns">        http://www.isi.edu/nsnam/ns</a>        ) trace files.         <p>By default, <i>trpr</i> creates a "data rate" versus time plot of the flowsspecified using the <u>auto</u> and <u>flow</u>&nbsp; (and <u>exclude</u>        ) commands.&nbsp; The <u>auto</u> command is used to set filters to  automatically    detect individual flows matching the <u>auto </u>filter parameters (protocol   type, source addr/port, and destination addr/port) and the <u> flow</u> command   aggregates flows matching its filter specification under a single data plot   set.&nbsp; The <u>exclude</u> command is used tospecify packet flows <i>   trpr</i> should ignore.&nbsp; The <u>flow</u> , <u>auto</u>  and <u>exclude</u>     commands can each be used multiple timeson the command line to specify   different combinations of filters to producedifferent desired output.&nbsp;   (In the future, an exclusion filter setwill also be provided). </p>               <p>If the <u>interarrival</u> command is used, <i>trpr</i> creates a plot     of the differential interarrival delay of packets for the specified flows.&nbsp;     And for MGEN packets, the <u>latency</u> command can be used to create  a  plot of the transmission latency (<i>drec</i>-logged <tt>rxTime - txTime</tt>        )&nbsp; versus time for the flows.&nbsp; Also, for MGEN packets, the  <u>   loss</u>  command can be used to generate profiles of packet lossover  time.&nbsp;   MGEN packet payloads contain sequence numbers and timestamps  to facillitate   these analyses. </p>               <p><i>Trpr</i> can also "play back" a <i>gnuplot </i>visualization of trace    file content at real time rates with the <u>replay</u> command. </p>               <p>Other interesting options are planned for the future. <br>        &nbsp; </p>               <h2> Downloads:</h2>         The <i>trpr</i> package is available at <a href="http://manimac.itd.nrl.navy.mil/Tools/dist">       http://manimac.itd.nrl.navy.mil/Tools/dist</a>         .         <p><i>Tcpdump</i> can be found at&nbsp; <a href="http://ee.lbl.gov">http://ee.lbl.gov</a>         . </p>               <p><i>Gnuplot</i>'s official web site is&nbsp; <a href="http://www.gnuplot.org">        http://www.gnuplot.org</a>        . </p>               <p>The <i>MGEN</i> web site is <a href="http://mgen.pf..itd.nrl.navy.mil">        http://mgen.pf.itd.nrl.navy.mil</a>         .</p>             <p>The <i>ns </i>web site is <a href="http://www.isi.edu/nsnam/ns"> http://www.isi.edu/nsnam/ns</a>       .<br>        </p>               <h2> Build Instructions:</h2>         Simply compile <i>trpr</i> with a C++ compiler.&nbsp; It has been primarily    built with <i>gcc</i> on Unix platforms.&nbsp;&nbsp; For example, <br>        type: <br>        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <tt>g++  -o  trpr trpr.cpp -lm</tt>         <p>to build the executable binary. </p>               <h2> Quick Start:</h2>         Here are a couple of&nbsp; examples illustrating use of <i>trpr</i>    in  simple ways.&nbsp; Note that <i>trpr</i> has a number of flexible command-line   operations to get the results you want and understanding these is strongly   recommended.&nbsp; And <i>tcpdump</i> has very flexible filtering options   for paring down the data captured from the network so that your graphscan   focus on the data of interest.&nbsp; The options of <i>tcpdump</i>and <i>    trpr</i> can be coupled together in many different ways.&nbsp;And <i> trpr</i>    supports options to command <i>gnuplot</i>  to createGif or Postscript  files for hard output or use in other programs.&nbsp; Detailedusage instructions   for <i>trpr</i>  and hints for <i>tcpdump</i>   and<i> gnuplot</i> usage are   given later.         <h3> 1)&nbsp;&nbsp;&nbsp;&nbsp; Non-real-time Operation:</h3>         &nbsp;&nbsp;&nbsp; a)&nbsp;&nbsp;&nbsp; Capture IP packets with<i>   tcpdump</i>      with hexadecimal packet header output.&nbsp; Noteyou <b>  must</b> use  <i>  tcpdump</i>'s <br>        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; hexadecimal    output option (<tt>-x</tt>) and some form of filtering that captures only    IP packets (<i>trpr</i> will not <br>        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; properly    parse the output of non-IP data (e.g. Appletalk, etc) data which <i>tcpdump</i>       may otherwise capture:         <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <tt>        tcpdump -x ip &lt;traceFile&gt;</tt> </p>               <p>&nbsp;&nbsp;&nbsp; b)&nbsp;&nbsp;&nbsp; Use <i>trpr</i> to process the     captured &lt;traceFile&gt; to create a &lt;plotFile&gt; suitable for plottfing    <br>        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; with   <i> gnuplot</i>, automatically creating lines on the graph for each unique   "flow" of data <br>        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; discovered    in the &lt;traceFile&gt;: </p>               <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <tt>        trpr input &lt;traceFile&gt; </tt><tt>auto X </tt><tt>output &lt;plotFile&gt;</tt>      </p>               <p>&nbsp;&nbsp;&nbsp; c)&nbsp;&nbsp;&nbsp; Use <i>gnuplot</i> to display agraph of <i>trpr</i>'s analysis results (By default trpr puts appropriate     <br>        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; headers    in the &lt;plotFile&gt; for <i>gnuplot</i>: </p>               <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <tt>        gnuplot -persist &lt;plotFile&gt;</tt> </p>               <p><tt>&nbsp;&nbsp;&nbsp; </tt>As examples<i>, DREC </i>log files can be processedwith: </p>               <p><tt>&nbsp;&nbsp;&nbsp; trpr drec input &lt;drecLogFile&gt; </tt><tt>auto   X </tt><tt>output   &lt;plotFile&gt;</tt></p>         <p><tt>&nbsp;&nbsp;&nbsp; </tt>and <i>Ns2 </i>simulation trace files can beprocessed with:<br>     <tt>&nbsp;&nbsp;&nbsp; <br>     &nbsp;&nbsp;&nbsp; trpr ns </tt><tt>input &lt;nsTraceFile&gt;</tt><tt>   link  &lt;srcNode&gt;,&lt;dstNode&gt; send </tt><tt>auto X </tt><tt>output &lt;plotFile&gt;</tt></p>   <p><tt>&nbsp;&nbsp;&nbsp; (Note: For <i>ns-2 </i>mobile trace files, the<u> link </u>command should be used in the form:<br>  </tt></p>   <div align="center"><tt>link &lt;nodeId&gt;,{AGT | RTR | MAC}</tt><br>  </div>   <p><tt>&nbsp;&nbsp;&nbsp; &nbsp;to capture the corresponding set of packets (Agent, Router, or MAC) for a mobile <i>ns </i>node)<br>  </tt></p>         <p><tt>&nbsp;&nbsp;&nbsp; </tt>Note that the <u>link </u>command coupled withthe <u>send </u>command specifies to process packets sent over the link fromnode &lt;src&gt; to node &lt;dst&gt; in the <i>ns </i>simulation. &nbsp;The   &lt;src&gt; and/or &lt;dst&gt; arguments can be wildcarded with the 'X' character  to process multiple links to/from a particular or any simulation node. The  <i>ns </i>processing feature of <i>trpr </i>has only been tested with simulations  using the wireless extensions at this time.</p>   <p>We hope to provide better documentation for using <i>trpr </i>with <i>  ns-2</i> soon.<br>  </p>         <h3>2)&nbsp;&nbsp;&nbsp; Real-time Operation:</h3>         &nbsp;&nbsp;&nbsp; a)&nbsp;&nbsp;&nbsp; Set up <i>tcpdump</i> to capture     IP packets and direct hexadecimal output to <i>trpr</i>, in turn piping   <i>  trpr</i>'s <br>        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; real-time    output directly to <i>gnuplot</i> to get continuously updated plots of network   traffic flow activity <br>        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Note   you <b>must</b> use <i>tcpdump</i>'s&nbsp; hexadecimal output option (<tt>     -x</tt> ) and some form of filtering that captures <br>        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; only   IP packets (<i>trpr</i> will not properly parse the output of non-IP data   (e.g. Appletalk, etc) data which <br>        <i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;   tcpdump</i>    may otherwise capture:         <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <tt>        tcpdump -l -x ip | trpr real auto X | gnuplot -noraise -persist</tt>    </p>               <p><tt>&nbsp;&nbsp;&nbsp; </tt>Or for <i>drec</i> operation: </p>               <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <tt>drec -f/dev/stdout | trpr drec real auto X | gnuplot -noraise -persist</tt> </p>               <p><tt>&nbsp;&nbsp;&nbsp; </tt>Note that the "tail -f" option can also be    used to pipe a <i>drec</i> log file to <i>trpr</i> in parallel with logging.&nbsp;    (The <i>drec</i> "-f" option causes <i>drec</i> to "flush" its outputline    by line for better real time performance.&nbsp; Note this may penalize system   performance) <br>        &nbsp; </p>               <h2> Detailed Instructions:</h2>         <h3> Usage:</h3>                  <p><br>        <tt>trpr&nbsp;&nbsp;&nbsp; [version][drec][ns][raw][key][real][latency][interarrival][loss]</tt>         <br>        <tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [window &lt;sec&gt;]  [history    &lt;sec&gt;]</tt> <br>        <tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [auto &lt;type,srcAddr/port,dstAddr/port&gt;,flowId]</tt>         <br>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -