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

📄 node277.html

📁 相关搜索: ns2仿真结果分析 all-awk ns2 ns2 无限网络中awk文件 ... [2.tcl.rar] - 在ns2平台上实现对AODV协议的模拟
💻 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.8 Commands at a glance</TITLE><META NAME="description" CONTENT="23.8 Commands at a glance"><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="previous" HREF="node273.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node273.html"><LINK REL="up" HREF="node265.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node265.html"><LINK REL="next" HREF="node278.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node278.html"></HEAD><BODY ><!--Navigation Panel--><A NAME="tex2html5540"  HREF="node278.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node278.html"><IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="file:/usr/share/latex2html/icons/next.png"></A> <A NAME="tex2html5534"  HREF="node265.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node265.html"><IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="file:/usr/share/latex2html/icons/up.png"></A> <A NAME="tex2html5530"  HREF="node276.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node276.html"><IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="file:/usr/share/latex2html/icons/prev.png"></A> <A NAME="tex2html5536"  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="tex2html5538"  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="tex2html5541"  HREF="node278.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node278.html">24. Test Suite Support</A><B> Up:</B> <A NAME="tex2html5535"  HREF="node265.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node265.html">23. Trace and Monitoring</A><B> Previous:</B> <A NAME="tex2html5531"  HREF="node276.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node276.html">23.7.3 The Flow Class</A> &nbsp <B>  <A NAME="tex2html5537"  HREF="node1.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node1.html">Contents</A></B>  &nbsp <B>  <A NAME="tex2html5539"  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="SECTION04380000000000000000"></A><A NAME="sec:tracecommand"></A><BR>23.8 Commands at a glance</H1><P>Following is a list of trace related commands commonly used insimulation scripts:<DIV ALIGN="LEFT"><TT>$ns_ trace-all tracefile</TT><BR>This is the command used to setup tracing in ns. All traces are written inthe &lt;tracefile&gt;.</DIV><P><DIV ALIGN="LEFT"><TT>$ns_ namtrace-all namtracefile</TT><BR>This command sets up nam tracing in ns. All nam traces are written in tothe &lt;namtracefile&gt;.</DIV><P><DIV ALIGN="LEFT"><TT>$ns_ namtrace-all-wireless namtracefile X Y</TT><BR>This command sets up wireless nam tracing. &lt;X&gt; and &lt;Y&gt; are the x-y co-ordinatesfor the wireless topology and all wireless nam traces are written  intothe &lt;namtracefile&gt;.</DIV><P><DIV ALIGN="LEFT"><TT>$ns_ nam-end-wireless stoptime</TT><BR>This tells nam the simulation stop time  given in &lt;stoptime&gt;.</DIV><P><DIV ALIGN="LEFT"><TT>$ns_ trace-all-satlinks tracefile</TT><BR>This is a method to trace satellite links and write traces into &lt;tracefile&gt;.</DIV><P><DIV ALIGN="LEFT"><TT>$ns_ flush-trace</TT><BR>This command flushes the trace buffer and is typically called before thesimulation run ends.</DIV><P><DIV ALIGN="LEFT"><TT>$ns_ get-nam-traceall</TT><BR>Returns the namtrace file descriptor stored as the Simulator instancevariable called <TT>namtraceAllFile_</TT>.</DIV><P><DIV ALIGN="LEFT"><TT>$ns_ get-ns-traceall</TT><BR>Similar to get-nam-traceall. This returns the file descriptor for ns tracefilewhich is stored as the Simulator instance called <TT>traceAllFile_</TT>.</DIV><P><DIV ALIGN="LEFT"><TT>$ns_ create-trace type file src dst optional:op</TT><BR>This command creates a trace object of type &lt;type&gt; between the &lt;src&gt; and&lt;dst&gt; nodes. The traces are written into the &lt;file&gt;. &lt;op&gt; is the argumentthat may be used to specify the type of trace, like nam. if &lt;op&gt; is notdefined, the default trace object created is for nstraces.</DIV><P><DIV ALIGN="LEFT"><TT>$ns_ trace-queue n1 n2 optional:file</TT><BR>This is a wrapper method for <TT>create-trace</TT>. This command creates atrace object for tracing events on the link represented by the nodes &lt;n1&gt;and &lt;n2&gt;.</DIV><P><DIV ALIGN="LEFT"><TT>$ns_ namtrace-queue n1 n2 optional:file</TT><BR>This is used to create a trace object for namtracing on the link betweennodes &lt;n1&gt; and &lt;n2&gt;. This method is very similar to and is the namtracecounterpart of method <TT>trace-queue</TT>.</DIV><P><DIV ALIGN="LEFT"><TT>$ns_ drop-trace n1 n2 trace</TT><BR>This command makes the given &lt;trace&gt; object a drop-target for the queueassociated with the link between nodes &lt;n1&gt; and &lt;n2&gt;.</DIV><P><DIV ALIGN="LEFT"><TT>$ns_ monitor-queue n1 n2 qtrace optional:sampleinterval</TT><BR>This sets up a monitor that keeps track of average queue length of the queueon the link between nodes &lt;n1&gt; and &lt;n2&gt;. The default value ofsampleinterval is 0.1. </DIV><P><DIV ALIGN="LEFT"><TT>$link trace-dynamics ns fileID </TT>Trace the dynamics of this link and write the output to fileID filehandle.ns is an instance of the Simulator or MultiSim object that was created toinvoke the simulation. </DIV><P><DIV ALIGN="LEFT">The tracefile format is backward compatible with the output files in thens version 1 simulator so that ns-1 postprocessing scripts can still beused. Trace records of traffic for link objects with Enque, Deque, receiveor Drop Tracing have the following form: <BR></DIV><P><DIV ALIGN="LEFT">&lt;code&gt; &lt;time&gt; &lt;hsrc&gt; &lt;hdst&gt; &lt;packet&gt; <BR></DIV><P><DIV ALIGN="LEFT">where </DIV><PRE>&lt;code&gt; := [hd+-] h=hop d=drop +=enque -=deque r=receive &lt;time&gt; :=simulation time in seconds &lt;hsrc&gt; := first node address of hop/queuing link &lt;hdst&gt; := second node address of hop/queuing link &lt;packet&gt; := &lt;type&gt; &lt;size&gt; &lt;flags&gt; &lt;flowID&gt; &lt;src.sport&gt; &lt;dst.dport&gt; &lt;seq&gt;&lt;pktID&gt; &lt;type&gt; := tcp|telnet|cbr|ack etc.&lt;size&gt; := packet size in bytes&lt;flags&gt; := [CP] C=congestion, P=priority &lt;flowID&gt; := flow identifier field as defined for IPv6 &lt;src.sport&gt; := transport address (src=node,sport=agent) &lt;dst.sport&gt; := transport address (dst=node,dport=agent) &lt;seq&gt; := packet sequence number&lt;pktID&gt; := unique identifer for every new packet</PRE><DIV ALIGN="LEFT"></DIV><P><DIV ALIGN="LEFT">Only those agents interested in providing sequencing will generatesequence numbers and hence this field may not be useful for packetsgenerated by some agents. For links that use RED gateways, there areadditional trace records as follows: <BR></DIV><P><DIV ALIGN="LEFT">&lt;code&gt; &lt;time&gt; &lt;value&gt; <BR></DIV><P><DIV ALIGN="LEFT">where <BR></DIV><PRE>&lt;code&gt; := [Qap] Q=queue size, a=average queue size, p=packet droppingprobability&lt;time&gt; := simulation time in seconds &lt;value&gt; := value</PRE><DIV ALIGN="LEFT"></DIV><P><DIV ALIGN="LEFT">Trace records for link dynamics are of the form: <BR></DIV><P><DIV ALIGN="LEFT">&lt;code&gt; &lt;time&gt; &lt;state&gt; &lt;src&gt; &lt;dst&gt; <BR></DIV><P><DIV ALIGN="LEFT">where <BR></DIV><PRE>&lt;code&gt; := [v]&lt;time&gt; := simulation time in seconds &lt;state&gt; := [link-up | link-down]&lt;src&gt; := first node address of link &lt;dst&gt; := second node address of link</PRE><DIV ALIGN="LEFT"></DIV><P><HR><!--Navigation Panel--><A NAME="tex2html5540"  HREF="node278.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node278.html"><IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="file:/usr/share/latex2html/icons/next.png"></A> <A NAME="tex2html5534"  HREF="node265.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node265.html"><IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="file:/usr/share/latex2html/icons/up.png"></A> <A NAME="tex2html5530"  HREF="node276.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node276.html"><IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="file:/usr/share/latex2html/icons/prev.png"></A> <A NAME="tex2html5536"  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="tex2html5538"  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="tex2html5541"  HREF="node278.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node278.html">24. Test Suite Support</A><B> Up:</B> <A NAME="tex2html5535"  HREF="node265.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node265.html">23. Trace and Monitoring</A><B> Previous:</B> <A NAME="tex2html5531"  HREF="node276.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node276.html">23.7.3 The Flow Class</A> &nbsp <B>  <A NAME="tex2html5537"  HREF="node1.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node1.html">Contents</A></B>  &nbsp <B>  <A NAME="tex2html5539"  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 + -