How to provide custom NS functions to all users

17 views
Skip to first unread message

Mitchell Carroll

unread,
Jul 30, 2019, 11:42:09 AM7/30/19
to emulab-admins
I'm trying to provide a program to run on nodes at startup that is opted into through the experiment ns file.  The program will load from a git repo available through the user's directory on ops, since this is our only option with nodes not having direct internet access.  Can I add a command to the interpreter the way you can with a normal TCL interpreter?

Leigh Stoller

unread,
Jul 30, 2019, 1:08:43 PM7/30/19
to emulab...@googlegroups.com
at 8:42 AM, Mitchell Carroll <mitchell....@gmail.com> wrote:

> I'm trying to provide a program to run on nodes at startup that is opted into through the experiment ns file. The program will load from a git repo available through the user's directory on ops, since this is our only option with nodes not having direct internet access. Can I add a command to the interpreter the way you can with a normal TCL interpreter?

Hi: In your NS file you can do this:

set n1 [$ns node]

# Create a program object and attach it to the node
set prog1 [new Program $ns]
$prog1 set node $n1
$prog1 set command "/bin/ls -lt >& /tmp/foo”

Leigh

Reply all
Reply to author
Forward
0 new messages