Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(3)  |  Call(3)  |  Derive(0)  |  Import(0)

        def rx_tx_bits(interface):  # by reading /proc
    rx_bytes, tx_bytes = rx_tx_bytes(interface)
    rx_bits = rx_bytes * 8
    tx_bits = tx_bytes * 8
    return (rx_bits, tx_bits)
        


src/l/i/linux-metrics-0.1.4/example.py   linux-metrics(Download)
 
    # network
    rx_bits, tx_bits = lm.net_stat.rx_tx_bits('eth0')   
    print 'net bits received: %s' % rx_bits
    print 'net bits sent: %s' % tx_bits 

src/l/i/linux-metrics-HEAD/example.py   linux-metrics(Download)
 
    # network
    rx_bits, tx_bits = lm.net_stat.rx_tx_bits('eth0')   
    print 'net bits received: %s' % rx_bits
    print 'net bits sent: %s' % tx_bits 

src/p/y/PyRedstone-0.2.0/pyredstone/pyredstone.py   PyRedstone(Download)
        stats_dict['mem_total'] = total / 1048576
        # In Kilobits
        rx_bits, tx_bits = lm.net_stat.rx_tx_bits(net)
        stats_dict['net_tx'] = tx_bits / 1000
        stats_dict['net_rx'] = rx_bits / 1000