📄 node265.html
字号:
<html><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><!--Converted with jLaTeX2HTML 2002 (1.62) JA patch-1.4patched version by: Kenshi Muto, Debian Project.LaTeX2HTML 2002 (1.62),original version by: Nikos Drakos, CBLU, University of Leeds* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan* with significant contributions from: Jens Lippmann, Marek Rouchal, Martin Wilck and others --><HTML><HEAD><TITLE>23. Trace and Monitoring Support</TITLE><META NAME="description" CONTENT="23. Trace and Monitoring Support"><META NAME="keywords" CONTENT="everything"><META NAME="resource-type" CONTENT="document"><META NAME="distribution" CONTENT="global"><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"><META NAME="Generator" CONTENT="jLaTeX2HTML v2002 JA patch-1.4"><META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css"><LINK REL="STYLESHEET" HREF="everything.css" tppabs="http://www.isi.edu/nsnam/ns/doc/everything.css"><LINK REL="next" HREF="node278.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node278.html"><LINK REL="previous" HREF="node247.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node247.html"><LINK REL="up" HREF="node235.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node235.html"><LINK REL="next" HREF="node266.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node266.html"></HEAD><BODY ><!--Navigation Panel--><A NAME="tex2html5362" HREF="node266.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node266.html"><IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="file:/usr/share/latex2html/icons/next.png"></A> <A NAME="tex2html5356" HREF="node235.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node235.html"><IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="file:/usr/share/latex2html/icons/up.png"></A> <A NAME="tex2html5350" HREF="node264.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node264.html"><IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="file:/usr/share/latex2html/icons/prev.png"></A> <A NAME="tex2html5358" HREF="node1.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node1.html"><IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="file:/usr/share/latex2html/icons/contents.png"></A> <A NAME="tex2html5360" HREF="node590.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node590.html"><IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="file:/usr/share/latex2html/icons/index.png"></A> <BR><B> Next:</B> <A NAME="tex2html5363" HREF="node266.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node266.html">23.1 Trace Support</A><B> Up:</B> <A NAME="tex2html5357" HREF="node235.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node235.html">3 Support</A><B> Previous:</B> <A NAME="tex2html5351" HREF="node264.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node264.html">22.6 Commands at a</A>   <B> <A NAME="tex2html5359" HREF="node1.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node1.html">Contents</A></B>   <B> <A NAME="tex2html5361" HREF="node590.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node590.html">Index</A></B> <BR><BR><!--End of Navigation Panel--><H1><A NAME="SECTION04300000000000000000"></A><A NAME="chap:trace"></A><BR>23. Trace and Monitoring Support</H1><P>The procedures and functions described in this chapter can be found intrace.{cc, h},tcl/lib/ns-trace.tcl,queue-monitor.{cc, h},tcl/lib/ns-link.tcl,packet.h,flowmon.cc, andclassifier-hash.cc.<P>There are a number of ways of collecting output ortrace data on a simulation.Generally, trace data is either displayed directly during executionof the simulation, or (more commonly) stored in a file to bepost-processed and analyzed.There are two primary but distinct types of monitoring capabilitiescurrently supported by the simulator.The first, called <EM>traces</EM>, record each individual packetas it arrives, departs, or is dropped at a link or queue.Trace objects are configured into a simulation as nodes in thenetwork topology, usually with a Tcl ``Channel'' objecthooked to them, representing the destination of collected data(typically a trace file in the current directory).The other types of objects, called <EM>monitors</EM>, record countsof various interesting quantities such as packet and byte arrivals,departures, etc.Monitors can monitor counts associated with all packets,or on a per-flow basis using a <EM>flow monitor</EM> below (Section <A HREF="node273.html#sec:flowmon" tppabs="http://www.isi.edu/nsnam/ns/doc/node273.html#sec:flowmon">23.7</A>).<P>To support traces, there is a special <EM>common</EM> headerincluded in each packet (this format is defined in packet.has <TT>hdr_cmn</TT>).It presently includes a unique identifier on each packet, apacket type field (set by agents when they generate packets),a packet size field (in bytes, used to determine the transmissiontime for packets), and an interface label (used for computingmulticast distribution trees).<P>Monitors are supported by a separateset of objects that are created and inserted into the network topologyaround queues.They provide a place wherearrival statistics and times are gathered and make use of theIntegrator../ns-2/integrator.h (Section <A HREF="node261.html#sec:integral" tppabs="http://www.isi.edu/nsnam/ns/doc/node261.html#sec:integral">22.3</A>)to compute statistics over time intervals.<P><BR><HR><!--Table of Child-Links--><A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></A><UL><LI><A NAME="tex2html5364" HREF="node266.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node266.html">23.1 Trace Support</A><UL><LI><A NAME="tex2html5365" HREF="node267.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node267.html">23.1.1 OTcl Helper Functions</A></UL><BR><LI><A NAME="tex2html5366" HREF="node268.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node268.html">23.2 Library support and examples</A><LI><A NAME="tex2html5367" HREF="node269.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node269.html">23.3 The C++ Trace Class</A><LI><A NAME="tex2html5368" HREF="node270.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node270.html">23.4 Trace File Format</A><LI><A NAME="tex2html5369" HREF="node271.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node271.html">23.5 Packet Types</A><LI><A NAME="tex2html5370" HREF="node272.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node272.html">23.6 Queue Monitoring</A><LI><A NAME="tex2html5371" HREF="node273.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node273.html">23.7 Per-Flow Monitoring</A><UL><LI><A NAME="tex2html5372" HREF="node274.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node274.html">23.7.1 The Flow Monitor</A><LI><A NAME="tex2html5373" HREF="node275.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node275.html">23.7.2 Flow Monitor Trace Format</A><LI><A NAME="tex2html5374" HREF="node276.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node276.html">23.7.3 The Flow Class</A></UL><BR><LI><A NAME="tex2html5375" HREF="node277.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node277.html">23.8 Commands at a glance</A></UL><!--End of Table of Child-Links--><HR><!--Navigation Panel--><A NAME="tex2html5362" HREF="node266.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node266.html"><IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="file:/usr/share/latex2html/icons/next.png"></A> <A NAME="tex2html5356" HREF="node235.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node235.html"><IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="file:/usr/share/latex2html/icons/up.png"></A> <A NAME="tex2html5350" HREF="node264.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node264.html"><IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="file:/usr/share/latex2html/icons/prev.png"></A> <A NAME="tex2html5358" HREF="node1.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node1.html"><IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="file:/usr/share/latex2html/icons/contents.png"></A> <A NAME="tex2html5360" HREF="node590.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node590.html"><IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="file:/usr/share/latex2html/icons/index.png"></A> <BR><B> Next:</B> <A NAME="tex2html5363" HREF="node266.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node266.html">23.1 Trace Support</A><B> Up:</B> <A NAME="tex2html5357" HREF="node235.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node235.html">3 Support</A><B> Previous:</B> <A NAME="tex2html5351" HREF="node264.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node264.html">22.6 Commands at a</A>   <B> <A NAME="tex2html5359" HREF="node1.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node1.html">Contents</A></B>   <B> <A NAME="tex2html5361" HREF="node590.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node590.html">Index</A></B> <!--End of Navigation Panel--><ADDRESS>2003-09-23</ADDRESS></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -