[HN Gopher] Monitor bandwidth usage with bandwhich (and build a ...
       ___________________________________________________________________
        
       Monitor bandwidth usage with bandwhich (and build a snap package of
       it)
        
       Author : jandeboevrie
       Score  : 31 points
       Date   : 2023-09-20 17:29 UTC (5 hours ago)
        
 (HTM) web link (popey.com)
 (TXT) w3m dump (popey.com)
        
       | at0mic22 wrote:
       | Stopped reading at the "remove docker" line. Like, really?
        
         | freedomben wrote:
         | > _Stopped reading at the "remove docker" line. Like, really?_
         | 
         | Why so incredulous about removing docker?
         | 
         | Did you read the part right before about how the networking
         | interferes with LXD? "remove docker" is a pretty damn good
         | solution to those types of problems as Docker notoriously hacks
         | iptables and screws up all sorts of other apps that rely on it
         | to do networking work. I've had to do that on my desktop in
         | order to get bridges working in kvm (I started using podman
         | instead which plays nicely with kvm).
         | 
         | What alternative solution do you offer instead for fixing the
         | LXD networking?
        
           | Alupis wrote:
           | Are these issues true for Podman as well? Podman's drop-in
           | ability vs. Docker seems impressive so far for me, but I have
           | yet to really stretch it.
        
           | tredre3 wrote:
           | There's no need to be so defensive. HN has a lot of web
           | developers and, for better or worse, docker is an integral
           | part of their workflow. So any guide brushing off "yeah just
           | remove docker" with no further explanation will naturally be
           | met with incredulity...
        
             | freedomben wrote:
             | Thanks that's valuable feedback. I didn't mean to sound
             | defensive!
        
       | miked85 wrote:
       | > I don't recall why I had docker installed, and was happy to
       | remove it. Never liked docker
       | 
       | Some people not only like it, but require it for their work -
       | seems like an odd prerequisite.
        
       | calvinmorrison wrote:
       | Very, very awesome! I love the per process table. How does that
       | work?
       | 
       | CBM was a fine tool [0]. I think it's been basically abandoned
       | though. It does only do per interface, but it seems like an
       | earlier simpler iteration of this type of tool. It works by
       | reading the stat tables in /proc/net/dev
       | 
       | I'd just throw our something I wrote a long time ago called fsbm
       | [1] (fucking small bandwith monitor) which was a rewrite of CBM
       | without curses. useful for logging to a file or to something
       | without NCURSES support. Along the way I added support for
       | network namespaces and just general other stuff. I use it
       | frequently. You can pump it into i3-bar for example or such and
       | such
       | 
       | [0] https://github.com/resurrecting-open-source-projects/cbm [1]
       | https://git.ceux.org/fsbm.git/tree/fsbm.c
        
         | freedomben wrote:
         | I'm not sure how it works beyond that it reads /proc, but
         | whatever it does it uses a whole lot more compute than nethogs
         | does (which also displays per process and also uses /proc as
         | the information source). This is fine for most of my machines,
         | but for lower-specced machines I'll probably have to stick with
         | nethogs[1]
         | 
         | [1]: https://github.com/raboof/nethogs
        
       | elihu wrote:
       | This feels like the setup for a limerick:
       | 
       | There was a monitoring app called bandwhich that fits a network
       | administrator's niche
       | 
       | something something something something something something
       | 
       | sudo make me a sandwich.
        
       | baz00 wrote:
       | The only thing I like about this is the idea of the bandwhich
       | tool.
       | 
       | The rest of it is adding more mechanism than is required for such
       | a utility. I see so much these days where people can't see the
       | simplest path to the solution of the problem and build
       | complicated Rube Goldberg machines around them. They do nothing
       | other than serve the ego of the person.
       | 
       | Give me a static bin and the sha256.
       | 
       | Edit: oh wait, the upstream already do that! Why all this?!?!?!?!
        
       | sigmonsays wrote:
       | who really likes snaps?
       | 
       | C'mon, you know they're awful. You know it's not every package
       | using up a loopback device... You know it's not little tricks
       | like hiding apt-get install packages in snap. You know its' not
       | me having a choice in the matter. Really, why is snap so crappy.
        
         | [deleted]
        
       | lloydatkinson wrote:
       | Why does this need a snap, when it could probably be compiled to
       | a single binary?
        
         | thecosmicfrog wrote:
         | Availability in the Ubuntu Store, presumably.
        
       | ur-whale wrote:
       | The banwhich part is much more interesting than the snap part.
       | 
       | snap is the first thing to get the apt-get purge treatment
       | whenever I install a new ubuntu box.
        
         | freedomben wrote:
         | Agreed. TFA author either currently or previously worked for
         | Ubuntu, so it makes sense to me that they are a big proponent
         | of Snap. Personally, I would rather build from source than
         | install a Snap.
         | 
         | Bandwhich looks like a neat tool[1]
         | 
         | [1]: https://github.com/imsnif/bandwhich
        
           | [deleted]
        
       | gerdesj wrote:
       | It's in the AUR. yay -S bandwich (I run a computer actually).
       | 
       | I deliberately ran it as my unpriv user account and it spat out
       | an easy to understand summary of why it won't work and some great
       | suggestions on how to fix it.
       | 
       | It looks lovely, does a job very well and goes straight into the
       | toolbox.
        
       | p1mrx wrote:
       | I run luci-app-vnstat on my OpenWrt router, default config except
       | that DatabaseDir is on a USB flash drive.
       | 
       | This doesn't provide device or app-level granularity, but I can
       | see my network's total bandwidth usage for previous hours, days,
       | and months, which is useful for avoiding Comcast's 1.2TB data
       | cap.
        
       ___________________________________________________________________
       (page generated 2023-09-20 23:01 UTC)