UbuntuThis forum is for the discussion of Ubuntu Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
In ns2.35, I need to run my tcl file several times and then find the average of all outputs. I tried to add some statements (for loops) in the tcl file but none of them is working. Regarding finding the average I know what to do so, but my problem is in running it for multiple times.
Any suggestions?
Last edited by Rita Ahmad; 01-28-2016 at 02:22 AM.
In ns2.35, I need to run my tcl file several times and then find the average of all outputs. I tried to add some statements (for loops) in the tcl file but none of them is working. Regarding finding the average I know what to do so, but my problem is in running it for multiple times.
Any suggestions?
Not without seeing your code...since you've been posting about NS2 for about a year now, you must have SOME thoughts...
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511
Rep:
@Rita Ahmad :
AFAIK, there is no automatic solution which is smarter than simply doing the simulation command manually, multiple times.
Getting the terminal output as a file : $ ns file.tcl 2>&1 | tee text1.txt
If the trace files etc. have different results from every simulation :
Simply setup multiple folders with the simulation file, and run $ ns file.tcl in each folder/.
I thought it can be done using a loop or something similar. Thanks a lot for your reply.
Quote:
Originally Posted by knudfl
@Rita Ahmad :
AFAIK, there is no automatic solution which is smarter than simply doing the simulation command manually, multiple times.
Getting the terminal output as a file : $ ns file.tcl 2>&1 | tee text1.txt
If the trace files etc. have different results from every simulation :
Simply setup multiple folders with the simulation file, and run $ ns file.tcl in each folder/.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.