示例#1
0
def get_speed():
    global f
    while True:
        speed = net_stat.getInterfaceSpeed('h1-eth0')
        f.write(str(speed[1]))
        f.write('\n')
        f.flush()
        time.sleep(0.5)
示例#2
0
def get_speed():
    global f
    while True:
        speed=net_stat.getInterfaceSpeed('h1-eth0')
        f.write(str(speed[1]))
        f.write('\n')
        f.flush()
        time.sleep(0.5)
示例#3
0
def victim(eth):
    speed = net_stat.getInterfaceSpeed(eth)
    if speed[1] > basicSpeed:
        return 1
    else:
        return 0
示例#4
0
def victim(eth):
    speed=net_stat.getInterfaceSpeed(eth)
    if speed[1]>basicSpeed:
        return 1
    else :
        return 0