def read(self, name):
		"""Read the value of a single variable."""
		
		try:
			var = self.agent.read_vars[name]
		except KeyError:
			raise error("No reabale variable '%s' found."%name)
		if libweb100.web100_raw_read(var._var, self._connection, self.agent.bufp) != \
		   libweb100.WEB100_ERR_SUCCESS:
			libweb100_err()
		return var.val(self.agent.bufp)
Beispiel #2
0
    def read(self, name):
        """Read the value of a single variable."""

        try:
            var = self.agent.read_vars[name]
        except KeyError:
            raise error("No reabale variable '%s' found." % name)
        if libweb100.web100_raw_read(var._var, self._connection, self.agent.bufp) != \
           libweb100.WEB100_ERR_SUCCESS:
            libweb100_err()
        return var.val(self.agent.bufp)
Beispiel #3
0
def pretuneTCP(opts):
    """ Make any pre-test adjustments to TCP. """

    # If bully mode we replace AIMD with our own
    if opts.bully:
        one, ssthresh=1, 2*cvar.baseMSS
        vWADNoAI=libweb100.web100_var_find(cvar.gtune, "WAD_NoAI")
        libweb100.web100_raw_write(vWADNoAI, cvar.conn, one)
	try:
	    vLimSsthresh=libweb100.web100_var_find(cvar.gtune, "LimSsthresh")
	except Exception, e:
            runlog("F", "No LimSsthresh - Check for a newer Web100 kernel!")
	    sys.exit(1)
        libweb100.web100_raw_write(vLimSsthresh, cvar.conn, ssthresh)
        runlog("W", "Set bully mode %d"%(libweb100.web100_raw_read(vLimSsthresh, cvar.conn)))
Beispiel #4
0
def pretuneTCP(opts):
    """ Make any pre-test adjustments to TCP. """

    # If bully mode we replace AIMD with our own
    if opts.bully:
        one, ssthresh = 1, 2 * cvar.baseMSS
        vWADNoAI = libweb100.web100_var_find(cvar.gtune, "WAD_NoAI")
        libweb100.web100_raw_write(vWADNoAI, cvar.conn, one)
        try:
            vLimSsthresh = libweb100.web100_var_find(cvar.gtune, "LimSsthresh")
        except Exception, e:
            runlog("F", "No LimSsthresh - Check for a newer Web100 kernel!")
            sys.exit(1)
        libweb100.web100_raw_write(vLimSsthresh, cvar.conn, ssthresh)
        runlog(
            "W", "Set bully mode %d" %
            (libweb100.web100_raw_read(vLimSsthresh, cvar.conn)))