Simple bandwidth monitor and traffic accountant

blov · · 567 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<p>After a few angry phone calls with my ISP over me blowing past a stupid 300GB month transfer cap, and a few more completely empty threats about switching ISPs (we only have one ISP in my town, they know it, I know it...) I rolled a simple bandwidth monitoring application in golang with a web front end. The DB performance on boltdb was atrocious (only 2-3k get/put per second) when I was running tests, so if someone knows why don&#39;t keep it a secret.</p> <p>Its designed to provide real time throughput as well as a summary by the minute, hour, day, and month. The minutes, hours, and days roll over but months are held forever. I didn&#39;t like the available solutions and I am guilty of the NIH as much as the next guy, so I figured I would share.</p> <p>Not sure what this is going to accomplish, other than allowing me to squabble about the exact byte count when I am forced to call again and play this stupid dance over again...</p> <p>monitor is at github.com/traetox/gobwmon</p> <p>sample frontend is at github.com/traetox/bwmonfrontend</p> <p>screenshot: <a href="http://i.imgur.com/SyMPdSo.png">http://i.imgur.com/SyMPdSo.png</a></p> <hr/>**评论:**<br/><br/>mwholt: <pre><p>YES, thank you, this is awesome.</p> <p>For a couple years now I have been wanting to write something similar except it monitors speed, not transfer. I saw recently that somebody wrote a program for the raspberry pi that tweets to Comcast when their connection is slow, but I think that even just having a graph of connection speed over time would be interesting.</p> <p>We need more software in the realm of keeping ISPs accountable.</p></pre>jamra06: <pre><p>Just shooting ideas...</p> <p>Maybe you can use a simple proxy with a rate limiter like leaky bucket... Only create a ridiculously high limit. Then, when your leaky bucket rate limiter resets it&#39;s limit, which it should on a timer, write out the capacity used to bolt.</p></pre>TheMerovius: <pre><p>I&#39;d argue that setting up a real timeseries-database (e.g. Prometheus) with a tiny program exporting bytes throughput would get you better results simpler, but good on you :)</p></pre>

入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889

567 次点击  
加入收藏 微博
暂无回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传