[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Testbed-admins] Emulab support for NS monitoring and procedures?



The abilities to monitor links and traffic in NS can be scripted in
the tcl script (commands like "monitor-queue", "trace-all", etc.)
and procedures can be written within the script to execute "finish"
calculations, output displays and cleanup files etc.  How is this
done in Emulab scripts?

Hi Ben. Emulab supports only a small subset of NS syntax. However, we
do have a few local goodies as you found out.

I've been trying to find ways to automatically record packet counts
on one or each node in my emulation then report those back to the
main node somehow so I can run a batch mode emulation and I don't
have to be present to get the info.  Does someone have a script they
could share with me on how to do this, I've been looking through
emulab and NS docs for some time trying to figure this out, loghole
doesn't seem to work (or I'm doing it wrong) and the emulab "trace"
command only works if I'm present to watch the experiment (the files
go away after the experiment is swapped out).

Also when I open a file in the script: "set qf [open q.trw]" what
machine does that open on? what path?  can I open a file in the
shared /Users directory from each node, or can I within the script
have it snapshot my capture files (from "trace") to /users someplace
so I can retreive the info AFTER the experiment is swapped out?

If by "script" above, you mean the NS file, you cannot do that. The NS
script is parsed just once to get the topology and the event stream,
but is not used after that. I think what you want is to use the trace
command as described on this page.

http://users.emulab.net/trac/emulab/wiki/AdvancedExample#EndNodeTracingMonitoring

Near the end of the section is a description of how to use the event
system to control the monitoring, and loghole to capture the tcp
traces. You can use static events or command line events as described
in that section.

You can also script loghole with the event system as described here:

http://users.emulab.net/trac/emulab/wiki/eventsystem#NSSimulatorAgent

You can send an event on the command line to do the loghole using
tevc, from users, or from any experimental node.

mynode> tevc -e proj/expt now ns report

loghole does some post-processing on the trace files. Look in the
experiment logs directory in /proj/pid/exp/eid ... This part of
loghole is not well documented, but it uses mergecap, snort, and
tcptrace. You can find the man pages for those on users. You might
want to look at what loghole does (see /usr/testbed/bin/loghole) with
the trace files.

Hope all this helps!

Lbs