3 Replies Latest reply: Mar 14, 2018 7:04 AM by Marc Ribet RSS

CLI on Modeler

Giuseppe Jackson



is there a command line in Riverbed Modeler (OPNET)?

How to open and use it?


Thanks... ;)

  • Re: CLI on Modeler
    Marc Ribet

    Not really but what do you want to do via CLI ?


    Roughly everything you are doing in the UI can be done via CLI like for example running simulations but also building models using EMA (External Model Access).


    There is also an embedded debugger available you can use to debug your code (using standard shell or the graphical debugger).

    • Re: CLI on Modeler
      Giuseppe Jackson

      Marc Ribet ha scritto:


      Not really but what do you want to do via CLI ?


      I would like to configure some network devices (like router, firewall and swtich). In particular, is there a possibility to use commands CISCO-like into the CLI?


      Marc Ribet ha scritto:



      Roughly everything you are doing in the UI can be done via CLI like for example running simulations but also building models using EMA (External Model Access).



      Ok. So, I have Modeler installed on Window 10. If I would like to run a simulation via CLI, how can I open (or visualize) the CLI window?

      Can I use Modeler Console (i.e., the commands prompt window-like) which has been installed within the Modeler product? 


      Thank you in advance!

      • Re: CLI on Modeler
        Marc Ribet

        For Cisco like commands, we used to have a virtual CLI but it has been deprecated starting with version 18.0.





        It seems it is possible to enable it again but it is not supported anymore and the list of available commands is not huge too and it was available for Cisco models only.


        The virtual Cisco command line interface in Modeler 18.0 is missing. When you set the Virtual CLI / Show Virtual CLI Menu Option preference to TRUE and then right click any Cisco device an error message "Could not load 'Vni_Cisco_Router' module" appears.

        The reason is that the model directory "c:\Riverbed\18.0\models\std\utilities\vni" is missing in the Modeler 18.0 release. The workaround is to install the Modeler 17.5, copy the missing vni directory to "c:\Riverbed\18.0\models\std\utilities" and add it to model directories using the File / Manage Model Files / Add Model Directory. After doing this the virtual CLI is available again.


        Again, not supported anymore starting with version 18.0 but if you are using Modeler Academic Edition, since the release is 17.5, that option is still available.


        For running simulations from command line:







        When you run a simulation from the OPNET GUI, the command given by OPNET is recorded in session_log file that can be accessed from Help / Session Log / Open. For OPNET 10.0 and higher, the same information can be accessed from the Invocation tab of the simulation sequence window.

        You will find a command similar to the following:
        C:\PROGRA~1\OPNET\9.1.A\sys\pc_intel_win32\bin\op_runsim -opnet_user_home C:\Documents and Settings\ts -net_name IP_QoS-WFQ_with_LLQ -child_id 0 -opnet_port 3456 -probe IP_QoS-WFQ_with_LLQ -noprompt TRUE -ef IP_QoS-WFQ_with_LLQ

        Many of the arguments seen above are optional.

        The main command to know is op_runsim, which can be invoked from command prompt directly or through scripts.

        op_runsim takes in many arguments but the *minimum* set of arguments to op_runsim are the names of the project and the scenario.

        For example: op_runsim -net_name project_name-scenario_name
        where net_name is a keyword.

        Some of the useful standard and static arguments that can be passed to op_runsim are given below. A detailed list and explanation of these arguments are descibed in our documentation under External Interfaces --> Program Descriptions --> op_runsim. You can also get one line descriptions of these arguments by typing op_runsim -help from OPNET's console.

        Specifies the intended duration of the simulation. The value of duration is
        interpreted in terms of simulation time, rather than real execution time.

        Specifies the name of the output vector file to be used to record vector statistic values from the executing simulation. The .ov suffix of the file should not be included in the preference value. If no name is specified, the network name will be used.

        Specifies the name of the probe file to be used to guide the collection of
        statistics and the subsequent recording of vector data by the simulation.If
        no name is specified, the network name will be used.

        User prompting can be disabled using the noprompt environment attribute of simulations. When a prompt is issued, a default value for the attribute is printed as a suggested possibility.

        Environment files (*.ef files) are useful for specifying attributes and their values. This allows you to run several simulations and be confident that they are using the same attribute values.  The ef argument takes in a text_file_name. The text_file is automatically generated for simulations run from GUI. However one can attach any text_file with a simulation. This text_file can be used to list parameter values - which makes it useful for parametric studies. More information about environment file can be seen in our documentation under External Interfaces --> Environment Attributes --> Environment Files section.
        S18568 provides a brief overview on Environment Files.

        6. -help
        Generates a list of all static preferences the program can accept You can redirect the output to a text file for better viewing.
        op_runsim -help > help.txt

        The -sconfirm argument prints a list of all static preferences and their values.

        7. - kernel_type
        The kernel_type preference determines which simulation kernel OPNET uses.
        (development, optimized, development_parallel, or optimized_parallel)


        You can use a standard MS shell. The difference with the Modeler console is that the PATH environment variable is adding the directory where Modeler executables are found, so no need to use the full path to op_runsim.