diff --git a/README.md b/README.md index f8220d3db..e37e17f63 100644 --- a/README.md +++ b/README.md @@ -73,7 +73,7 @@ enabled), it should be easy to run the sample programs with the following command, such as: ```shell -./ns3 --run simple-global-routing +./ns3 run simple-global-routing ``` That program should generate a `simple-global-routing.tr` text diff --git a/doc/build.txt b/doc/build.txt index 1614ab121..b51e3731c 100644 --- a/doc/build.txt +++ b/doc/build.txt @@ -47,26 +47,26 @@ Other ns3 usages include: 2. ./ns3 configure --disable-python Disable python bindings. - 3. ./ns3 --doxygen + 3. ./ns3 docs doxygen Run doxygen to generate documentation - 4. ./ns3 --run "program [args]" + 4. ./ns3 run "program [args]" Run a ns3 program, given its target name, with the given arguments. This takes care of automatically modifying the path for finding the ns3 dynamic libraries in the environment before running the program. Note: the "program [args]" string is parsed using POSIX shell rules. - 4.1 ./ns3 --run programname --command-template "... %s ..." + 4.1 ./ns3 run program-name --command-template "... %s ..." - Same as --run, but uses a command template with %s replaced by the - actual program (whose name is given by --run). This can be use to + Same as run, but uses a command template with %s replaced by the + actual program (whose name is given by run). This can be use to run ns-3 programs with helper tools. For example, to run unit tests with valgrind, use the command: - ./ns3 --run run-tests --command-template "valgrind %s" + ./ns3 run run-tests --command-template "valgrind %s" - 5. ./ns3 --shell + 5. ./ns3 shell Starts a nested system shell with modified environment to run ns3 programs. 6. ./ns3 clean diff --git a/doc/main.h b/doc/main.h index 10e171db2..559c6b3f2 100644 --- a/doc/main.h +++ b/doc/main.h @@ -19,7 +19,7 @@ * * ns-3 requires Doxygen version 1.8.3.1 or greater. * - * Type "./ns3 --doxygen" or "./ns3 --doxygen-no-build" to build the + * Type "./ns3 docs doxygen" or "./ns3 docs doxygen-no-build" to build the * documentation. The doc/ directory contains * configuration for Doxygen (doxygen.conf) and main.h. The Doxygen * build process puts html files into the doc/html/ directory, and latex diff --git a/doc/manual/source/attributes.rst b/doc/manual/source/attributes.rst index ff6d8037f..1608aa879 100644 --- a/doc/manual/source/attributes.rst +++ b/doc/manual/source/attributes.rst @@ -705,7 +705,7 @@ output corresponding to the steps we took above: .. sourcecode:: bash - $ ./ns3 --run main-attribute-value + $ ./ns3 run main-attribute-value 1. dtq limit: 80p 2. txQueue limit: 80p 3. txQueue limit changed: 60p diff --git a/doc/manual/source/events.rst b/doc/manual/source/events.rst index d0e6214bd..5c1fd28b8 100644 --- a/doc/manual/source/events.rst +++ b/doc/manual/source/events.rst @@ -219,7 +219,7 @@ or by using a command line argument:: .. sourcecode:: bash - $ ./ns3 --run ... -–SimulatorImplementationType=ns3::DistributedSimulatorImpl + $ ./ns3 run "... -–SimulatorImplementationType=ns3::DistributedSimulatorImpl" In addition to the basic simulator engines there is a general facility used to build "adapters" which provide small behavior modifications to one of diff --git a/doc/manual/source/gnuplot.rst b/doc/manual/source/gnuplot.rst index f8da4f899..2fc8b77ff 100644 --- a/doc/manual/source/gnuplot.rst +++ b/doc/manual/source/gnuplot.rst @@ -36,7 +36,7 @@ In order to run this example, do the following: .. sourcecode:: bash - $ ./ns3 --run src/stats/examples/gnuplot-example + $ ./ns3 run src/stats/examples/gnuplot-example This should produce the following gnuplot control files: diff --git a/doc/manual/source/logging.rst b/doc/manual/source/logging.rst index 0ff691249..53f10404a 100644 --- a/doc/manual/source/logging.rst +++ b/doc/manual/source/logging.rst @@ -49,7 +49,7 @@ first is by setting the ``NS_LOG`` environment variable; e.g.: .. sourcecode:: bash - $ NS_LOG="*" ./ns3 --run first + $ NS_LOG="*" ./ns3 run first will run the ``first`` tutorial program with all logging output. (The specifics of the ``NS_LOG`` format will be discussed below.) @@ -58,7 +58,7 @@ This can be made more granular by selecting individual components: .. sourcecode:: bash - $ NS_LOG="Ipv4L3Protocol" ./ns3 --run first + $ NS_LOG="Ipv4L3Protocol" ./ns3 run first The output can be further tailored with prefix options. @@ -115,7 +115,7 @@ To see what log components are defined, any of these will work: .. sourcecode:: bash - $ NS_LOG="print-list" ./ns3 --run ... + $ NS_LOG="print-list" ./ns3 run ... $ NS_LOG="foo" # a token not matching any log-component @@ -253,7 +253,7 @@ class (``|prefix_level``). .. sourcecode:: bash - $ NS_LOG="*=all|prefix_level" ./ns3 --run scratch-simulator + $ NS_LOG="*=all|prefix_level" ./ns3 run scratch-simulator Scratch Simulator [ERROR] error message [WARN] warn message diff --git a/doc/manual/source/python.rst b/doc/manual/source/python.rst index 597ee9c57..532267239 100644 --- a/doc/manual/source/python.rst +++ b/doc/manual/source/python.rst @@ -107,7 +107,7 @@ and the other is to use the --pyrun option to ns3: .. sourcecode:: bash - $ ./ns3 --pyrun examples/wireless/mixed-wireless.py + $ ./ns3 run examples/wireless/mixed-wireless.py As of ns-3.30, a --pyrun-no-build option was added to allow the running of a program without invoking a project rebuild. This option may be useful @@ -117,7 +117,7 @@ different arguments, such as from scripts. It can be used in place of .. sourcecode:: bash - $ ./ns3 --pyrun-no-build examples/wireless/mixed-wireless.py + $ ./ns3 run examples/wireless/mixed-wireless.py --no-build To run a python script under the C debugger: diff --git a/doc/manual/source/random-variables.rst b/doc/manual/source/random-variables.rst index 368479cfc..3ae8f6695 100644 --- a/doc/manual/source/random-variables.rst +++ b/doc/manual/source/random-variables.rst @@ -183,14 +183,14 @@ variable as follows: .. sourcecode:: bash - $ NS_GLOBAL_VALUE="RngRun=3" ./ns3 --run program-name + $ NS_GLOBAL_VALUE="RngRun=3" ./ns3 run program-name Another way to control this is by passing a command-line argument; since this is an |ns3| GlobalValue instance, it is equivalently done such as follows: .. sourcecode:: bash - $ ./ns3 --command-template="%s --RngRun=3" --run program-name + $ ./ns3 run program-name --command-template="%s --RngRun=3" or, if you are running programs directly outside of ns3: diff --git a/doc/manual/source/realtime.rst b/doc/manual/source/realtime.rst index 7ac0ee792..df9d44123 100644 --- a/doc/manual/source/realtime.rst +++ b/doc/manual/source/realtime.rst @@ -66,7 +66,7 @@ has an example of how to configure the realtime behavior. Try: .. sourcecode:: bash - $ ./ns3 --run realtime-udp-echo + $ ./ns3 run realtime-udp-echo Whether the simulator will work in a best effort or hard limit policy fashion is governed by the attributes explained in the previous section. diff --git a/doc/manual/source/test-framework.rst b/doc/manual/source/test-framework.rst index 722eadab2..166d8ed63 100644 --- a/doc/manual/source/test-framework.rst +++ b/doc/manual/source/test-framework.rst @@ -530,7 +530,7 @@ stage, and also (optionally) examples if examples are to be checked: :: - $ ./ns3 --configure --enable-examples --enable-tests + $ ./ns3 configure --enable-examples --enable-tests Then, build |ns3|, and after it is built, just run ``test.py``. ``test.py -h`` will show a number of configuration options that modify the behavior @@ -558,7 +558,7 @@ have to run them using the test-runner directly. In order to execute the test-runner, you run it like any other |ns3| executable -- using ``ns3``. To get a list of available options, you can type:: - $ ./ns3 --run "test-runner --help" + $ ./ns3 run "test-runner --help" You should see something like the following @@ -625,11 +625,11 @@ To run one of the tests directly from the test-runner using ``ns3``, you will need to specify the test suite to run. So you could use the shell and do:: - $ ./ns3 --run "test-runner --suite=pcap-file" + $ ./ns3 run "test-runner --suite=pcap-file" |ns3| logging is available when you run it this way, such as: - $ NS_LOG="Packet" ./ns3 --run "test-runner --suite=pcap-file" + $ NS_LOG="Packet" ./ns3 run "test-runner --suite=pcap-file" Test output +++++++++++ @@ -677,7 +677,7 @@ Try, :: - $ ./ns3 --run "test-runner --suite=pcap-file --out=myfile.txt" + $ ./ns3 run "test-runner --suite=pcap-file --out=myfile.txt" Debugging test suite failures @@ -693,7 +693,7 @@ You can access the underlying test-runner program via gdb as follows, and then pass the "--basedir=`pwd`" argument to run (you can also pass other arguments as needed, but basedir is the minimum needed):: - $ ./ns3 --command-template="gdb %s" --run "test-runner" + $ ./ns3 run "test-runner" --command-template="gdb %s" Waf: Entering directory `/home/tomh/hg/sep09/ns-3-allinone/ns-3-dev-678/build' Waf: Leaving directory `/home/tomh/hg/sep09/ns-3-allinone/ns-3-dev-678/build' 'build' finished successfully (0.380s) @@ -715,7 +715,7 @@ such as:: VALGR: TestSuite devices-mesh-dot11s-regression - $ ./ns3 --command-template="valgrind %s --suite=devices-mesh-dot11s-regression" --run test-runner + $ ./ns3 run test-runner --command-template="valgrind %s --suite=devices-mesh-dot11s-regression" Class TestRunner **************** diff --git a/doc/manual/source/troubleshoot.rst b/doc/manual/source/troubleshoot.rst index 7d8b6d78e..b225df89a 100644 --- a/doc/manual/source/troubleshoot.rst +++ b/doc/manual/source/troubleshoot.rst @@ -23,7 +23,7 @@ values are unexpectedly null. Here is an example of what might occur:: - $ ./ns3 --run tcp-point-to-point + $ ./ns3 run tcp-point-to-point Entering directory '/home/tomh/ns-3-nsc/build' Compilation finished successfully Command ['/home/tomh/ns-3-nsc/build/debug/examples/tcp-point-to-point'] exited with code -11 @@ -35,7 +35,7 @@ closely, try running it under the `gdb debugger .. sourcecode:: bash - $ ./ns3 --run tcp-point-to-point --gdb + $ ./ns3 run tcp-point-to-point --gdb Entering directory '/home/tomh/ns-3-nsc/build' Compilation finished successfully GNU gdb Red Hat Linux (6.3.0.0-1.134.fc5rh) @@ -84,4 +84,4 @@ Sometimes you may need to use the `valgrind memory checker `_ for more subtle errors. Again, you invoke the use of valgrind similarly:: - $ ./ns3 --run tcp-point-to-point --valgrind + $ ./ns3 run tcp-point-to-point --valgrind diff --git a/doc/manual/source/utilities.rst b/doc/manual/source/utilities.rst index 1b12a5708..a371b2f03 100644 --- a/doc/manual/source/utilities.rst +++ b/doc/manual/source/utilities.rst @@ -35,25 +35,25 @@ To run it, simply open terminal and type .. sourcecode:: bash - $ ./ns3 --run print-introspected-doxygen + $ ./ns3 run print-introspected-doxygen This will give all the output, formatted for Doxygen, which can be viewed in a text editor. One way to use this is to capture it to a file:: - $ ./ns3 --run print-introspected-doxygen > doc.html + $ ./ns3 run print-introspected-doxygen > doc.html Some users might prefer to use tools like grep to locate the required piece of information from the documentation instead of using an editor. For such uses-cases and more, `print-introspected-doxygen` can return plain text:: - $ ./ns3 --run "print-introspected-doxygen --output-text" + $ ./ns3 run "print-introspected-doxygen --output-text" (Note the quotes around the inner command and options.) - $ ./ns3 --run "print-introspected-doxygen --output-text" | grep "hello" + $ ./ns3 run "print-introspected-doxygen --output-text" | grep "hello" This will output the following:: @@ -80,7 +80,7 @@ Command-line Arguments .. sourcecode:: bash - $ ./ns3 --run "bench-simulator --help" + $ ./ns3 run "bench-simulator --help" Program Options: --cal: use CalendarSheduler [false] @@ -115,7 +115,7 @@ To run it, simply open the terminal and type .. sourcecode:: bash - $ ./ns3 --run bench-simulator + $ ./ns3 run bench-simulator It will show something like this depending upon the scheduler being benchmarked:: @@ -137,7 +137,7 @@ Suppose we had to benchmark `CalendarScheduler` instead, we would have written .. sourcecode:: bash - $ ./ns3 --run "bench-simulator --cal" + $ ./ns3 run "bench-simulator --cal" And the output would look something like this:: diff --git a/doc/release_steps.txt b/doc/release_steps.txt index 75938964a..a8c78ce9c 100644 --- a/doc/release_steps.txt +++ b/doc/release_steps.txt @@ -29,7 +29,7 @@ This step presumes that you have a reasonably solid ns-3-dev that you and/or the buildbots have been testing - building static, optimized, and debug versions - try Python visualizer (not tested by buildbots) - -- ./ns3 --pyrun src/flow-monitor/examples/wifi-olsr-flowmon.py --vis + -- ./ns3 run src/flow-monitor/examples/wifi-olsr-flowmon.py --vis - ensure that tests pass (./test.py -g) and make sure that the buildbots are reporting 'pass' state, based on the tip of the repository - revise and check in AUTHORS, RELEASE_NOTES.md, and CHANGES.html diff --git a/doc/tutorial/source/building-topologies.rst b/doc/tutorial/source/building-topologies.rst index 64001f87c..73e3cb835 100644 --- a/doc/tutorial/source/building-topologies.rst +++ b/doc/tutorial/source/building-topologies.rst @@ -358,7 +358,7 @@ run the program. .. sourcecode:: bash $ export NS_LOG= - $ ./ns3 --run scratch/mysecond + $ ./ns3 run scratch/mysecond Since we have set up the UDP echo applications to log just as we did in ``first.cc``, you will see similar output when you run the script. @@ -540,7 +540,7 @@ devices set to four: .. sourcecode:: bash - $ ./ns3 --run "scratch/mysecond --nCsma=4" + $ ./ns3 run "scratch/mysecond --nCsma=4" You should now see, @@ -615,7 +615,7 @@ If you build the new script and run the simulation setting ``nCsma`` to 100, .. sourcecode:: bash - $ ./ns3 --run "scratch/mysecond --nCsma=100" + $ ./ns3 run "scratch/mysecond --nCsma=100" you will see the following output: @@ -1187,7 +1187,7 @@ repository you would type, .. sourcecode:: bash $ cp examples/tutorial/third.cc scratch/mythird.cc - $ ./ns3 --run scratch/mythird + $ ./ns3 run scratch/mythird Again, since we have set up the UDP echo applications just as we did in the ``second.cc`` script, you will see similar output. diff --git a/doc/tutorial/source/conceptual-overview.rst b/doc/tutorial/source/conceptual-overview.rst index 357582d2e..924d699ef 100644 --- a/doc/tutorial/source/conceptual-overview.rst +++ b/doc/tutorial/source/conceptual-overview.rst @@ -843,7 +843,7 @@ directory you must run it out of the scratch directory): .. sourcecode:: bash - $ ./ns3 --run scratch/myfirst + $ ./ns3 run scratch/myfirst You should see some output: diff --git a/doc/tutorial/source/data-collection.rst b/doc/tutorial/source/data-collection.rst index f31ce45a1..d231e7a05 100644 --- a/doc/tutorial/source/data-collection.rst +++ b/doc/tutorial/source/data-collection.rst @@ -60,7 +60,7 @@ be invoked as follows (please note the use of double quotes): :: - ./ns3 --run "seventh --help" + ./ns3 run "seventh --help" which produces: @@ -84,7 +84,7 @@ toggling the boolean value as follows: :: - ./ns3 --run "seventh --useIpv6=1" + ./ns3 run "seventh --useIpv6=1" and have a look at the pcap generated, such as with ``tcpdump``: diff --git a/doc/tutorial/source/getting-started.rst b/doc/tutorial/source/getting-started.rst index c3b5189d0..e5c0e4239 100644 --- a/doc/tutorial/source/getting-started.rst +++ b/doc/tutorial/source/getting-started.rst @@ -1001,7 +1001,7 @@ Run command .. sourcecode:: bash - $ ./ns3 --run test-runner + $ ./ns3 run test-runner Corresponds to: @@ -1287,7 +1287,7 @@ ubiquitous hello world program by typing the following: .. sourcecode:: bash - $ ./ns3 --run hello-simulator + $ ./ns3 run hello-simulator ns3 first checks to make sure that the program is built correctly and executes a build if required. ns3 then executes the program, which @@ -1334,7 +1334,7 @@ To feed command line arguments to an |ns3| program use this pattern: .. sourcecode:: bash - $ ./ns3 --run --command-template="%s " + $ ./ns3 run --command-template="%s " Substitute your program name for ````, and the arguments for ````. The ``--command-template`` argument to ns3 is @@ -1350,7 +1350,7 @@ by single quotes, such as: .. sourcecode:: bash - $ ./ns3 --run ' --arg1=value1 --arg2=value2 ...' + $ ./ns3 run ' --arg1=value1 --arg2=value2 ...' Another particularly useful example is to run a test suite by itself. Let's assume that a ``mytest`` test suite exists (it doesn't). @@ -1360,7 +1360,7 @@ tests in parallel, by repeatedly invoking the real testing program, .. sourcecode:: bash - $ ./ns3 --run test-runner --command-template="%s --suite=mytest --verbose" + $ ./ns3 run test-runner --command-template="%s --suite=mytest --verbose" This passes the arguments to the ``test-runner`` program. Since ``mytest`` does not exist, an error message will be generated. @@ -1368,7 +1368,7 @@ To print the available ``test-runner`` options: .. sourcecode:: bash - $ ./ns3 --run test-runner --command-template="%s --help" + $ ./ns3 run test-runner --command-template="%s --help" Debugging +++++++++ @@ -1382,7 +1382,7 @@ For example, to run your |ns3| program ``hello-simulator`` with the arguments .. sourcecode:: bash - $ ./ns3 --run=hello-simulator --command-template="gdb %s --args " + $ ./ns3 run=hello-simulator --command-template="gdb %s --args " Notice that the |ns3| program name goes with the ``--run`` argument, and the control utility (here ``gdb``) is the first token @@ -1397,7 +1397,7 @@ debugger: .. sourcecode:: bash - $ ./ns3 --run test-runner --command-template="gdb %s --args --suite=mytest --verbose" + $ ./ns3 run test-runner --command-template="gdb %s --args --suite=mytest --verbose" Working Directory +++++++++++++++++ @@ -1409,24 +1409,7 @@ the ``--cwd`` argument: .. sourcecode:: bash - $ ./ns3 --cwd=... - -It may be more convenient to start with your working directory where -you want the output files, in which case a little indirection can help: - -.. sourcecode:: bash - - $ function ns3f { - CWD="$PWD" - cd $NS3DIR >/dev/null - ./ns3 --cwd="$CWD" $* - cd - >/dev/null - } - -This embellishment of the previous version saves the current working directory, -``cd``'s to the ns3 directory, then instructs ns3 to change the working -directory *back* to the saved current working directory before running the -program. + $ ./ns3 run program-name --cwd=... We mention this ``--cwd`` command for completeness; most users will simply run ns3 from the top-level directory and generate the output data files there. @@ -1438,12 +1421,12 @@ As of the ns-3.30 release, a new ns3 option was introduced to allow the running of programs while skipping the build step. This can reduce the time to run programs when, for example, running the same program repeatedly through a shell script, or when demonstrating program execution. -This option, ``--run-no-build``, behaves the same as the ``-run`` option, -except that the program and ns-3 libraries will not be rebuilt. +The option ``--no-build`` modifies the ``run`` option, +skipping the build steps of the program and required ns-3 libraries. .. sourcecode:: bash - $ ./ns3 --run-no-build ' --arg1=value1 --arg2=value2 ...' + $ ./ns3 run ' --arg1=value1 --arg2=value2 ...' --no-build Build version +++++++++++++ @@ -1564,7 +1547,7 @@ option which will print the full build version and exit. .. sourcecode:: text - ./ns3 --run-no-build "command-line-example --version" + ./ns3 run "command-line-example --version" --no-build Waf: Entering directory `/g/g14/mdb/gitlab/mdb/ns-3-dev/build/debug' ns-3.33+249@g80e0dd0-dirty-debug diff --git a/doc/tutorial/source/quick-start.rst b/doc/tutorial/source/quick-start.rst index ebf41c9a5..70cff750a 100644 --- a/doc/tutorial/source/quick-start.rst +++ b/doc/tutorial/source/quick-start.rst @@ -130,13 +130,13 @@ automatically): :: - $ ./ns3 --run first + $ ./ns3 run first To view possible command-line options, specify the `--PrintHelp` argument: :: - $ ./ns3 --run 'first --PrintHelp' + $ ./ns3 run 'first --PrintHelp' To continue reading about the conceptual model and architecture of |ns3|, the tutorial chapter :ref:`Conceptual Overview` would be the next natural place diff --git a/doc/tutorial/source/tracing.rst b/doc/tutorial/source/tracing.rst index eade87b84..d82b89120 100644 --- a/doc/tutorial/source/tracing.rst +++ b/doc/tutorial/source/tracing.rst @@ -488,7 +488,7 @@ If you now build and run this example, .. sourcecode:: bash - $ ./ns3 --run fourth + $ ./ns3 run fourth you will see the output from the ``IntTrace`` function execute as soon as the trace source is hit: @@ -2035,7 +2035,7 @@ to run. .. sourcecode:: bash - $ ./ns3 --run fifth + $ ./ns3 run fifth Waf: Entering directory `/home/craigdo/repos/ns-3-allinone-dev/ns-3-dev/build' Waf: Leaving directory `/home/craigdo/repos/ns-3-allinone-dev/ns-3-dev/build' 'build' finished successfully (0.684s) @@ -2059,7 +2059,7 @@ of all of this work. Let's redirect that output to a file called .. sourcecode:: bash - $ ./ns3 --run fifth > cwnd.dat 2>&1 + $ ./ns3 run fifth > cwnd.dat 2>&1 Now edit up "cwnd.dat" in your favorite editor and remove the ns3 build status and drop lines, leaving only the traced data (you could @@ -2277,7 +2277,7 @@ Now, back to the example. If you build and run this example, .. sourcecode:: bash - $ ./ns3 --run sixth + $ ./ns3 run sixth you will see the same messages appear as when you ran "fifth", but two new files will appear in the top-level directory of your |ns3| diff --git a/doc/tutorial/source/tweaking.rst b/doc/tutorial/source/tweaking.rst index b8a07d7af..98b3e6cce 100644 --- a/doc/tutorial/source/tweaking.rst +++ b/doc/tutorial/source/tweaking.rst @@ -85,7 +85,7 @@ did previously, .. sourcecode:: bash - $ ./ns3 --run scratch/myfirst + $ ./ns3 run scratch/myfirst You should see the now familiar output of the first |ns3| example program @@ -329,7 +329,7 @@ and look through it with your favorite editor if you like, .. sourcecode:: bash - $ ./ns3 --run scratch/myfirst > log.out 2>&1 + $ ./ns3 run scratch/myfirst > log.out 2>&1 I personally use this extremely verbose version of logging when I am presented with a problem and I have no idea where things are going wrong. I can follow the @@ -386,7 +386,7 @@ Now, if you run the script, .. sourcecode:: bash - $ ./ns3 --run scratch/myfirst + $ ./ns3 run scratch/myfirst you will ``not`` see your new message since its associated logging component (``FirstScriptExample``) has not been enabled. In order to see your @@ -448,7 +448,7 @@ the script for help in the following way, .. sourcecode:: bash - $ ./ns3 --run "scratch/myfirst --PrintHelp" + $ ./ns3 run "scratch/myfirst --PrintHelp" This will ask ns3 to run the ``scratch/myfirst`` script and pass the command line argument ``--PrintHelp`` to the script. The quotes are required to @@ -488,7 +488,7 @@ will be ``ns3::PointToPointNetDevice``. Let's go ahead and type in, .. sourcecode:: bash - $ ./ns3 --run "scratch/myfirst --PrintAttributes=ns3::PointToPointNetDevice" + $ ./ns3 run "scratch/myfirst --PrintAttributes=ns3::PointToPointNetDevice" The system will print out all of the ``Attributes`` of this kind of net device. Among the ``Attributes`` you will see listed is, @@ -564,7 +564,7 @@ the formula implied by the help item: .. sourcecode:: bash - $ ./ns3 --run "scratch/myfirst --ns3::PointToPointNetDevice::DataRate=5Mbps" + $ ./ns3 run "scratch/myfirst --ns3::PointToPointNetDevice::DataRate=5Mbps" This will set the default value of the ``DataRate`` ``Attribute`` back to five megabits per second. Are you surprised by the result? It turns out that @@ -575,7 +575,7 @@ the net device: .. sourcecode:: bash - $ ./ns3 --run "scratch/myfirst --PrintAttributes=ns3::PointToPointChannel" + $ ./ns3 run "scratch/myfirst --PrintAttributes=ns3::PointToPointChannel" We discover the ``Delay`` ``Attribute`` of the channel is set in the following way: @@ -589,7 +589,7 @@ We can then set both of these default values through the command line system, .. sourcecode:: bash - $ ./ns3 --run "scratch/myfirst + $ ./ns3 run "scratch/myfirst --ns3::PointToPointNetDevice::DataRate=5Mbps --ns3::PointToPointChannel::Delay=2ms" @@ -627,7 +627,7 @@ end up looking something like, .. sourcecode:: bash - $ ./ns3 --run "scratch/myfirst + $ ./ns3 run "scratch/myfirst --ns3::PointToPointNetDevice::DataRate=5Mbps --ns3::PointToPointChannel::Delay=2ms --ns3::UdpEchoClient::MaxPackets=2" @@ -638,7 +638,7 @@ a feature for this. If we ask for command line help we should see: .. sourcecode:: bash - $ ./ns3 --run "scratch/myfirst --PrintHelp" + $ ./ns3 run "scratch/myfirst --PrintHelp" myfirst [Program Arguments] [General Arguments] General Arguments: @@ -658,7 +658,7 @@ again on the point-to-point module: .. sourcecode:: bash - ./ns3 --run "scratch/myfirst --PrintGroup=PointToPoint" + ./ns3 run "scratch/myfirst --PrintGroup=PointToPoint" TypeIds in group PointToPoint: ns3::PointToPointChannel ns3::PointToPointNetDevice @@ -713,7 +713,7 @@ Try, .. sourcecode:: bash - $ ./ns3 --run "scratch/myfirst --PrintHelp" + $ ./ns3 run "scratch/myfirst --PrintHelp" .. sourcecode:: bash @@ -734,7 +734,7 @@ setting the ``--nPackets`` argument in the command line, .. sourcecode:: bash - $ ./ns3 --run "scratch/myfirst --nPackets=2" + $ ./ns3 run "scratch/myfirst --nPackets=2" You should now see @@ -870,7 +870,7 @@ You can now build the script and run it from the command line: .. sourcecode:: bash - $ ./ns3 --run scratch/myfirst + $ ./ns3 run scratch/myfirst Just as you have seen many times before, you will see some messages from ns3 and then "'build' finished successfully" with some number of messages from @@ -1019,7 +1019,7 @@ script in the usual way: .. sourcecode:: bash - $ ./ns3 --run scratch/myfirst + $ ./ns3 run scratch/myfirst If you look at the top level directory of your distribution, you should now see three log files: ``myfirst.tr`` is the ASCII trace file we have diff --git a/examples/stats/wifi-example-db.sh b/examples/stats/wifi-example-db.sh index e4932ba4b..625af7e05 100755 --- a/examples/stats/wifi-example-db.sh +++ b/examples/stats/wifi-example-db.sh @@ -44,7 +44,7 @@ do for distance in $DISTANCES do echo Trial $trial, distance $distance - ../../ns3 --run "wifi-example-sim --format=db --distance=$distance --run=run-$distance-$trial" + ../../ns3 run "wifi-example-sim --format=db --distance=$distance --run=run-$distance-$trial" done done diff --git a/examples/tcp/tcp-large-transfer.cc b/examples/tcp/tcp-large-transfer.cc index 75a295977..a30aed879 100644 --- a/examples/tcp/tcp-large-transfer.cc +++ b/examples/tcp/tcp-large-transfer.cc @@ -27,7 +27,7 @@ // - pcap traces also generated in the following files // "tcp-large-transfer-$n-$i.pcap" where n and i represent node and interface // numbers respectively -// Usage (e.g.): ./ns3 --run tcp-large-transfer +// Usage (e.g.): ./ns3 run tcp-large-transfer #include #include diff --git a/examples/tcp/tcp-pacing.cc b/examples/tcp/tcp-pacing.cc index 38c3c0aad..156c20546 100644 --- a/examples/tcp/tcp-pacing.cc +++ b/examples/tcp/tcp-pacing.cc @@ -62,7 +62,7 @@ // an RTT. The size of initial congestion window is set to 10, and pacing // of the initial window is enabled. The available command-line options and // their default values can be observed in the usual way by running the -// program to print the help info; i.e.: ./ns3 --run 'tcp-pacing --PrintHelp' +// program to print the help info; i.e.: ./ns3 run 'tcp-pacing --PrintHelp' // // When pacing is disabled, TCP sends eligible packets back-to-back. The // differences in behaviour when pacing is disabled can be observed from the diff --git a/examples/tcp/tcp-star-server.cc b/examples/tcp/tcp-star-server.cc index 7f38a36a3..615a4aa79 100644 --- a/examples/tcp/tcp-star-server.cc +++ b/examples/tcp/tcp-star-server.cc @@ -33,10 +33,10 @@ // "tcp-star-server-$n-$i.pcap" where n and i represent node and interface // numbers respectively // Usage examples for things you might want to tweak: -// ./ns3 --run="tcp-star-server" -// ./ns3 --run="tcp-star-server --nNodes=25" -// ./ns3 --run="tcp-star-server --ns3::OnOffApplication::DataRate=10000" -// ./ns3 --run="tcp-star-server --ns3::OnOffApplication::PacketSize=500" +// ./ns3 run="tcp-star-server" +// ./ns3 run="tcp-star-server --nNodes=25" +// ./ns3 run="tcp-star-server --ns3::OnOffApplication::DataRate=10000" +// ./ns3 run="tcp-star-server --ns3::OnOffApplication::PacketSize=500" // See the ns-3 tutorial for more info on the command line: // http://www.nsnam.org/tutorials.html diff --git a/examples/tcp/tcp-validation.cc b/examples/tcp/tcp-validation.cc index a0c684528..766c36f5a 100644 --- a/examples/tcp/tcp-validation.cc +++ b/examples/tcp/tcp-validation.cc @@ -113,13 +113,13 @@ // validation cases (and syntax of how to run): // ------------ // Case 'dctcp-10ms': DCTCP single flow, 10ms base RTT, 50 Mbps link, ECN enabled, CoDel: -// ./ns3 --run 'tcp-validation --firstTcpType=dctcp --linkRate=50Mbps --baseRtt=10ms --queueUseEcn=1 --stopTime=15s --validate=1 --validation=dctcp-10ms' +// ./ns3 run 'tcp-validation --firstTcpType=dctcp --linkRate=50Mbps --baseRtt=10ms --queueUseEcn=1 --stopTime=15s --validate=1 --validation=dctcp-10ms' // - Throughput between 48 Mbps and 49 Mbps for time greater than 5.6s // - DCTCP alpha below 0.1 for time greater than 5.4s // - DCTCP alpha between 0.06 and 0.085 for time greater than 7s // // Case 'dctcp-80ms': DCTCP single flow, 80ms base RTT, 50 Mbps link, ECN enabled, CoDel: -// ./ns3 --run 'tcp-validation --firstTcpType=dctcp --linkRate=50Mbps --baseRtt=80ms --queueUseEcn=1 --stopTime=40s --validate=1 --validation=dctcp-80ms' +// ./ns3 run 'tcp-validation --firstTcpType=dctcp --linkRate=50Mbps --baseRtt=80ms --queueUseEcn=1 --stopTime=40s --validate=1 --validation=dctcp-80ms' // - Throughput less than 20 Mbps for time less than 14s // - Throughput less than 48 Mbps for time less than 30s // - Throughput between 47.5 Mbps and 48.5 for time greater than 32s @@ -128,14 +128,14 @@ // - DCTCP alpha between 0.015 and 0.025 for time greater than 34 // // Case 'cubic-50ms-no-ecn': CUBIC single flow, 50ms base RTT, 50 Mbps link, ECN disabled, CoDel: -// ./ns3 --run 'tcp-validation --firstTcpType=cubic --linkRate=50Mbps --baseRtt=50ms --queueUseEcn=0 --stopTime=20s --validate=1 --validation=cubic-50ms-no-ecn' +// ./ns3 run 'tcp-validation --firstTcpType=cubic --linkRate=50Mbps --baseRtt=50ms --queueUseEcn=0 --stopTime=20s --validate=1 --validation=cubic-50ms-no-ecn' // - Maximum value of cwnd is 511 segments at 5.4593 seconds // - cwnd decreases to 173 segments at 5.80304 seconds // - cwnd reaches another local maxima around 14.2815 seconds of 236 segments // - cwnd reaches a second maximum around 18.048 seconds of 234 segments // // Case 'cubic-50ms-ecn': CUBIC single flow, 50ms base RTT, 50 Mbps link, ECN enabled, CoDel: -// ./ns3 --run 'tcp-validation --firstTcpType=cubic --linkRate=50Mbps --baseRtt=50ms --queueUseEcn=0 --stopTime=20s --validate=1 --validation=cubic-50ms-no-ecn' +// ./ns3 run 'tcp-validation --firstTcpType=cubic --linkRate=50Mbps --baseRtt=50ms --queueUseEcn=0 --stopTime=20s --validate=1 --validation=cubic-50ms-no-ecn' // - Maximum value of cwnd is 511 segments at 5.4593 seconds // - cwnd decreases to 173 segments at 5.7939 seconds // - cwnd reaches another local maxima around 14.3477 seconds of 236 segments diff --git a/examples/wireless/wifi-80211e-txop.cc b/examples/wireless/wifi-80211e-txop.cc index 5d29f5636..498b6e925 100644 --- a/examples/wireless/wifi-80211e-txop.cc +++ b/examples/wireless/wifi-80211e-txop.cc @@ -55,7 +55,7 @@ // // The user can select the distance between the stations and the APs, can enable/disable the RTS/CTS mechanism // and can choose the payload size and the simulation duration. -// Example: ./ns3 --run "wifi-80211e-txop --distance=10 --simulationTime=20 --payloadSize=1000" +// Example: ./ns3 run "wifi-80211e-txop --distance=10 --simulationTime=20 --payloadSize=1000" // // The output prints the throughput measured for the 4 cases/networks described above. When TXOP is enabled, results show // increased throughput since the channel is granted for a longer duration. TXOP is enabled by default for AC_VI and AC_VO, diff --git a/examples/wireless/wifi-aggregation.cc b/examples/wireless/wifi-aggregation.cc index 230fb5b11..e09225342 100644 --- a/examples/wireless/wifi-aggregation.cc +++ b/examples/wireless/wifi-aggregation.cc @@ -56,7 +56,7 @@ //Packets in this simulation belong to BestEffort Access Class (AC_BE). // // The user can select the distance between the stations and the APs and can enable/disable the RTS/CTS mechanism. -// Example: ./ns3 --run "wifi-aggregation --distance=10 --enableRts=0 --simulationTime=20" +// Example: ./ns3 run "wifi-aggregation --distance=10 --enableRts=0 --simulationTime=20" // // The output prints the throughput measured for the 4 cases/networks described above. When default aggregation parameters are enabled, the // maximum A-MPDU size is 65 kB and the throughput is maximal. When aggregation is disabled, the throughput is about the half of the physical diff --git a/examples/wireless/wifi-backward-compatibility.cc b/examples/wireless/wifi-backward-compatibility.cc index 67b792527..1ca26ebd5 100644 --- a/examples/wireless/wifi-backward-compatibility.cc +++ b/examples/wireless/wifi-backward-compatibility.cc @@ -44,7 +44,7 @@ // the AP or both has/have traffic to send. // // Example for an IEEE 802.11ac station sending traffic to an 802.11a AP using Ideal rate adaptation algorithm: -// ./ns3 --run "wifi-backward-compatibility --apVersion=80211a --staVersion=80211ac --staRaa=Ideal" +// ./ns3 run "wifi-backward-compatibility --apVersion=80211a --staVersion=80211ac --staRaa=Ideal" using namespace ns3; diff --git a/examples/wireless/wifi-mixed-network.cc b/examples/wireless/wifi-mixed-network.cc index cde7a660d..ee7e2ea7b 100644 --- a/examples/wireless/wifi-mixed-network.cc +++ b/examples/wireless/wifi-mixed-network.cc @@ -55,7 +55,7 @@ // short slot time are only observed in a g only configuration. // // The user can also select the payload size and can choose either an UDP or a TCP connection. -// Example: ./ns3 --run "wifi-mixed-network --isUdp=1" +// Example: ./ns3 run "wifi-mixed-network --isUdp=1" using namespace ns3; diff --git a/examples/wireless/wifi-multirate.cc b/examples/wireless/wifi-multirate.cc index ea8460600..39095b71e 100644 --- a/examples/wireless/wifi-multirate.cc +++ b/examples/wireless/wifi-multirate.cc @@ -23,21 +23,21 @@ * QUICK INSTRUCTIONS: * * To optimize build: - * ./ns3 -d optimized configure + * ./ns3 configure -d optimized * ./ns3 * * To compile: - * ./ns3 --run wifi-multirate + * ./ns3 run wifi-multirate * * To compile with command line(useful for varying parameters): - * ./ns3 --run "wifi-multirate --totalTime=0.3s --rateManager=ns3::MinstrelWifiManager" + * ./ns3 run "wifi-multirate --totalTime=0.3s --rateManager=ns3::MinstrelWifiManager" * * To turn on NS_LOG: * export NS_LOG=multirate=level_all - * (can only view log if built with ./ns3 -d debug configure) + * (can only view log if built with ./ns3 configure -d debug) * * To debug: - * ./ns3 --shell + * ./ns3 shell * gdb ./build/debug/examples/wireless/wifi-multirate * * To view pcap files: diff --git a/examples/wireless/wifi-power-adaptation-distance.cc b/examples/wireless/wifi-power-adaptation-distance.cc index dd8ae210c..dbf2b8c79 100644 --- a/examples/wireless/wifi-power-adaptation-distance.cc +++ b/examples/wireless/wifi-power-adaptation-distance.cc @@ -66,17 +66,17 @@ * * To display all the possible arguments and their defaults: * \code{.sh} - * ./ns3 --run "wifi-power-adaptation-distance --help" + * ./ns3 run "wifi-power-adaptation-distance --help" * \endcode * * Example usage (selecting Aparf rather than Parf): * \code{.sh} - * ./ns3 --run "wifi-power-adaptation-distance --manager=ns3::AparfWifiManager --outputFileName=aparf" + * ./ns3 run "wifi-power-adaptation-distance --manager=ns3::AparfWifiManager --outputFileName=aparf" * \endcode * * Another example (moving towards the AP): * \code{.sh} - * ./ns3 --run "wifi-power-adaptation-distance --manager=ns3::AparfWifiManager --outputFileName=aparf --stepsSize=-1 --STA1_x=200" + * ./ns3 run "wifi-power-adaptation-distance --manager=ns3::AparfWifiManager --outputFileName=aparf --stepsSize=-1 --STA1_x=200" * \endcode * * To enable the log of rate and power changes: diff --git a/examples/wireless/wifi-power-adaptation-interference.cc b/examples/wireless/wifi-power-adaptation-interference.cc index e25b46eb0..d974e6127 100644 --- a/examples/wireless/wifi-power-adaptation-interference.cc +++ b/examples/wireless/wifi-power-adaptation-interference.cc @@ -41,12 +41,12 @@ * * Example usage: * \code{.sh} - * ./ns3 --run "wifi-power-adaptation-interference --manager=ns3::AparfWifiManager --outputFileName=aparf" + * ./ns3 run "wifi-power-adaptation-interference --manager=ns3::AparfWifiManager --outputFileName=aparf" * \endcode * * Another example (changing STAs position): * \code{.sh} - * ./ns3 --run "wifi-power-adaptation-interference --manager=ns3::AparfWifiManager --outputFileName=aparf --STA1_x=5 --STA2_x=205" + * ./ns3 run "wifi-power-adaptation-interference --manager=ns3::AparfWifiManager --outputFileName=aparf --STA1_x=5 --STA2_x=205" * \endcode * * To enable the log of rate and power changes: diff --git a/examples/wireless/wifi-rate-adaptation-distance.cc b/examples/wireless/wifi-rate-adaptation-distance.cc index 706364c02..a072b3805 100644 --- a/examples/wireless/wifi-rate-adaptation-distance.cc +++ b/examples/wireless/wifi-rate-adaptation-distance.cc @@ -38,13 +38,13 @@ * - (if logging is enabled) the changes of rate to standard output. * * Example usage: - * ./ns3 --run "wifi-rate-adaptation-distance --standard=802.11a --staManager=ns3::MinstrelWifiManager --apManager=ns3::MinstrelWifiManager --outputFileName=minstrel" + * ./ns3 run "wifi-rate-adaptation-distance --standard=802.11a --staManager=ns3::MinstrelWifiManager --apManager=ns3::MinstrelWifiManager --outputFileName=minstrel" * * Another example (moving towards the AP): - * ./ns3 --run "wifi-rate-adaptation-distance --standard=802.11a --staManager=ns3::MinstrelWifiManager --apManager=ns3::MinstrelWifiManager --outputFileName=minstrel --stepsSize=1 --STA1_x=-200" + * ./ns3 run "wifi-rate-adaptation-distance --standard=802.11a --staManager=ns3::MinstrelWifiManager --apManager=ns3::MinstrelWifiManager --outputFileName=minstrel --stepsSize=1 --STA1_x=-200" * * Example for HT rates with SGI and channel width of 40MHz: - * ./ns3 --run "wifi-rate-adaptation-distance --staManager=ns3::MinstrelHtWifiManager --apManager=ns3::MinstrelHtWifiManager --outputFileName=minstrelHt --shortGuardInterval=true --channelWidth=40" + * ./ns3 run "wifi-rate-adaptation-distance --staManager=ns3::MinstrelHtWifiManager --apManager=ns3::MinstrelHtWifiManager --outputFileName=minstrelHt --shortGuardInterval=true --channelWidth=40" * * To enable the log of rate changes: * export NS_LOG=RateAdaptationDistance=level_info diff --git a/examples/wireless/wifi-simple-adhoc-grid.cc b/examples/wireless/wifi-simple-adhoc-grid.cc index 067ef17da..e2e700bc5 100644 --- a/examples/wireless/wifi-simple-adhoc-grid.cc +++ b/examples/wireless/wifi-simple-adhoc-grid.cc @@ -37,7 +37,7 @@ // There are a number of command-line options available to control // the default behavior. The list of available command-line options // can be listed with the following command: -// ./ns3 --run "wifi-simple-adhoc-grid --help" +// ./ns3 run "wifi-simple-adhoc-grid --help" // // Note that all ns-3 attributes (not just the ones exposed in the below // script) can be changed at command line; see the ns-3 documentation. @@ -47,21 +47,21 @@ // the default of 500m. // To see this effect, try running: // -// ./ns3 --run "wifi-simple-adhoc-grid --distance=500" -// ./ns3 --run "wifi-simple-adhoc-grid --distance=1000" -// ./ns3 --run "wifi-simple-adhoc-grid --distance=1500" +// ./ns3 run "wifi-simple-adhoc-grid --distance=500" +// ./ns3 run "wifi-simple-adhoc-grid --distance=1000" +// ./ns3 run "wifi-simple-adhoc-grid --distance=1500" // // The source node and sink node can be changed like this: // -// ./ns3 --run "wifi-simple-adhoc-grid --sourceNode=20 --sinkNode=10" +// ./ns3 run "wifi-simple-adhoc-grid --sourceNode=20 --sinkNode=10" // // This script can also be helpful to put the Wifi layer into verbose // logging mode; this command will turn on all wifi logging: // -// ./ns3 --run "wifi-simple-adhoc-grid --verbose=1" +// ./ns3 run "wifi-simple-adhoc-grid --verbose=1" // // By default, trace file writing is off-- to enable it, try: -// ./ns3 --run "wifi-simple-adhoc-grid --tracing=1" +// ./ns3 run "wifi-simple-adhoc-grid --tracing=1" // // When you are done tracing, you will notice many pcap trace files // in your directory. If you have tcpdump installed, you can try this: diff --git a/examples/wireless/wifi-simple-adhoc.cc b/examples/wireless/wifi-simple-adhoc.cc index 14efcd76f..2756e4ab0 100644 --- a/examples/wireless/wifi-simple-adhoc.cc +++ b/examples/wireless/wifi-simple-adhoc.cc @@ -26,15 +26,15 @@ // There are a number of command-line options available to control // the default behavior. The list of available command-line options // can be listed with the following command: -// ./ns3 --run "wifi-simple-adhoc --help" +// ./ns3 run "wifi-simple-adhoc --help" // // For instance, for this configuration, the physical layer will // stop successfully receiving packets when rss drops below -97 dBm. // To see this effect, try running: // -// ./ns3 --run "wifi-simple-adhoc --rss=-97 --numPackets=20" -// ./ns3 --run "wifi-simple-adhoc --rss=-98 --numPackets=20" -// ./ns3 --run "wifi-simple-adhoc --rss=-99 --numPackets=20" +// ./ns3 run "wifi-simple-adhoc --rss=-97 --numPackets=20" +// ./ns3 run "wifi-simple-adhoc --rss=-98 --numPackets=20" +// ./ns3 run "wifi-simple-adhoc --rss=-99 --numPackets=20" // // Note that all ns-3 attributes (not just the ones exposed in the below // script) can be changed at command line; see the documentation. @@ -42,7 +42,7 @@ // This script can also be helpful to put the Wifi layer into verbose // logging mode; this command will turn on all wifi logging: // -// ./ns3 --run "wifi-simple-adhoc --verbose=1" +// ./ns3 run "wifi-simple-adhoc --verbose=1" // // When you are done, you will notice two pcap trace files in your directory. // If you have tcpdump installed, you can try this: diff --git a/examples/wireless/wifi-simple-ht-hidden-stations.cc b/examples/wireless/wifi-simple-ht-hidden-stations.cc index 8c3f90976..b17fef12f 100644 --- a/examples/wireless/wifi-simple-ht-hidden-stations.cc +++ b/examples/wireless/wifi-simple-ht-hidden-stations.cc @@ -36,7 +36,7 @@ // This example considers two hidden stations in an 802.11n network which supports MPDU aggregation. // The user can specify whether RTS/CTS is used and can set the number of aggregated MPDUs. // -// Example: ./ns3 --run "wifi-simple-ht-hidden-stations --enableRts=1 --nMpdus=8" +// Example: ./ns3 run "wifi-simple-ht-hidden-stations --enableRts=1 --nMpdus=8" // // Network topology: // diff --git a/examples/wireless/wifi-simple-infra.cc b/examples/wireless/wifi-simple-infra.cc index 26701355c..6438295e9 100644 --- a/examples/wireless/wifi-simple-infra.cc +++ b/examples/wireless/wifi-simple-infra.cc @@ -27,15 +27,15 @@ // There are a number of command-line options available to control // the default behavior. The list of available command-line options // can be listed with the following command: -// ./ns3 --run "wifi-simple-infra --help" +// ./ns3 run "wifi-simple-infra --help" // // For instance, for this configuration, the physical layer will // stop successfully receiving packets when rss drops below -97 dBm. // To see this effect, try running: // -// ./ns3 --run "wifi-simple-infra --rss=-97 --numPackets=20" -// ./ns3 --run "wifi-simple-infra --rss=-98 --numPackets=20" -// ./ns3 --run "wifi-simple-infra --rss=-99 --numPackets=20" +// ./ns3 run "wifi-simple-infra --rss=-97 --numPackets=20" +// ./ns3 run "wifi-simple-infra --rss=-98 --numPackets=20" +// ./ns3 run "wifi-simple-infra --rss=-99 --numPackets=20" // // Note that all ns-3 attributes (not just the ones exposed in the below // script) can be changed at command line; see the documentation. @@ -43,7 +43,7 @@ // This script can also be helpful to put the Wifi layer into verbose // logging mode; this command will turn on all wifi logging: // -// ./ns3 --run "wifi-simple-infra --verbose=1" +// ./ns3 run "wifi-simple-infra --verbose=1" // // When you are done, you will notice two pcap trace files in your directory. // If you have tcpdump installed, you can try this: diff --git a/examples/wireless/wifi-simple-interference.cc b/examples/wireless/wifi-simple-interference.cc index 9c73bbdd1..af5d53734 100644 --- a/examples/wireless/wifi-simple-interference.cc +++ b/examples/wireless/wifi-simple-interference.cc @@ -58,7 +58,7 @@ // For instance, for this configuration, the interfering frame arrives // at -90 dBm with a time offset of 3.2 microseconds: // -// ./ns3 --run "wifi-simple-interference --Irss=-90 --delta=3.2" +// ./ns3 run "wifi-simple-interference --Irss=-90 --delta=3.2" // // Note that all ns-3 attributes (not just the ones exposed in the below // script) can be changed at command line; see the documentation. @@ -66,7 +66,7 @@ // This script can also be helpful to put the Wifi layer into verbose // logging mode; this command will turn on all wifi logging: // -// ./ns3 --run "wifi-simple-interference --verbose=1" +// ./ns3 run "wifi-simple-interference --verbose=1" // // When you are done, you will notice a pcap trace file in your directory. // If you have tcpdump installed, you can try this: @@ -77,7 +77,7 @@ // // Next, try this command and look at the tcpdump-- you should see two packets // that are no longer interfering: -// ./ns3 --run "wifi-simple-interference --delta=30000" +// ./ns3 run "wifi-simple-interference --delta=30000" #include "ns3/command-line.h" #include "ns3/config.h" diff --git a/examples/wireless/wifi-sleep.cc b/examples/wireless/wifi-sleep.cc index 98c8bd5da..4e899440e 100644 --- a/examples/wireless/wifi-sleep.cc +++ b/examples/wireless/wifi-sleep.cc @@ -31,7 +31,7 @@ // There are a number of command-line options available to control // the default behavior. The list of available command-line options // can be listed with the following command: -// ./ns3 --run "wifi-sleep --help" +// ./ns3 run "wifi-sleep --help" // // Note that all ns-3 attributes (not just the ones exposed in the below // script) can be changed at command line; see the documentation. @@ -39,7 +39,7 @@ // This script can also be helpful to put the Wifi layer into verbose // logging mode; this command will turn on all wifi logging: // -// ./ns3 --run "wifi-sleep --verbose=1" +// ./ns3 run "wifi-sleep --verbose=1" // // When you are done, you will notice four trace files in your directory: // two for the remaining energy on each node and two for the state transitions diff --git a/examples/wireless/wifi-spatial-reuse.cc b/examples/wireless/wifi-spatial-reuse.cc index b46275fc4..9a1cbd17b 100644 --- a/examples/wireless/wifi-spatial-reuse.cc +++ b/examples/wireless/wifi-spatial-reuse.cc @@ -42,15 +42,15 @@ // // In general, the program can be configured at run-time by passing command-line arguments. // The following command will display all of the available run-time help options: -// ./ns3 --run "wifi-spatial-reuse --help" +// ./ns3 run "wifi-spatial-reuse --help" // // By default, the script shows the benefit of the OBSS_PD spatial reuse script: -// ./ns3 --run wifi-spatial-reuse +// ./ns3 run wifi-spatial-reuse // Throughput for BSS 1: 6.6468 Mbit/s // Throughput for BSS 2: 6.6672 Mbit/s // // If one disables the OBSS_PD feature, a lower throughput is obtained per BSS: -// ./ns3 --run "wifi-spatial-reuse --enableObssPd=0" +// ./ns3 run "wifi-spatial-reuse --enableObssPd=0" // Throughput for BSS 1: 5.8692 Mbit/s // Throughput for BSS 2: 5.9364 Mbit/ // diff --git a/examples/wireless/wifi-timing-attributes.cc b/examples/wireless/wifi-timing-attributes.cc index 9fba122b7..2a28db958 100644 --- a/examples/wireless/wifi-timing-attributes.cc +++ b/examples/wireless/wifi-timing-attributes.cc @@ -38,7 +38,7 @@ // // Example: set slot time to 20 microseconds, while keeping other values as defined in the simulation script: // -// ./ns3 --run "wifi-timing-attributes --slot=20" +// ./ns3 run "wifi-timing-attributes --slot=20" // // Network topology: // diff --git a/examples/wireless/wifi-txop-aggregation.cc b/examples/wireless/wifi-txop-aggregation.cc index 87ddf4523..e4fbbc77c 100644 --- a/examples/wireless/wifi-txop-aggregation.cc +++ b/examples/wireless/wifi-txop-aggregation.cc @@ -57,7 +57,7 @@ // // The user can select the distance between the stations and the APs, can enable/disable the RTS/CTS mechanism // and can modify the duration of a TXOP. -// Example: ./ns3 --run "wifi-txop-aggregation --distance=10 --enableRts=0 --simulationTime=20" +// Example: ./ns3 run "wifi-txop-aggregation --distance=10 --enableRts=0 --simulationTime=20" // // The output prints the throughput and the maximum TXOP duration measured for the 4 cases/networks // described above. When default aggregation parameters are enabled, the diff --git a/src/applications/doc/applications.rst b/src/applications/doc/applications.rst index 7b3c5a6bf..7d7acaeb2 100644 --- a/src/applications/doc/applications.rst +++ b/src/applications/doc/applications.rst @@ -211,7 +211,7 @@ Examples For an example demonstrating HTTP applications run:: - $ ./ns3 --run 'three-gpp-http-example' + $ ./ns3 run 'three-gpp-http-example' By default, the example will print out the web page requests of the client and responses of the server and client receiving content packets by using LOG_INFO of ``ThreeGppHttpServer`` and ``ThreeGppHttpClient``. diff --git a/src/brite/doc/brite.rst b/src/brite/doc/brite.rst index c65c1bda9..e9bf2bb55 100644 --- a/src/brite/doc/brite.rst +++ b/src/brite/doc/brite.rst @@ -112,7 +112,7 @@ Examples For an example demonstrating BRITE integration run:: - $ ./ns3 --run 'brite-generic-example' + $ ./ns3 run 'brite-generic-example' By enabling the verbose parameter, the example will print out the node and edge information in a similar format to standard BRITE output. There are @@ -133,13 +133,13 @@ many other command-line parameters including confFile, tracing, and nix, describ The generic BRITE example also support visualization using pyviz, assuming python bindings in ns-3 are enabled:: - $ ./ns3 --run brite-generic-example --vis + $ ./ns3 run brite-generic-example --vis Simulations involving BRITE can also be used with MPI. The total number of MPI instances is passed to the BRITE topology helper where a modulo divide is used to assign the nodes for each AS to a MPI instance. An example can be found in src/brite/examples:: - $ mpirun -np 2 ./ns3 --run brite-MPI-example + $ mpirun -np 2 ./ns3 run brite-MPI-example Please see the ns-3 MPI documentation for information on setting up MPI with ns-3. diff --git a/src/click/doc/click.rst b/src/click/doc/click.rst index dc48e3dd2..e2b0c2f86 100644 --- a/src/click/doc/click.rst +++ b/src/click/doc/click.rst @@ -103,7 +103,7 @@ If it says 'enabled' beside 'NS-3 Click Integration Support', then you're good t Next, try running one of the examples:: - $ ./ns3 --run nsclick-simple-lan + $ ./ns3 run nsclick-simple-lan You may then view the resulting .pcap traces, which are named nsclick-simple-lan-0-0.pcap and nsclick-simple-lan-0-1.pcap. diff --git a/src/core/examples/hash-example.cc b/src/core/examples/hash-example.cc index e87c10288..b9ea67691 100644 --- a/src/core/examples/hash-example.cc +++ b/src/core/examples/hash-example.cc @@ -40,7 +40,7 @@ * Example Output: * \verbatim -./ns3 --run="hasher-example --time \ +./ns3 run="hasher-example --time \ --dict=/usr/share/dict/web2 \ --dict=/usr/share/dict/web2a \ --dict=/usr/share/dict/propernames \ diff --git a/src/core/examples/sample-log-time-format.cc b/src/core/examples/sample-log-time-format.cc index 8d7d9a7f7..71fbcae78 100644 --- a/src/core/examples/sample-log-time-format.cc +++ b/src/core/examples/sample-log-time-format.cc @@ -28,7 +28,7 @@ * occur at future times. When run with no arguments, it prints out * something like this: * \code - * $ ./ns3 --run sample-log-time-format + * $ ./ns3 run sample-log-time-format * RandomVariableStream:RandomVariableStream(0x184e3a0) * RandomVariableStream:UniformRandomVariable(0x184e3a0) * RandomVariableStream:SetStream(0x184e3a0, -1) @@ -60,7 +60,7 @@ * replacement function for printing time. This can be demonstrated * by setting the 'replace-time-printer' parameter to true: * \code - * ./ns3 --run 'sample-log-time-format --replaceTimePrinter=1' + * ./ns3 run 'sample-log-time-format --replaceTimePrinter=1' * RandomVariableStream:RandomVariableStream(0x15fb080) * RandomVariableStream:UniformRandomVariable(0x15fb080) * RandomVariableStream:SetStream(0x15fb080, -1) diff --git a/src/core/examples/sample-random-variable-stream.cc b/src/core/examples/sample-random-variable-stream.cc index 2c5b0ba28..59bef3fc6 100644 --- a/src/core/examples/sample-random-variable-stream.cc +++ b/src/core/examples/sample-random-variable-stream.cc @@ -28,7 +28,7 @@ * Example program illustrating use of ns3::RandomVariableStream * * This program can be run from ns3 such as - * `./ns3 --run sample-random-variable-stream` + * `./ns3 run sample-random-variable-stream` * * This program is about as simple as possible to display the use of ns-3 * to generate random numbers. By default, the uniform random variate that @@ -44,9 +44,9 @@ * 1. Through explicit call of SeedManager::SetSeed () and * SeedManager::SetRun () (commented out below) * 2. Through the passing of command line arguments such as: - * `./ns3 --command-template="%s --RngRun=" --run program-name` + * `./ns3 run program-name --command-template="%s --RngRun="` * 3. Through the use of the NS_GLOBAL_VALUE environment variable, such as: - * `$ NS_GLOBAL_VALUE="RngRun=" ./ns3 --run program-name` + * `$ NS_GLOBAL_VALUE="RngRun=" ./ns3 run program-name` * * For instance, setting the run number to 3 will change the program output to * 0.775417 diff --git a/src/core/examples/sample-random-variable.cc b/src/core/examples/sample-random-variable.cc index 3b2526f24..5676cea17 100644 --- a/src/core/examples/sample-random-variable.cc +++ b/src/core/examples/sample-random-variable.cc @@ -30,7 +30,7 @@ using namespace ns3; /** * This program can be run from ns3 such as - * `./ns3 --run sample-random-variable` + * `./ns3 run sample-random-variable` * * This program is about as simple as possible to display the use of ns-3 * to generate random numbers. By default, the uniform random variate that @@ -46,9 +46,9 @@ using namespace ns3; * 1. Through explicit call of SeedManager::SetSeed () and * SeedManager::SetRun () (commented out below) * 2. Through the passing of command line arguments such as: - * ./ns3 --command-template="%s --RngRun=" --run program-name` + * ./ns3 run program-name --command-template="%s --RngRun="` * 3. Through the use of the NS_GLOBAL_VALUE environment variable, such as: - * `$ NS_GLOBAL_VALUE="RngRun=" ./ns3 --run program-name` + * `$ NS_GLOBAL_VALUE="RngRun=" ./ns3 run program-name` * * For instance, setting the run number to 3 will change the program output to * 0.775417 diff --git a/src/core/model/command-line.h b/src/core/model/command-line.h index 57998205b..1c412acca 100644 --- a/src/core/model/command-line.h +++ b/src/core/model/command-line.h @@ -156,19 +156,19 @@ namespace ns3 { * Here is the output from a few runs of that program: * * \verbatim - $ ./ns3 --run="command-line-example" + $ ./ns3 run="command-line-example" intArg: 1 boolArg: false strArg: "strArg default" cbArg: "cbArg default" - $ ./ns3 --run="command-line-example --intArg=2 --boolArg --strArg=Hello --cbArg=World" + $ ./ns3 run="command-line-example --intArg=2 --boolArg --strArg=Hello --cbArg=World" intArg: 2 boolArg: true strArg: "Hello" cbArg: "World" - $ ./ns3 --run="command-line-example --help" + $ ./ns3 run="command-line-example --help" ns3-dev-command-line-example-debug [Program Arguments] [General Arguments] CommandLine example program. @@ -594,7 +594,7 @@ private: std::size_t m_NNonOptions; /**< The expected number of non-option arguments */ std::size_t m_nonOptionCount; /**< The number of actual non-option arguments seen so far. */ std::string m_usage; /**< The Usage string */ - std::string m_shortName; /**< The source file name (without `.cc`), as would be given to `ns3 --run` */ + std::string m_shortName; /**< The source file name (without `.cc`), as would be given to `ns3 run` */ }; // class CommandLine diff --git a/src/core/model/log.h b/src/core/model/log.h index 9e558db33..6213c5213 100644 --- a/src/core/model/log.h +++ b/src/core/model/log.h @@ -54,11 +54,11 @@ * Use the environment variable NS_LOG to define a ':'-separated list of * logging components to enable. For example (using bash syntax), * \code - * $ NS_LOG="OlsrAgent" ./ns3 --run ... + * $ NS_LOG="OlsrAgent" ./ns3 run ... * \endcode * would enable one component at all log levels. * \code - * $NS_LOG="OlsrAgent:Ipv4L3Protocol" ./ns3 --run ... + * $NS_LOG="OlsrAgent:Ipv4L3Protocol" ./ns3 run ... * \endcode * would enable two components, at all log levels, etc. * \c NS_LOG="*" will enable all available log components at all levels. diff --git a/src/core/model/test.cc b/src/core/model/test.cc index bbf8e3f12..8c619855c 100644 --- a/src/core/model/test.cc +++ b/src/core/model/test.cc @@ -325,7 +325,7 @@ TestCase::AddTestCase (TestCase *testCase, enum TestCase::TestDuration duration) /* To count the bad test names, use NS_LOG_UNCOND instead of NS_FATAL_ERROR, and the command - $ ./ns3 --run "test-runner --list" 2>&1 | grep "^Invalid" | wc + $ ./ns3 run "test-runner --list" 2>&1 | grep "^Invalid" | wc */ NS_LOG_UNCOND ("Invalid test name: cannot contain any of '" << badchars << "': " << testCase->m_name); diff --git a/src/core/test/random-variable-stream-test-suite.cc b/src/core/test/random-variable-stream-test-suite.cc index 22b3948f3..69f04a48d 100644 --- a/src/core/test/random-variable-stream-test-suite.cc +++ b/src/core/test/random-variable-stream-test-suite.cc @@ -301,7 +301,7 @@ public: * deterministic value of seed=3 and default run number=1 every time: * NS_GLOBAL_VALUE="RngSeed=3" ./test.py -s random-variable-stream-generators * or equivalently (to see log output): - * NS_LOG="RandomVariableStreamGenerators" NS_GLOBAL_VALUE="RngSeed=3" ./ns3 --run "test-runner --suite=random-variable-stream-generators" + * NS_LOG="RandomVariableStreamGenerators" NS_GLOBAL_VALUE="RngSeed=3" ./ns3 run "test-runner --suite=random-variable-stream-generators" * * Conversely, this command will cause this test suite to use a seed * based on time-of-day, and run number=0: diff --git a/src/fd-net-device/examples/fd-emu-onoff.cc b/src/fd-net-device/examples/fd-emu-onoff.cc index e83679e21..fc3e7d6f0 100644 --- a/src/fd-net-device/examples/fd-emu-onoff.cc +++ b/src/fd-net-device/examples/fd-emu-onoff.cc @@ -96,11 +96,11 @@ // // 6 - Run the server side: // -// server host: $ ./ns3 --run="fd-emu-onoff --serverMode=1" +// server host: $ ./ns3 run="fd-emu-onoff --serverMode=1" // // 7 - Run the client side: // -// client host: $ ./ns3 --run="fd-emu-onoff" +// client host: $ ./ns3 run="fd-emu-onoff" // #include diff --git a/src/fd-net-device/examples/fd-tap-ping.cc b/src/fd-net-device/examples/fd-tap-ping.cc index 2ea636de3..7511dacbb 100644 --- a/src/fd-net-device/examples/fd-tap-ping.cc +++ b/src/fd-net-device/examples/fd-tap-ping.cc @@ -66,7 +66,7 @@ // // 4) The example can be executed as follows using ns3: // -// ./ns3 --run fd-tap-ping --command-template="%s --tapNetwork= --tapMask=" +// ./ns3 run fd-tap-ping --command-template="%s --tapNetwork= --tapMask=" // #include "ns3/abort.h" diff --git a/src/fd-net-device/examples/fd2fd-onoff.cc b/src/fd-net-device/examples/fd2fd-onoff.cc index 9e2942d7b..8cf11a234 100644 --- a/src/fd-net-device/examples/fd2fd-onoff.cc +++ b/src/fd-net-device/examples/fd2fd-onoff.cc @@ -37,8 +37,8 @@ // // Steps to run the experiment: // -// $ ./ns3 --run="fd2fd-onoff" -// $ ./ns3 --run="fd2fd-onoff --tcpMode=1" +// $ ./ns3 run="fd2fd-onoff" +// $ ./ns3 run="fd2fd-onoff --tcpMode=1" // #include diff --git a/src/fd-net-device/examples/realtime-fd2fd-onoff.cc b/src/fd-net-device/examples/realtime-fd2fd-onoff.cc index 0f1f67f8a..f6c8f8d01 100644 --- a/src/fd-net-device/examples/realtime-fd2fd-onoff.cc +++ b/src/fd-net-device/examples/realtime-fd2fd-onoff.cc @@ -37,7 +37,7 @@ // // Steps to run the experiment: // -// $ ./ns3 --run="fd2fd-onoff" +// $ ./ns3 run="fd2fd-onoff" // #include diff --git a/src/internet/doc/tcp.rst b/src/internet/doc/tcp.rst index a2bf77488..04585ce9f 100644 --- a/src/internet/doc/tcp.rst +++ b/src/internet/doc/tcp.rst @@ -814,7 +814,7 @@ to 20 Mb/s) to create a higher BDP link, such as :: - ./ns3 --run "tcp-variants-comparison --transport_prot=TcpHtcp --bandwidth=20Mbps --duration=10" + ./ns3 run "tcp-variants-comparison --transport_prot=TcpHtcp --bandwidth=20Mbps --duration=10" More information (paper): http://www.hamilton.ie/net/htcp3.pdf diff --git a/src/lte/doc/source/lte-profiling.rst b/src/lte/doc/source/lte-profiling.rst index 795bec559..faca5a233 100644 --- a/src/lte/doc/source/lte-profiling.rst +++ b/src/lte/doc/source/lte-profiling.rst @@ -90,7 +90,7 @@ All timing tests had been run in a Intel Pentium IV 3.00 GHz machine with 512 Mb Also, as a reference configuration, the build has been configured static and optimized. The exact ``ns3`` command issued is: -``CXXFLAGS="-O3 -w" ./ns3 -d optimized configure --enable-static --enable-examples --enable-modules=lte`` +``CXXFLAGS="-O3 -w" ./ns3 configure -d optimized --enable-static --enable-examples --enable-modules=lte`` Results diff --git a/src/lte/doc/source/lte-user.rst b/src/lte/doc/source/lte-user.rst index ff12c38ff..dcc96fd9a 100644 --- a/src/lte/doc/source/lte-user.rst +++ b/src/lte/doc/source/lte-user.rst @@ -178,17 +178,17 @@ Supposing your simulation program is called ``src/lte/examples/lte-sim-with-input``, you can now pass these settings to the simulation program in the following way:: - ./ns3 --command-template="%s --ns3::ConfigStore::Filename=input-defaults.txt + ./ns3 run src/lte/examples/lte-sim-with-input + --command-template="%s --ns3::ConfigStore::Filename=input-defaults.txt --ns3::ConfigStore::Mode=Load --ns3::ConfigStore::FileFormat=RawText" - --run src/lte/examples/lte-sim-with-input Furthermore, you can generate a template input file with the following command:: - ./ns3 --command-template="%s --ns3::ConfigStore::Filename=input-defaults.txt + ./ns3 run src/lte/examples/lte-sim-with-input + --command-template="%s --ns3::ConfigStore::Filename=input-defaults.txt --ns3::ConfigStore::Mode=Save --ns3::ConfigStore::FileFormat=RawText" - --run src/lte/examples/lte-sim-with-input note that the above will put in the file ``input-defaults.txt`` *all* the default values that are registered in your particular build of the @@ -258,16 +258,16 @@ print a list of the attributes of a given object together with their description and default value passing ``--PrintAttributes=`` to a simulation program, like this:: - ./ns3 --run lena-simple --command-template="%s --PrintAttributes=ns3::LteHelper" + ./ns3 run lena-simple --command-template="%s --PrintAttributes=ns3::LteHelper" You can try also with other LTE and EPC objects, like this:: - ./ns3 --run lena-simple --command-template="%s --PrintAttributes=ns3::LteEnbNetDevice" - ./ns3 --run lena-simple --command-template="%s --PrintAttributes=ns3::LteEnbMac" - ./ns3 --run lena-simple --command-template="%s --PrintAttributes=ns3::LteEnbPhy" - ./ns3 --run lena-simple --command-template="%s --PrintAttributes=ns3::LteUePhy" - ./ns3 --run lena-simple --command-template="%s --PrintAttributes=ns3::PointToPointEpcHelper" + ./ns3 run lena-simple --command-template="%s --PrintAttributes=ns3::LteEnbNetDevice" + ./ns3 run lena-simple --command-template="%s --PrintAttributes=ns3::LteEnbMac" + ./ns3 run lena-simple --command-template="%s --PrintAttributes=ns3::LteEnbPhy" + ./ns3 run lena-simple --command-template="%s --PrintAttributes=ns3::LteUePhy" + ./ns3 run lena-simple --command-template="%s --PrintAttributes=ns3::PointToPointEpcHelper" @@ -990,7 +990,7 @@ Then we setup two virtual ethernet interfaces, and start wireshark to look at th We can now run the example program with the simulated clock:: - ./ns3 --run lena-simple-epc-emu --command="%s --ns3::EmuEpcHelper::sgwDeviceName=veth0 + ./ns3 run lena-simple-epc-emu --command="%s --ns3::EmuEpcHelper::sgwDeviceName=veth0 --ns3::EmuEpcHelper::enbDeviceName=veth1" @@ -999,13 +999,13 @@ packets exchanged both in uplink and downlink. The default setting of the example program is 1 eNB and 1UE. You can change this via command line parameters, e.g.:: - ./ns3 --run lena-simple-epc-emu --command="%s --ns3::EmuEpcHelper::sgwDeviceName=veth0 + ./ns3 run lena-simple-epc-emu --command="%s --ns3::EmuEpcHelper::sgwDeviceName=veth0 --ns3::EmuEpcHelper::enbDeviceName=veth1 --nEnbs=2 --nUesPerEnb=2" To get a list of the available parameters:: - ./ns3 --run lena-simple-epc-emu --command="%s --PrintHelp" + ./ns3 run lena-simple-epc-emu --command="%s --PrintHelp" @@ -1022,7 +1022,7 @@ linked modules:: Then run the example program like this:: - ./ns3 --run lena-simple-epc-emu --command="%s --ns3::EmuEpcHelper::sgwDeviceName=veth0 + ./ns3 run lena-simple-epc-emu --command="%s --ns3::EmuEpcHelper::sgwDeviceName=veth0 --ns3::EmuEpcHelper::enbDeviceName=veth1 --SimulatorImplementationType=ns3::RealtimeSimulatorImpl --ns3::RealtimeSimulatorImpl::SynchronizationMode=HardLimit" @@ -1384,7 +1384,7 @@ cases. However, users may set the eNodeB to "closed" by setting the boolean attribute ``LteEnbRrc::AdmitHandoverRequest`` to `false`. As an example, you can run the ``lena-x2-handover`` program and setting the attribute in this way:: - NS_LOG=EpcX2:LteEnbRrc ./ns3 --run lena-x2-handover --command="%s --ns3::LteEnbRrc::AdmitHandoverRequest=false" + NS_LOG=EpcX2:LteEnbRrc ./ns3 run lena-x2-handover --command="%s --ns3::LteEnbRrc::AdmitHandoverRequest=false" After the above three requirements are fulfilled, the handover procedure can be triggered manually or automatically. Each will be presented in the following @@ -1621,13 +1621,13 @@ The example program ``src/lte/examples/lena-x2-handover.cc`` illustrates how the all above instructions can be integrated in a simulation program. You can run the program like this:: - ./ns3 --run lena-x2-handover + ./ns3 run lena-x2-handover and it will output the messages printed by the custom handover trace hooks. In order additionally visualize some meaningful logging information, you can run the program like this:: - NS_LOG=LteEnbRrc:LteUeRrc:EpcX2 ./ns3 --run lena-x2-handover + NS_LOG=LteEnbRrc:LteUeRrc:EpcX2 ./ns3 run lena-x2-handover Frequency Reuse Algorithms @@ -2051,7 +2051,7 @@ be found in the literature. Here we list some of them: changing the corresponding global variables. To get a list of all these global variables, you can run this command:: - ./ns3 --run lena-dual-stripe --command-template="%s --PrintGlobals" + ./ns3 run lena-dual-stripe --command-template="%s --PrintGlobals" The following subsection presents an example of running a simulation campaign using this example program. @@ -2188,7 +2188,7 @@ appending the parameters and their values to the ``ns3`` call when starting each individual simulation. So the ``ns3`` calls for invoking our 3 simulations would look as below:: - $ ./ns3 --run="lena-dual-stripe + $ ./ns3 run="lena-dual-stripe --simTime=50 --nBlocks=0 --nMacroEnbSites=7 --nMacroEnbSitesX=2 --epc=1 --useUdp=0 --outdoorUeMinSpeed=16.6667 --outdoorUeMaxSpeed=16.6667 --ns3::LteHelper::HandoverAlgorithm=ns3::NoOpHandoverAlgorithm @@ -2198,7 +2198,7 @@ look as below:: --ns3::PhyStatsCalculator::UlSinrFilename=no-op-UlSinrStats.txt --RngRun=1" > no-op.txt - $ ./ns3 --run="lena-dual-stripe + $ ./ns3 run="lena-dual-stripe --simTime=50 --nBlocks=0 --nMacroEnbSites=7 --nMacroEnbSitesX=2 --epc=1 --useUdp=0 --outdoorUeMinSpeed=16.6667 --outdoorUeMaxSpeed=16.6667 --ns3::LteHelper::HandoverAlgorithm=ns3::A3RsrpHandoverAlgorithm @@ -2208,7 +2208,7 @@ look as below:: --ns3::PhyStatsCalculator::UlSinrFilename=a3-rsrp-UlSinrStats.txt --RngRun=1" > a3-rsrp.txt - $ ./ns3 --run="lena-dual-stripe + $ ./ns3 run="lena-dual-stripe --simTime=50 --nBlocks=0 --nMacroEnbSites=7 --nMacroEnbSitesX=2 --epc=1 --useUdp=0 --outdoorUeMinSpeed=16.6667 --outdoorUeMaxSpeed=16.6667 --ns3::LteHelper::HandoverAlgorithm=ns3::A2A4RsrqHandoverAlgorithm @@ -2365,7 +2365,7 @@ To run ``lena-frequency-reuse`` with different Frequency Reuse algorithms, user FR algorithm by overriding the default attribute ``ns3::LteHelper::FfrAlgorithm``. Example command to run ``lena-frequency-reuse`` with Soft FR algorithm is presented below:: - $ ./ns3 --run "lena-frequency-reuse --ns3::LteHelper::FfrAlgorithm=ns3::LteFrSoftAlgorithm" + $ ./ns3 run "lena-frequency-reuse --ns3::LteHelper::FfrAlgorithm=ns3::LteFrSoftAlgorithm" In these examples functionality to generate REM and spectrum analyzer trace was added. User can enable generation of it by setting ``generateRem`` and ``generateSpectrumTrace`` @@ -2374,7 +2374,7 @@ attributes. Command to generate REM for RB 1 in data channel from ``lena-frequency-reuse`` scenario with Soft FR algorithm is presented below:: - $ ./ns3 --run "lena-frequency-reuse --ns3::LteHelper::FfrAlgorithm=ns3::LteFrSoftAlgorithm + $ ./ns3 run "lena-frequency-reuse --ns3::LteHelper::FfrAlgorithm=ns3::LteFrSoftAlgorithm --generateRem=true --remRbId=1" Radio Environment Map for Soft FR is presented in Figure :ref:`fig-lte-soft-fr-1-rem`. @@ -2392,7 +2392,7 @@ Command to generate spectrum trace from ``lena-frequency-reuse`` scenario with Soft FFR algorithm is presented below (Spectrum Analyzer position needs to be configured inside script):: - $ ./ns3 --run "lena-frequency-reuse --ns3::LteHelper::FfrAlgorithm=ns3::LteFfrSoftAlgorithm + $ ./ns3 run "lena-frequency-reuse --ns3::LteHelper::FfrAlgorithm=ns3::LteFfrSoftAlgorithm --generateSpectrumTrace=true" Example spectrum analyzer trace is presented in figure :ref:`fig-lte-soft-ffr-2-spectrum-trace`. @@ -2415,7 +2415,7 @@ along entire system bandwidth. User needs to specify FR algorithm by overriding the default attribute ``ns3::LteHelper::FfrAlgorithm``. Example command to run ``lena-dual-stripe`` with Hard FR algorithm is presented below:: - $ ./ns3 --run="lena-dual-stripe + $ ./ns3 run="lena-dual-stripe --simTime=50 --nBlocks=0 --nMacroEnbSites=7 --nMacroEnbSitesX=2 --epc=1 --useUdp=0 --outdoorUeMinSpeed=16.6667 --outdoorUeMaxSpeed=16.6667 --ns3::LteHelper::HandoverAlgorithm=ns3::NoOpHandoverAlgorithm @@ -2429,7 +2429,7 @@ Example command to run ``lena-dual-stripe`` with Hard FR algorithm is presented Example command to generate REM for RB 1 in data channel from ``lena-dual-stripe`` scenario with Hard FR algorithm is presented below:: - $ ./ns3 --run="lena-dual-stripe + $ ./ns3 run="lena-dual-stripe --simTime=50 --nBlocks=0 --nMacroEnbSites=7 --nMacroEnbSitesX=2 --epc=0 --useUdp=0 --outdoorUeMinSpeed=16.6667 --outdoorUeMaxSpeed=16.6667 --ns3::LteHelper::HandoverAlgorithm=ns3::NoOpHandoverAlgorithm @@ -2488,7 +2488,7 @@ to check the performance. A new column is added to PHY and MAC traces to indicat The test suite ``lte-carrier-aggregation`` is also a test program that can be used as an example as it can be run in a mode to write results to output files by setting the ``s_writeResults`` boolean static variable to true. The test can be run by using a `test-runner`: - ./ns3 --run 'test-runner --suite=lte-carrier-aggregation' + ./ns3 run 'test-runner --suite=lte-carrier-aggregation' To plot the test results, a file has to be created in the root folder of the ns-3 repository, and added to it with the following content : @@ -2563,14 +2563,14 @@ writes it into a file for plotting purposes. For example, to simulate the "Scena A" with *Ideal* and *Real* RRC protocol a user can use the following commands:: Ideal RRC: - ./ns3 --run "lena-radio-link-failure + ./ns3 run "lena-radio-link-failure --numberOfEnbs=1 --useIdealRrc=1 --interSiteDistance=1200 --n310=1 --n311=1 --t310=1 --enableCtrlErrorModel=1 --enableDataErrorModel=1 --simTime=25" Real RRC: - ./ns3 --run "lena-radio-link-failure + ./ns3 run "lena-radio-link-failure --numberOfEnbs=1 --useIdealRrc=0 --interSiteDistance=1200 --n310=1 --n311=1 --t310=1 --enableCtrlErrorModel=1 @@ -2632,14 +2632,14 @@ Similarly, to simulate the "Scenario B" with *Ideal* and *Real* RRC protocol following commands can be used:: Ideal RRC: - ./ns3 --run "lena-radio-link-failure + ./ns3 run "lena-radio-link-failure --numberOfEnbs=2 --useIdealRrc=1 --interSiteDistance=1200 --n310=1 --n311=1 --t310=1 --enableCtrlErrorModel=1 --enableDataErrorModel=1 --simTime=25" Real RRC: - ./ns3 --run "lena-radio-link-failure + ./ns3 run "lena-radio-link-failure --numberOfEnbs=2 --useIdealRrc=0 --interSiteDistance=1200 --n310=1 --n311=1 --t310=1 --enableCtrlErrorModel=1 diff --git a/src/lte/examples/lena-cqi-threshold.cc b/src/lte/examples/lena-cqi-threshold.cc index 436f880a1..b24f632d0 100644 --- a/src/lte/examples/lena-cqi-threshold.cc +++ b/src/lte/examples/lena-cqi-threshold.cc @@ -67,10 +67,10 @@ int main (int argc, char *argv[]) cmd.Parse (argc, argv); // to save a template default attribute file run it like this: - // ./ns3 --command-template="%s --ns3::ConfigStore::Filename=input-defaults.txt --ns3::ConfigStore::Mode=Save --ns3::ConfigStore::FileFormat=RawText" --run src/lte/examples/lena-first-sim + // ./ns3 run src/lte/examples/lena-first-sim --command-template="%s --ns3::ConfigStore::Filename=input-defaults.txt --ns3::ConfigStore::Mode=Save --ns3::ConfigStore::FileFormat=RawText" // // to load a previously created default attribute file - // ./ns3 --command-template="%s --ns3::ConfigStore::Filename=input-defaults.txt --ns3::ConfigStore::Mode=Load --ns3::ConfigStore::FileFormat=RawText" --run src/lte/examples/lena-first-sim + // ./ns3 run src/lte/examples/lena-first-sim --command-template="%s --ns3::ConfigStore::Filename=input-defaults.txt --ns3::ConfigStore::Mode=Load --ns3::ConfigStore::FileFormat=RawText" ConfigStore inputConfig; inputConfig.ConfigureDefaults (); diff --git a/src/lte/examples/lena-fading.cc b/src/lte/examples/lena-fading.cc index e382191dd..965feb8a1 100644 --- a/src/lte/examples/lena-fading.cc +++ b/src/lte/examples/lena-fading.cc @@ -37,10 +37,10 @@ int main (int argc, char *argv[]) cmd.Parse (argc, argv); // to save a template default attribute file run it like this: - // ./ns3 --command-template="%s --ns3::ConfigStore::Filename=input-defaults.txt --ns3::ConfigStore::Mode=Save --ns3::ConfigStore::FileFormat=RawText" --run src/lte/examples/lena-first-sim + // ./ns3 run src/lte/examples/lena-first-sim --command-template="%s --ns3::ConfigStore::Filename=input-defaults.txt --ns3::ConfigStore::Mode=Save --ns3::ConfigStore::FileFormat=RawText" // // to load a previously created default attribute file - // ./ns3 --command-template="%s --ns3::ConfigStore::Filename=input-defaults.txt --ns3::ConfigStore::Mode=Load --ns3::ConfigStore::FileFormat=RawText" --run src/lte/examples/lena-first-sim + // ./ns3 run src/lte/examples/lena-first-sim --command-template="%s --ns3::ConfigStore::Filename=input-defaults.txt --ns3::ConfigStore::Mode=Load --ns3::ConfigStore::FileFormat=RawText" //ConfigStore inputConfig; //inputConfig.ConfigureDefaults (); diff --git a/src/lte/examples/lena-radio-link-failure.cc b/src/lte/examples/lena-radio-link-failure.cc index e2a3bf3bf..4a3977dcc 100644 --- a/src/lte/examples/lena-radio-link-failure.cc +++ b/src/lte/examples/lena-radio-link-failure.cc @@ -266,7 +266,7 @@ Throughput (bool firstWrite, Time binSize, std::string fileName) * * The example can be run as follows: * - * ./ns3 --run "lena-radio-link-failure --numberOfEnbs=1 --simTime=25" + * ./ns3 run "lena-radio-link-failure --numberOfEnbs=1 --simTime=25" */ int main (int argc, char *argv[]) diff --git a/src/lte/examples/lena-rem.cc b/src/lte/examples/lena-rem.cc index f2b2439f2..7e2a2e819 100644 --- a/src/lte/examples/lena-rem.cc +++ b/src/lte/examples/lena-rem.cc @@ -37,10 +37,10 @@ int main (int argc, char *argv[]) cmd.Parse (argc, argv); // to save a template default attribute file run it like this: - // ./ns3 --command-template="%s --ns3::ConfigStore::Filename=input-defaults.txt --ns3::ConfigStore::Mode=Save --ns3::ConfigStore::FileFormat=RawText" --run src/lte/examples/lena-first-sim + // ./ns3 run src/lte/examples/lena-first-sim --command-template="%s --ns3::ConfigStore::Filename=input-defaults.txt --ns3::ConfigStore::Mode=Save --ns3::ConfigStore::FileFormat=RawText" // // to load a previously created default attribute file - // ./ns3 --command-template="%s --ns3::ConfigStore::Filename=input-defaults.txt --ns3::ConfigStore::Mode=Load --ns3::ConfigStore::FileFormat=RawText" --run src/lte/examples/lena-first-sim + // ./ns3 run src/lte/examples/lena-first-sim --command-template="%s --ns3::ConfigStore::Filename=input-defaults.txt --ns3::ConfigStore::Mode=Load --ns3::ConfigStore::FileFormat=RawText" ConfigStore inputConfig; inputConfig.ConfigureDefaults (); diff --git a/src/lte/examples/lena-simple.cc b/src/lte/examples/lena-simple.cc index 8b7a745af..355849bcf 100644 --- a/src/lte/examples/lena-simple.cc +++ b/src/lte/examples/lena-simple.cc @@ -39,10 +39,10 @@ int main (int argc, char *argv[]) cmd.Parse (argc, argv); // to save a template default attribute file run it like this: - // ./ns3 --command-template="%s --ns3::ConfigStore::Filename=input-defaults.txt --ns3::ConfigStore::Mode=Save --ns3::ConfigStore::FileFormat=RawText" --run src/lte/examples/lena-simple + // ./ns3 run src/lte/examples/lena-first-sim --command-template="%s --ns3::ConfigStore::Filename=input-defaults.txt --ns3::ConfigStore::Mode=Save --ns3::ConfigStore::FileFormat=RawText" // // to load a previously created default attribute file - // ./ns3 --command-template="%s --ns3::ConfigStore::Filename=input-defaults.txt --ns3::ConfigStore::Mode=Load --ns3::ConfigStore::FileFormat=RawText" --run src/lte/examples/lena-simple + // ./ns3 run src/lte/examples/lena-first-sim --command-template="%s --ns3::ConfigStore::Filename=input-defaults.txt --ns3::ConfigStore::Mode=Load --ns3::ConfigStore::FileFormat=RawText" ConfigStore inputConfig; inputConfig.ConfigureDefaults (); diff --git a/src/lte/test/epc-test-run-time.pl b/src/lte/test/epc-test-run-time.pl index 6bb138a05..2a2ca1262 100755 --- a/src/lte/test/epc-test-run-time.pl +++ b/src/lte/test/epc-test-run-time.pl @@ -14,10 +14,10 @@ my @simTime = (5, 10); # Configure and complite first the program to avoid counting compilation time as running time -my $launch = "CXXFLAGS=\"-O3 -w\" ./ns3 -d optimized configure --enable-static --enable-examples --enable-modules=lte"; +my $launch = "CXXFLAGS=\"-O3 -w\" ./ns3 configure -d optimized --enable-static --enable-examples --enable-modules=lte"; my $out, my $err; capture { system($launch ) } \$out, \$err; -$launch = "./ns3 --run \'lena-profiling --simTime=0.1 --nUe=1 --nEnb=1 --nFloors=0\'"; +$launch = "./ns3 run \'lena-profiling --simTime=0.1 --nUe=1 --nEnb=1 --nFloors=0\'"; foreach my $time (@simTime) { @@ -26,7 +26,7 @@ foreach my $time (@simTime) my $timeStats = Statistics::Descriptive::Full->new(); for ( my $iteration = 0 ; $iteration < $nIterations ; $iteration++ ) { - $launch = "time -f \"real%E\" ./ns3 --run 'lena-simple-epc --simTime=$time --numberOfNodes=$node'"; + $launch = "time -f \"real%E\" ./ns3 run 'lena-simple-epc --simTime=$time --numberOfNodes=$node'"; print "$launch\n"; capture { system($launch ) } \$out, \$err; $err =~ /real(.+):(.+)/; diff --git a/src/lte/test/lte-test-run-time.pl b/src/lte/test/lte-test-run-time.pl index e15ac2b62..e0390cda9 100755 --- a/src/lte/test/lte-test-run-time.pl +++ b/src/lte/test/lte-test-run-time.pl @@ -14,11 +14,11 @@ my @nFloors = (0, 1); my @simTime = (5, 10); # Configure and complite first the program to avoid counting compilation time as running time -my $launch = "CXXFLAGS=\"-O3 -w\" ./ns3 -d optimized configure --enable-static --enable-examples --enable-modules=lte"; +my $launch = "CXXFLAGS=\"-O3 -w\" ./ns3 configure -d optimized --enable-static --enable-examples --enable-modules=lte"; my $out; my $err; capture { system($launch ) } \$out, \$err; -$launch = "./ns3 --run \'lena-profiling --simTime=0.1 --nUe=1 --nEnb=1 --nFloors=0\'"; +$launch = "./ns3 run \'lena-profiling --simTime=0.1 --nUe=1 --nEnb=1 --nFloors=0\'"; capture { system($launch ) } \$out, \$err; foreach my $time (@simTime) @@ -32,7 +32,7 @@ foreach my $time (@simTime) my $timeStats = Statistics::Descriptive::Full->new(); for ( my $iteration = 0 ; $iteration < $nIterations ; $iteration++ ) { - $launch = "time -f \"real%E\" ./ns3 --run \'lena-profiling --simTime=$time --nUe=$ue --nEnb=$enb --nFloors=$floor\'"; + $launch = "time -f \"real%E\" ./ns3 run \'lena-profiling --simTime=$time --nUe=$ue --nEnb=$enb --nFloors=$floor\'"; print "$launch\n"; capture { system($launch ) } \$out, \$err; $err =~ /real(.+):(.+)/; diff --git a/src/mobility/doc/mobility.rst b/src/mobility/doc/mobility.rst index 5de907dbb..21fbce5d2 100644 --- a/src/mobility/doc/mobility.rst +++ b/src/mobility/doc/mobility.rst @@ -287,7 +287,7 @@ Example usage: .. sourcecode:: bash - $ ./ns3 --run "ns2-mobility-trace \ + $ ./ns3 run "ns2-mobility-trace \ --traceFile=src/mobility/examples/default.ns_movements \ --nodeNum=2 \ --duration=100.0 \ diff --git a/src/mobility/examples/bonnmotion-ns2-example.cc b/src/mobility/examples/bonnmotion-ns2-example.cc index 439c6d272..60fb97f84 100644 --- a/src/mobility/examples/bonnmotion-ns2-example.cc +++ b/src/mobility/examples/bonnmotion-ns2-example.cc @@ -37,7 +37,7 @@ * * Finally, note that you can visualize this program using the pyviz * visualizer: - * ./ns3 --run bonnmotion-ns2-example --vis + * ./ns3 run bonnmotion-ns2-example --vis */ #include "ns3/core-module.h" diff --git a/src/mobility/examples/ns2-mobility-trace.cc b/src/mobility/examples/ns2-mobility-trace.cc index 142ceac01..04e51f675 100644 --- a/src/mobility/examples/ns2-mobility-trace.cc +++ b/src/mobility/examples/ns2-mobility-trace.cc @@ -36,7 +36,7 @@ * * Usage of ns2-mobility-trace: * - * ./ns3 --run "ns2-mobility-trace \ + * ./ns3 run "ns2-mobility-trace \ * --traceFile=src/mobility/examples/default.ns_movements * --nodeNum=2 --duration=100.0 --logFile=ns2-mobility-trace.log" * @@ -94,7 +94,7 @@ int main (int argc, char *argv[]) if (traceFile.empty () || nodeNum <= 0 || duration <= 0 || logFile.empty ()) { std::cout << "Usage of " << argv[0] << " :\n\n" - "./ns3 --run \"ns2-mobility-trace" + "./ns3 run \"ns2-mobility-trace" " --traceFile=src/mobility/examples/default.ns_movements" " --nodeNum=2 --duration=100.0 --logFile=ns2-mob.log\" \n\n" "NOTE: ns2-traces-file could be an absolute or relative path. You could use the file default.ns_movements\n" diff --git a/src/mpi/doc/distributed.rst b/src/mpi/doc/distributed.rst index 4aca6d6bb..759a77560 100644 --- a/src/mpi/doc/distributed.rst +++ b/src/mpi/doc/distributed.rst @@ -188,7 +188,7 @@ If you already built |ns3| without MPI enabled, you must re-build:: Configure |ns3| with the --enable-mpi option:: - $ ./ns3 -d debug configure --enable-examples --enable-tests --enable-mpi + $ ./ns3 configure -d debug --enable-examples --enable-tests --enable-mpi Ensure that MPI is enabled by checking the optional features shown from the output of configure. @@ -204,12 +204,12 @@ the `--command-template` way of running the mpiexec program, or to use `./ns3 shell` and run the executables directly on the command line. Here are a few examples (from the root |ns3| directory):: - $ ./ns3 --command-template="mpiexec -np 2 %s" --run simple-distributed - $ ./ns3 --command-template="mpiexec -np 2 -machinefile mpihosts %s --nix=0" --run nms-p2p-nix-distributed + $ ./ns3 run simple-distributed --command-template="mpiexec -np 2 %s" + $ ./ns3 run nms-p2p-nix-distributed --command-template="mpiexec -np 2 -machinefile mpihosts %s --nix=0" An example using the null message synchronization algorithm:: - $ ./ns3 --command-template="mpiexec -np 2 %s --nullmsg" --run simple-distributed + $ ./ns3 run simple-distributed --command-template="mpiexec -np 2 %s --nullmsg" The np switch is the number of logical processors to use. The machinefile switch is which machines to use. In order to use machinefile, the target file must diff --git a/src/netanim/doc/animation.rst b/src/netanim/doc/animation.rst index b0e63cd62..24deb4a5a 100644 --- a/src/netanim/doc/animation.rst +++ b/src/netanim/doc/animation.rst @@ -145,8 +145,8 @@ Example: .. sourcecode:: bash - $ ./ns3 -d debug configure --enable-examples - $ ./ns3 --run "dumbbell-animation" + $ ./ns3 configure -d debug --enable-examples + $ ./ns3 run "dumbbell-animation" The above will create an XML file dumbbell-animation.xml diff --git a/src/nix-vector-routing/doc/nix-vector-routing.rst b/src/nix-vector-routing/doc/nix-vector-routing.rst index 64c991aa4..c4c545f60 100644 --- a/src/nix-vector-routing/doc/nix-vector-routing.rst +++ b/src/nix-vector-routing/doc/nix-vector-routing.rst @@ -175,14 +175,14 @@ There are examples which use both IPv4 and IPv6 networking. .. code-block:: bash # By default IPv4 network is selected - ./ns3 --run nix-simple + ./ns3 run nix-simple b. Using IPv6: .. code-block:: bash # Use the --useIPv6 flag - ./ns3 --run "nix-simple --useIPv6" + ./ns3 run "nix-simple --useIPv6" @@ -199,14 +199,14 @@ There are examples which use both IPv4 and IPv6 networking. .. code-block:: bash # By default IPv4 network is selected - ./ns3 --run nms-p2p-nix + ./ns3 run nms-p2p-nix b. Using IPv6: .. code-block:: bash # Use the --useIPv6 flag - ./ns3 --run "nms-p2p-nix --useIPv6" + ./ns3 run "nms-p2p-nix --useIPv6" 3. nix-simple-multi-address.cc @@ -217,7 +217,7 @@ There are examples which use both IPv4 and IPv6 networking. .. code-block:: bash # By default IPv4 network is selected - ./ns3 --run nix-simple-multi-address + ./ns3 run nix-simple-multi-address 4. nix-double-wifi.cc @@ -230,15 +230,15 @@ There are examples which use both IPv4 and IPv6 networking. .. code-block:: bash # By default IPv4 network is selected - ./ns3 --run nix-double-wifi + ./ns3 run nix-double-wifi # Use the --enableNixLog to enable NixVectorRouting logging. - ./ns3 --run "nix-double-wifi --enableNixLog" + ./ns3 run "nix-double-wifi --enableNixLog" b. Using IPv6: .. code-block:: bash # Use the --useIPv6 flag - ./ns3 --run "nix-double-wifi --useIPv6" + ./ns3 run "nix-double-wifi --useIPv6" # Use the --enableNixLog to enable NixVectorRouting logging. - ./ns3 --run "nix-double-wifi --useIPv6 --enableNixLog" \ No newline at end of file + ./ns3 run "nix-double-wifi --useIPv6 --enableNixLog" \ No newline at end of file diff --git a/src/olsr/examples/olsr-hna.cc b/src/olsr/examples/olsr-hna.cc index d2cdde2be..3bd606c40 100644 --- a/src/olsr/examples/olsr-hna.cc +++ b/src/olsr/examples/olsr-hna.cc @@ -35,19 +35,19 @@ // If no HNA message is generated by B, a will not be able to form a route to C. // This can be verified as follows: // -// ./ns3 --run olsr-hna +// ./ns3 run olsr-hna // // There are two ways to make a node to generate HNA messages. // // One way is to use olsr::RoutingProtocol::SetRoutingTableAssociation () // to use which you may run: // -// ./ns3 --run "olsr-hna --assocMethod1=1" +// ./ns3 run "olsr-hna --assocMethod1=1" // // The other way is to use olsr::RoutingProtocol::AddHostNetworkAssociation () // to use which you may run: // -// ./ns3 --run "olsr-hna --assocMethod2=1" +// ./ns3 run "olsr-hna --assocMethod2=1" // #include diff --git a/src/openflow/doc/openflow-switch.rst b/src/openflow/doc/openflow-switch.rst index 8efb16491..923815e05 100644 --- a/src/openflow/doc/openflow-switch.rst +++ b/src/openflow/doc/openflow-switch.rst @@ -172,11 +172,11 @@ Examples For an example demonstrating its use in a simple learning controller/switch, run:: - $ ./ns3 --run openflow-switch + $ ./ns3 run openflow-switch To see it in detailed logging, run:: - $ ./ns3 --run "openflow-switch -v" + $ ./ns3 run "openflow-switch -v" Helpers diff --git a/src/point-to-point-layout/doc/point-to-point-dumbbell.rst b/src/point-to-point-layout/doc/point-to-point-dumbbell.rst index ff16f0ec1..22811b415 100644 --- a/src/point-to-point-layout/doc/point-to-point-dumbbell.rst +++ b/src/point-to-point-layout/doc/point-to-point-dumbbell.rst @@ -145,22 +145,22 @@ The example for this helper is `dumbbell-animation.cc` located in ``src/netanim/examples``. The following command shows the available command- line options for this example:: - $ ./ns3 --run "dumbbell-animation --PrintHelp" + $ ./ns3 run "dumbbell-animation --PrintHelp" The following command sets up a dumbbell topology with the default configuration:: - $ ./ns3 --run dumbbell-animation + $ ./ns3 run dumbbell-animation The following command sets up a dumbbell topology with 6 left leaf nodes and 9 right leaf nodes:: - $ ./ns3 --run "dumbbell-animation --nLeftLeaf=6 --nRightLeaf=9" + $ ./ns3 run "dumbbell-animation --nLeftLeaf=6 --nRightLeaf=9" The following command sets up a dumbbell topology with 10 left leaf nodes and 10 right leaf nodes:: - $ ./ns3 --run "dumbbell-animation --nLeaf=10" + $ ./ns3 run "dumbbell-animation --nLeaf=10" The expected output from the previous commands is a XML file to playback the animation using NetAnim. diff --git a/src/tap-bridge/examples/tap-csma-virtual-machine.cc b/src/tap-bridge/examples/tap-csma-virtual-machine.cc index 9602b0c18..292040d77 100644 --- a/src/tap-bridge/examples/tap-csma-virtual-machine.cc +++ b/src/tap-bridge/examples/tap-csma-virtual-machine.cc @@ -97,7 +97,7 @@ main (int argc, char *argv[]) // devices installed on both of the nodes. The data rate and delay for the // channel can be set through the command-line parser. For example, // - // ./ns3 --run "tap=csma-virtual-machine --ns3::CsmaChannel::DataRate=10000000" + // ./ns3 run "tap=csma-virtual-machine --ns3::CsmaChannel::DataRate=10000000" // CsmaHelper csma; NetDeviceContainer devices = csma.Install (nodes); diff --git a/src/tap-bridge/examples/tap-csma.cc b/src/tap-bridge/examples/tap-csma.cc index f353a15d4..3e223abea 100644 --- a/src/tap-bridge/examples/tap-csma.cc +++ b/src/tap-bridge/examples/tap-csma.cc @@ -51,7 +51,7 @@ // // 1) Ping one of the simulated nodes // -// ./ns3 --run tap-csma& +// ./ns3 run tap-csma& // ping 10.1.1.2 // #include diff --git a/src/tap-bridge/examples/tap-wifi-dumbbell.cc b/src/tap-bridge/examples/tap-wifi-dumbbell.cc index c44aaf441..8f3c4caec 100644 --- a/src/tap-bridge/examples/tap-wifi-dumbbell.cc +++ b/src/tap-bridge/examples/tap-wifi-dumbbell.cc @@ -53,7 +53,7 @@ // // 1) Ping one of the simulated nodes on the left side of the topology. // -// ./ns3 --run tap-wifi-dumbbell& +// ./ns3 run tap-wifi-dumbbell& // ping 10.1.1.3 // // 2) Configure a route in the linux host and ping once of the nodes on the @@ -61,7 +61,7 @@ // delays due to CBR background traffic on the point-to-point (see next // item). // -// ./ns3 --run tap-wifi-dumbbell& +// ./ns3 run tap-wifi-dumbbell& // sudo route add -net 10.1.3.0 netmask 255.255.255.0 dev thetap gw 10.1.1.2 // ping 10.1.3.4 // @@ -77,7 +77,7 @@ // reflected in large delays seen by ping. You can crank down the CBR // traffic data rate and watch the ping timing change dramatically. // -// ./ns3 --run "tap-wifi-dumbbell --ns3::OnOffApplication::DataRate=100kb/s"& +// ./ns3 run "tap-wifi-dumbbell --ns3::OnOffApplication::DataRate=100kb/s"& // sudo route add -net 10.1.3.0 netmask 255.255.255.0 dev thetap gw 10.1.1.2 // ping 10.1.3.4 // @@ -93,7 +93,7 @@ // sudo brctl addif mybridge mytap1 // sudo brctl addif mybridge mytap2 // sudo ifconfig mybridge 10.1.1.5 netmask 255.255.255.0 up -// ./ns3 --run "tap-wifi-dumbbell --mode=UseBridge --tapName=mytap2"& +// ./ns3 run "tap-wifi-dumbbell --mode=UseBridge --tapName=mytap2"& // ping 10.1.1.3 #include diff --git a/src/test/ns3tcp/plot.gp b/src/test/ns3tcp/plot.gp index 5ec14d58f..431340164 100644 --- a/src/test/ns3tcp/plot.gp +++ b/src/test/ns3tcp/plot.gp @@ -22,7 +22,7 @@ # * logging output from Ns3TcpLossTest case must first be enabled # * by manually editing ns3-tcp-loss-test-suite.cc and setting # * WRITE_LOGGING to true. Then, the test suite should be re-run -# * with ./ns3 --run "test-runner --suite='ns3-tcp-loss'" +# * with ./ns3 run "test-runner --suite='ns3-tcp-loss'" # * This will generate a number of log files which are parsed # * below for eventual plotting to .eps format using gnuplot. # * To run this file in gnuplot, simply: gnuplot plot.gp diff --git a/src/traffic-control/doc/cobalt.rst b/src/traffic-control/doc/cobalt.rst index d32498f94..3af6c29c6 100644 --- a/src/traffic-control/doc/cobalt.rst +++ b/src/traffic-control/doc/cobalt.rst @@ -109,7 +109,7 @@ An example program named `cobalt-vs-codel.cc` is located in :: - $ ./ns3 --run cobalt-vs-codel + $ ./ns3 run cobalt-vs-codel Validation @@ -137,5 +137,5 @@ or :: - $ NS_LOG="CobaltQueueDisc" ./ns3 --run "test-runner --suite=cobalt-queue-disc" + $ NS_LOG="CobaltQueueDisc" ./ns3 run "test-runner --suite=cobalt-queue-disc" diff --git a/src/traffic-control/doc/codel.rst b/src/traffic-control/doc/codel.rst index fc2bfabfc..ccaebcca2 100644 --- a/src/traffic-control/doc/codel.rst +++ b/src/traffic-control/doc/codel.rst @@ -82,8 +82,8 @@ command-line options): .. sourcecode:: bash - $ ./ns3 --run "codel-vs-pfifo-basic-test --PrintHelp" - $ ./ns3 --run "codel-vs-pfifo-basic-test --queueType=CoDel --pcapFileName=codel.pcap --cwndTrFileName=cwndCodel.tr" + $ ./ns3 run "codel-vs-pfifo-basic-test --PrintHelp" + $ ./ns3 run "codel-vs-pfifo-basic-test --queueType=CoDel --pcapFileName=codel.pcap --cwndTrFileName=cwndCodel.tr" The expected output from the previous commands are two files: `codel.pcap` file and `cwndCoDel.tr` (ASCII trace) file The .pcap file can be analyzed using wireshark or tcptrace: @@ -97,8 +97,8 @@ deployment scenario. To run the file: .. sourcecode:: bash - $ ./ns3 --run "codel-vs-pfifo-asymmetric --PrintHelp" - $ ./ns3 --run codel-vs-pfifo-asymmetric + $ ./ns3 run "codel-vs-pfifo-asymmetric --PrintHelp" + $ ./ns3 run codel-vs-pfifo-asymmetric The expected output from the previous commands is six pcap files: @@ -145,5 +145,5 @@ or .. sourcecode:: bash - $ NS_LOG="CoDelQueueDisc" ./ns3 --run "test-runner --suite=codel-queue-disc" + $ NS_LOG="CoDelQueueDisc" ./ns3 run "test-runner --suite=codel-queue-disc" diff --git a/src/traffic-control/doc/fq-cobalt.rst b/src/traffic-control/doc/fq-cobalt.rst index 2bb39d04c..ad4c0e7f8 100644 --- a/src/traffic-control/doc/fq-cobalt.rst +++ b/src/traffic-control/doc/fq-cobalt.rst @@ -80,4 +80,4 @@ The test suite can be run using the following commands:: or:: - $ NS_LOG="FqCobaltQueueDisc" ./ns3 --run "test-runner --suite=fq-cobalt-queue-disc" + $ NS_LOG="FqCobaltQueueDisc" ./ns3 run "test-runner --suite=fq-cobalt-queue-disc" diff --git a/src/traffic-control/doc/fq-codel.rst b/src/traffic-control/doc/fq-codel.rst index df198105d..27bce2046 100644 --- a/src/traffic-control/doc/fq-codel.rst +++ b/src/traffic-control/doc/fq-codel.rst @@ -131,8 +131,8 @@ command-line options): .. sourcecode:: bash - $ ./ns3 --run "FqCoDel-L4S-example --PrintHelp" - $ ./ns3 --run "FqCoDel-L4S-example --scenarioNum=5" + $ ./ns3 run "FqCoDel-L4S-example --PrintHelp" + $ ./ns3 run "FqCoDel-L4S-example --scenarioNum=5" The expected output from the previous command are .dat files. @@ -162,7 +162,7 @@ or: .. sourcecode:: bash - $ NS_LOG="FqCoDelQueueDisc" ./ns3 --run "test-runner --suite=fq-codel-queue-disc" + $ NS_LOG="FqCoDelQueueDisc" ./ns3 run "test-runner --suite=fq-codel-queue-disc" Set associative hashing is tested by generating a probability collision graph. This graph is then overlapped with the theoretical graph provided in the original diff --git a/src/traffic-control/doc/fq-pie.rst b/src/traffic-control/doc/fq-pie.rst index 5776606dc..f9f8b620e 100644 --- a/src/traffic-control/doc/fq-pie.rst +++ b/src/traffic-control/doc/fq-pie.rst @@ -95,4 +95,4 @@ The test suite can be run using the following commands:: or:: - $ NS_LOG="FqPieQueueDisc" ./ns3 --run "test-runner --suite=fq-pie-queue-disc" + $ NS_LOG="FqPieQueueDisc" ./ns3 run "test-runner --suite=fq-pie-queue-disc" diff --git a/src/traffic-control/doc/mq.rst b/src/traffic-control/doc/mq.rst index ce4164b68..fdad38d8c 100644 --- a/src/traffic-control/doc/mq.rst +++ b/src/traffic-control/doc/mq.rst @@ -78,5 +78,5 @@ or :: - $ NS_LOG="WifiAcMappingTest" ./ns3 --run "test-runner --suite=ns3-wifi-ac-mapping" + $ NS_LOG="WifiAcMappingTest" ./ns3 run "test-runner --suite=ns3-wifi-ac-mapping" diff --git a/src/traffic-control/doc/pie.rst b/src/traffic-control/doc/pie.rst index d3dfb52ec..60e820772 100644 --- a/src/traffic-control/doc/pie.rst +++ b/src/traffic-control/doc/pie.rst @@ -72,8 +72,8 @@ command-line options): .. sourcecode:: bash - $ ./ns3 --run "pie-example --PrintHelp" - $ ./ns3 --run "pie-example --writePcap=1" + $ ./ns3 run "pie-example --PrintHelp" + $ ./ns3 run "pie-example --writePcap=1" The expected output from the previous commands are ten .pcap files. @@ -111,5 +111,5 @@ or alternatively (to see logging statements in a debug build): .. sourcecode:: bash - $ NS_LOG="PieQueueDisc" ./ns3 --run "test-runner --suite=pie-queue-disc" + $ NS_LOG="PieQueueDisc" ./ns3 run "test-runner --suite=pie-queue-disc" diff --git a/src/traffic-control/doc/prio.rst b/src/traffic-control/doc/prio.rst index 1fea1397d..c961c2962 100644 --- a/src/traffic-control/doc/prio.rst +++ b/src/traffic-control/doc/prio.rst @@ -71,4 +71,4 @@ or .. sourcecode:: bash - $ NS_LOG="PrioQueueDisc" ./ns3 --run "test-runner --suite=prio-queue-disc" + $ NS_LOG="PrioQueueDisc" ./ns3 run "test-runner --suite=prio-queue-disc" diff --git a/src/traffic-control/doc/tbf.rst b/src/traffic-control/doc/tbf.rst index de597bb1e..ab003345d 100644 --- a/src/traffic-control/doc/tbf.rst +++ b/src/traffic-control/doc/tbf.rst @@ -113,8 +113,8 @@ The example for TBF is `tbf-example.cc` located in ``examples/traffic-control/`` .. sourcecode:: bash - $ ./ns3 --run "tbf-example --PrintHelp" - $ ./ns3 --run "tbf-example --burst=125000 --rate=1Mbps --peakRate=1.5Mbps" + $ ./ns3 run "tbf-example --PrintHelp" + $ ./ns3 run "tbf-example --burst=125000 --rate=1Mbps --peakRate=1.5Mbps" The expected output from the previous commands are traced value changes in the number of tokens in the first and second buckets. @@ -144,4 +144,4 @@ or .. sourcecode:: bash - $ NS_LOG="TbfQueueDisc" ./ns3 --run "test-runner --suite=tbf-queue-disc" + $ NS_LOG="TbfQueueDisc" ./ns3 run "test-runner --suite=tbf-queue-disc" diff --git a/src/visualizer/examples/readme.txt b/src/visualizer/examples/readme.txt index 7b3c2b685..1f8e957e7 100644 --- a/src/visualizer/examples/readme.txt +++ b/src/visualizer/examples/readme.txt @@ -3,7 +3,7 @@ For activating the visualizer, with any example, just pass the option script uses ns-3's command line parser (class CommandLine), and add 'visualizer' as a module dependency to that program. -Alternatively, run the example with ns3 --run adding the --visualize option. +Alternatively, run the example with ns3 run adding the --visualize option. For example: -./ns3 --run wifi-simple-adhoc-grid --visualize +./ns3 run wifi-simple-adhoc-grid --visualize diff --git a/src/wave/examples/vanet-routing-compare.cc b/src/wave/examples/vanet-routing-compare.cc index 0a6918620..51e6c90e2 100644 --- a/src/wave/examples/vanet-routing-compare.cc +++ b/src/wave/examples/vanet-routing-compare.cc @@ -81,10 +81,10 @@ * several different simulation scenarios. * For example, to set up a scenario and save the configuration * as "scenario1.txt": - * ./ns3 --run "vanet-routing-compare --scenario=1 --saveconfig=scenario1.txt" + * ./ns3 run "vanet-routing-compare --scenario=1 --saveconfig=scenario1.txt" * Then, to re-play the scenario using the save configuration * settings: - * ./ns3 --run "vanet-routing-compare --loadconfig=scenario1.txt" + * ./ns3 run "vanet-routing-compare --loadconfig=scenario1.txt" * * Class Diagram: * main() diff --git a/src/wifi/doc/source/wifi-testing.rst b/src/wifi/doc/source/wifi-testing.rst index 74bc7986a..ec1f45700 100644 --- a/src/wifi/doc/source/wifi-testing.rst +++ b/src/wifi/doc/source/wifi-testing.rst @@ -141,7 +141,7 @@ interval enabled (cases 9-16), and then with channel bonding enabled and short guard first disabled then enabled (cases 17-32). Cases 33-64 repeat the same configurations but for two spatial streams (MIMO abstraction). -When run with the legacy YansWifiPhy, as in ``./ns3 --run "wifi-spectrum-saturation-example --wifiType=ns3::YansWifiPhy"``, the same output is observed: +When run with the legacy YansWifiPhy, as in ``./ns3 run "wifi-spectrum-saturation-example --wifiType=ns3::YansWifiPhy"``, the same output is observed: :: @@ -204,7 +204,7 @@ Some sample output with default arguments (no interference) is: :: - ./ns3 --run "wifi-spectrum-per-interference" + ./ns3 run "wifi-spectrum-per-interference" wifiType: ns3::SpectrumWifiPhy distance: 50m; time: 10; TxPower: 16 dBm (40 mW) index MCS Rate (Mb/s) Tput (Mb/s) Received Signal (dBm)Noi+Inf(dBm) SNR (dB) @@ -223,7 +223,7 @@ higher order modulations, due to lower SNR: :: - ./ns3 --run "wifi-spectrum-per-interference --waveformPower=0.001" + ./ns3 run "wifi-spectrum-per-interference --waveformPower=0.001" wifiType: ns3::SpectrumWifiPhy distance: 50m; sent: 1000 TxPower: 16 dBm (40 mW) index MCS Rate (Mb/s) Tput (Mb/s) Received Signal (dBm)Noi+Inf(dBm) SNR (dB) @@ -266,7 +266,7 @@ generate an eps file using gnuplot and vizualize the graph. :: - ./ns3 --run "wifi-bianchi" + ./ns3 run "wifi-bianchi" .. _fig-wifi-bianchi-11a-54-adhoc: @@ -283,7 +283,7 @@ When run for 802.11g 6 Mbit/s in infrastucture mode, the output is: :: - ./ns3 --run "wifi-bianchi --standard=11g --phyRate=6 --duration=500 --infra" + ./ns3 run "wifi-bianchi --standard=11g --phyRate=6 --duration=500 --infra" .. _fig-wifi-bianchi-11g-6-infra: diff --git a/src/wifi/examples/wifi-trans-example.sh b/src/wifi/examples/wifi-trans-example.sh index 4c88633d0..add78bd8b 100644 --- a/src/wifi/examples/wifi-trans-example.sh +++ b/src/wifi/examples/wifi-trans-example.sh @@ -76,7 +76,7 @@ do echo "===============================================" echo "Run for wifi-trans-example for ${std} and ${bw} MHz" cd $ns3Dir - ./ns3 --run "wifi-trans-example --standard=$std --bw=$bw" + ./ns3 run "wifi-trans-example --standard=$std --bw=$bw" echo "Generate PSD using ${file}.tr" file="${pre}${std}-${bw}MHz${suf}" gnuplot ${file}.plt @@ -99,7 +99,7 @@ do echo "===============================================" echo "Run for wifi-trans-example for ${std} and ${bw} MHz" cd $ns3Dir - ./ns3 --run "wifi-trans-example --standard=$std --bw=$bw" + ./ns3 run "wifi-trans-example --standard=$std --bw=$bw" echo "Generate PSD using ${file}.tr" file="${pre}${std}-${bw}MHz${suf}" gnuplot ${file}.plt @@ -126,7 +126,7 @@ do echo "===============================================" echo "Run for wifi-trans-example for ${std} and ${bw} MHz" cd $ns3Dir - ./ns3 --run "wifi-trans-example --standard=$std --bw=$bw" + ./ns3 run "wifi-trans-example --standard=$std --bw=$bw" echo "Generate PSD using ${file}.tr" file="${pre}${std}-${bw}MHz${suf}" gnuplot ${file}.plt diff --git a/src/wifi/test/wifi-mac-ofdma-test.cc b/src/wifi/test/wifi-mac-ofdma-test.cc index 7b87afcb4..5231d106e 100644 --- a/src/wifi/test/wifi-mac-ofdma-test.cc +++ b/src/wifi/test/wifi-mac-ofdma-test.cc @@ -312,7 +312,7 @@ TestMultiUserScheduler::ComputeUlMuInfo (void) * * Run this test with: * - * NS_LOG="WifiMacOfdmaTestSuite=info|prefix_time|prefix_node" ./ns3 --run "test-runner --suite=wifi-mac-ofdma" + * NS_LOG="WifiMacOfdmaTestSuite=info|prefix_time|prefix_node" ./ns3 run "test-runner --suite=wifi-mac-ofdma" * * to print the list of transmitted frames only, along with the TX time and the * node prefix. Replace 'info' with 'debug' if you want to print the debug messages diff --git a/utils/bench-packets.cc b/utils/bench-packets.cc index dbf4a79ac..bb3b92c36 100644 --- a/utils/bench-packets.cc +++ b/utils/bench-packets.cc @@ -20,7 +20,7 @@ // This program can be used to benchmark packet serialization/deserialization // operations using Headers and Tags, for various numbers of packets 'n' -// Sample usage: ./ns3 --run 'bench-packets --n=10000' +// Sample usage: ./ns3 run 'bench-packets --n=10000' #include "ns3/command-line.h" #include "ns3/system-wall-clock-ms.h"