ns_eval evaluates the Tcl passed in to this function. The Tcl is evaluated in all the Tcl interpreters for this virtual server. You can use this command to maintain global variables. For example, if you execute
ns_eval set g 1
in one interpreter, later operations will see $g equal to 1 no matter what interpreter they are assigned to.