rendered paste bodyif includeNetwork == 1:
temp = os.popen('netstat -ibI ' + __config_net_interface__)
line = temp.readlines()
line = trim(line[1])
line = stripspaces(line)
line = line.split(' ')
inb = float(line[6])
outb = float(line[9])
if inb==0 and outb==0:
print "Error: You may not have configured the script correctly...network is showing 0 bytes transferred. Please configure XInfoAqua with your main network interface."
else:
inb = inb / 1000
ins='K'
if inb>=1000:
inb = inb / 1000
ins='M'
if inb>=1000:
inb = inb / 1000
ins='G'
if inb>=1000:
inb = inb / 1000
ins='T'
outs = 'K'
outb = outb / 1000
if outb>=1000:
outb = outb / 1000
outs='M'
if outb>=1000:
outb = outb / 1000
outs='G'
if outb>=1000:
outb = outb / 1000
outs='T'
network = t_bold + " Net: " + t_normal + "[" + t_bold + __config_net_interface__ + t_normal + "/" + t_bold + "In: " + t_normal + str(round(inb,2)) + ins + "B" + "/" + t_bold + "Out: " + t_normal + str(round(outb,2)) + outs + "B" + "]"
output = output + network