Coder Social home page Coder Social logo

tctop's Introduction

tctop - stats tool for tc
=========================

Experimental! It doesn't work on all systems, be patient.

Usage: tctop [options]

    Options:
        -h, --help            show this help message and exit
        -i INTERFACE, --interface=INTERFACE
                              Network interface
        -I INTERVAL, --interval=INTERVAL
                              Counting interval
        -n NUM, --num=NUM     Number of lines

Example:

    root@igw2:~# tctop -i imq0 -I 10 -n 15
    Total bytes: 10.0MBps | Total bits: 80.0Mbps | Total packets: 11829 pkts
    Total bytes (load): 42 %

    num. cls_id  IP              rate (bytes)rate (bits) max         max %  rate % load % pkts    pkts % 
    ----------------------------------------------------------------------------------------------------
    1.   1:842   10.16.20.92     1.7MBps     13.6Mbps    19.5Mbps    70 %   17 %   7 %    1388    12 %   
    2.   1:603   194.8.253.20    1.2MBps     9.8Mbps     97.7Mbps    10 %   12 %   5 %    940     8 %    
    3.   1:122   10.17.204.29    499.9KBps   3.9Mbps     3.9Mbps     100 %  5 %    2 %    343     3 %    
    4.   1:202   10.111.1.1      474.2KBps   3.7Mbps     3.9Mbps     95 %   5 %    2 %    329     3 %    
    5.   1:732   10.105.1.19     348.9KBps   2.7Mbps     2.9Mbps     93 %   3 %    1 %    256     2 %    
    6.   1:814   10.17.211.82    338.7KBps   2.6Mbps     2.9Mbps     90 %   3 %    1 %    234     2 %    
    7.   1:658   10.17.210.12    301.6KBps   2.4Mbps     2.9Mbps     80 %   3 %    1 %    207     2 %    
    8.   1:831   10.17.228.29    289.5KBps   2.3Mbps     2.9Mbps     77 %   3 %    1 %    197     2 %    
    9.   1:185   10.106.1.18     252.1KBps   2.0Mbps     3.9Mbps     50 %   2 %    1 %    188     2 %    
    10.  1:347   10.17.234.8     252.1KBps   2.0Mbps     2.9Mbps     67 %   2 %    1 %    184     2 %    
    11.  1:412   10.16.13.6      228.5KBps   1.8Mbps     2.9Mbps     61 %   2 %    1 %    156     1 %    
    12.  1:586   10.17.210.5     212.9KBps   1.7Mbps     2.0Mbps     85 %   2 %    1 %    170     1 %    
    13.  1:384   10.111.1.14     211.8KBps   1.7Mbps     3.9Mbps     42 %   2 %    1 %    155     1 %    
    14.  1:230   10.111.1.31     194.2KBps   1.5Mbps     2.9Mbps     52 %   2 %    1 %    142     1 %    
    15.  1:802   194.8.253.16    184.0KBps   1.4Mbps     97.7Mbps    1 %    2 %    1 %    2714    23 %

If you need refresh, use watch:

    # watch tctop -i imq0 -I 10 -n 15

For whole tree use:

    # watch tctop -i imq0 -I 10 -n -1

There is a variable setted in source code and it can be important to you. It's speed of the upstream link. For now, just edit it in main() function, I will solve it after I decide what next.

Developed for Best-Net s.r.o. and Best-Hosting s.r.o.

tctop's People

Contributors

by-cx avatar

Stargazers

Konrad Cempura avatar  avatar

Watchers

 avatar James Cloos avatar

Forkers

kcem rchicoli

tctop's Issues

new tc output metrics

Some Kernel upgrade changed output of tc, adding Gbit over 1000Mbit.

We found this fix, we think can be the correct solution:

  • res = re.findall("([0-9MK]*)bit", item, re.S)
  • res = re.findall("([0-9GMK]*)bit", item, re.S)
  • max_speed = max([int(x.replace("K", "000").replace("M", "000000")) for x in res])
  • max_speed = max([int(x.replace("K", "000").replace("M", "000000").replace("G", "000000000")) for x in res])

It is right ?
Can you commit changes ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.