'Update our graph.'

def updateGraph(self, _console, output):

    m = re.search('(\\d+.?\\d*)    ([KMG]?bits)/sec', output)
    if (not m):
        return
    (val, units) = (float(m.group(1)), m.group(2))
    if (units[0] == 'M'):
        val *= (10 ** (-3))
    elif (units[0] == 'K'):
        val *= (10 ** (-6))
    elif (units[0] == 'b'):
        val *= (10 ** (-9))
    self.updates += 1
    self.bw += val
    if (self.updates >= self.hostCount):
        self.graph.addBar(self.bw)
        self.bw = 0
        self.updates = 0
