Giter Club home page Giter Club logo

data-traffic-monitoring's Introduction

data-traffic-monitoring

Monitor data traffic, and execute scripts when data traffic reaches the upper limit.

步骤:

1、执行 cat /proc/net/dev 命令,检查除了lo之外的另一块网卡是否名为eth0,如果不是,需要将check.py和liuliang.py中的eth0替换为新网卡名称(如:venet0)。如果替换后运行脚本提示'Please setup your netcard',可以将两个脚本中新网卡名称的第一个字符删除(如venet0变为enet0);

2、执行 python check.py,根据返回结果,修改liuliang.py中第23、24行recv和send后面方括号中的数值;

3、修改liuliang.py第4行的流量上限,单位Byte;

4、修改liuliang.py第43行的流量更新时间;

5、将liuliang.py第48行和第51行的井号(#)注释删除,执行 python liuliang.py,检查recvdata和senddata是否正常输出。如果输出正常,重新加上注释符号;

6、将 python liuliang.py 命令加入开机启动。

data-traffic-monitoring's People

Contributors

binghe3337 avatar

Watchers

James Cloos avatar  avatar

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.