OMNET++: Run simulation in command line
omnet++, veins
Solution
If you are able to run your simulation in `Cmdenv` mode from `Eclipse`, you may see what `Eclipse` uses to run the simulation. To do it add the Console ( `Window` | `Show View` | `Other` | `Console`) and start your simulation in `Cmdenv` mode. In the console you will see something like this:
Starting...
$ cd /opt/omnetpp/omnetpp-4.6/samples/tictoc/simulations
$ ../src/tictoc -r 0 -u Cmdenv -c General -n ../src;. omnetpp.ini
OMNeT++ Discrete Event Simulation (C) 1992-2014 Andras Varga, OpenSim Ltd.
...
Here are the commands you are looking for.
Problem
In my omnetpp.ini file, I have these lines describing cmdenv: ``` [General] cmdenv-express-mode = false cmdenv-output-file = log.txt cmdenv-autoflush = true cmdenv-status-frequency = 10000000s ``` So my outputs are redirected to a log file. To run my simulation I access to run -> run configurations -> user interface command line Now, I need to run the omnetpp.ini file using a server so I need to run the .ini file in command line and not using the previous steps mentioned. I followed these two solutions that I found in the mailing list but they do not work: 1) ./run -u Cmdenv -f omnetpp.ini 2) opp_run -u Cmdenv -f omnetpp.ini This is what display: ``` HP-ProBook-650-G2:~/WorkspaceThese/Veins-4a2/examples/veins$ opp_run -u Cmdenv -f omnetpp.ini OMNeT++ Discrete Event Simulation (C) 1992-2014 Andras Varga, OpenSim Ltd. Version: 4.6, build: 141202-f785492, edition: Academic Public License -- NOT FOR COMMERCIAL USE See the license for distribution terms and warranty disclaimer Setting up Cmdenv... Cmdenv: redirecting output to file `/home/yosra/WorkspaceThese/Veins- 4a2/examples/veins/log.txt'... End. ``` Can someone help me to fix this issue please?