Today's article has you showing your bandwidth usage in the terminal...

KGIII

Super Moderator
Staff member
Gold Supporter
Joined
Jul 23, 2020
Messages
11,497
Reaction score
9,994
Credits
95,326
We've examined vnStat but this is 'nload'. It doesn't do the fancy logging that vnStat does, so it's a monitoring tool and not a logging tool.


It's quick, it's easy, and feedback is awesome.
 


Not bad, though I prefer just a simple figure for download in the corner of my gnome desktop.
 
Not bad, though I prefer just a simple figure for download in the corner of my gnome desktop.

The backend for that is probably vnStat, at least it usually is when I see the various applets/desklets/etc...

You can check this in your terminal by simply running 'vnstat'.
 
The backend for that is probably vnStat, at least it usually is when I see the various applets/desklets/etc...

You can check this in your terminal by simply running 'vnstat'.
I simply use "Vitals" from gnome extensions.
 
I simply use "Vitals" from gnome extensions.

Yeah, I am not 100% sure but IIRC that too uses vnStat as the back end. Quite a few of those type of extensions/add-ons/applets/desklets do. The extension is usually a front end for the extension - more often than not when I've looked.

vnStat is pretty awesome like that. That particular extension may use something else - I've never tested that one. But, it's easy enough to check if you're curious. The terminal output can be pretty informative.

If it is installed and the backend, then it's 'vnstat -i <network_adapter>' (such as eth0).
 
So you assert that your solution would the applicable mostly for people who don't use desktop environments?

Right now this takes me back roughly 10 years when we had an old potato pc in the office as a bare linux server. Could have used that for network monitoring.
 
So you assert that your solution would the applicable mostly for people who don't use desktop environments?

Right now this takes me back roughly 10 years when we had an old potato pc in the office as a bare linux server. Could have used that for network monitoring.

Not at all. After all, all sorts of those extensions use it with desktop environments. (I mentioned that above.)

It's very lightweight, so it's good for stuff like that.
 
Not at all. After all, all sorts of those extensions use it with desktop environments. (I mentioned that above.)

It's very lightweight, so it's good for stuff like that.
Oh right, must have squinted a bit when I've read that. The lightweightness is certainly appealing. The mods I've done to my distro are quite hungry, just under 4GB total RAM usage when not doing anything. Not all people have the luxury to maintain it that way.
 
Have you checked to see if that's the backend? If it's installed, it probably is what the GUI is using for its information. As for resource usage, it's a text database and I dunno if it even uses much of any CPU. It's not listed as a running application. So, it's not sitting there eating up your RAM or anything.
 
Hold on a second, now I get it. Its not a live monitoring utility, it records weekly, monthly, or even uptime usage (depends on how you set it up).
kgiii@kgiii-_152.png


We seemed to have had a failure in communication, lol!

Annyways, I would reiterate that this is something that is well suited for someone who is less inclined towards having a proper desktop environment, though I agree it is not strictly limited to one who doesn't. As for me, that's all I need, just two clicks away in the corner of my screen:
Screenshot from 2022-12-13 10-50-10.png
 
As for me, that's all I need, just two clicks away in the corner of my screen:

Ah, but now you know you have it and know how to use it. See? Progress!

If you look, you've had it installed for going on two years. (It starts monitoring when it is installed and a database is set up.) So, it's probably the back end for something you're using, as it's not installed by default.

To see what the GUI is using, try this command:

Code:
vnstat -l -i eth0

That's the data that is being shown in the GUI you're using. It's vnStat as the back end for your desktop extension.
 
Screenshot from 2022-12-13 22-09-36.png

Curious!
 

Wait a minute...

I just noticed something. I'm a moron...

The screenshot you posted is *mine*.

You appear to not have vnStat installed, which means it's not the backend. I viewed the screenshot you shared and didn't bother looking at the username. Oops!

Well, you can install it if you want!
 
Hey, I don't blame you, poking around code all the time makes your head fuzzy and makes your eyes feel like cubes with edges scraping around the eye sockets. That's why I quit programming.

Where I might need it though is when people bring me around their doggie boxes (don't ask what the official english designation is, I don't know), which is basically a pi-hole with a USB 4G or 5G modem with a metered connection, where people lug both around since wifi is horribly underperforming where I live, then connect the whole thing to their laptops via ethernet cable.

Don't ask me why they do this convoluted mess when they could just ghost their browsers, but hey, give me 10 bucks and I'll run the update in the terminal, if you're too lazy to copy-paste some code... lol! I am shamelessly making money in the war between advertisers and ad blockers, and the clueless users end up paying ME for it. And when I try to explain how they can do it themselves, they look at me its as if I was trying to explain the physics behind the mood landing:
"Its just a simple command, Janet, just | pihole -up |, as easy as you search cat videos in your youtube search box!"
Visible confusion: "Just take my money and do it."
"Oh ffs, fine."


It would be a nice feature if I could track the statistics to see just how much data has the pi-hole saved up for its' user.
 
It would be a nice feature if I could track the statistics to see just how much data has the pi-hole saved up for its' user.

It'll do that, plus you can monitor (using the last command) bandwidth as it happens, live in the terminal.

As for vnStat being the back end for some desktop stuff, here's an example of that:

Desklets_001.png


See? LOL I am not a crazed lunatic!
 
See? LOL I am not a crazed lunatic!
But I am. Can it monitor the amount of data saved by putting together the sizes of all those ad packets it refused?
 
No, but uBlock Origin will tell you how many, and what percentage, ads you've blocked since installation.

vnStat would have zero way to know that information.

I'd expect other ad blocking extensions might have that information, but I know uBlock has the number of ads that it has blocked.
 
Well, usually, data packet contain a fixed size per the NPC protocol. when a request goes out for the packet containing the ad (usually an image with a pop-up or a pop-up overlay over the entire site), the number of packets are included in the request, and based on those you can calculate and log how much data was saved.
 
I think you'll find that you never make those requests because the ad blocking is done at the browser level and blocking those requests when it recognizes the elements. You can give it a try, but I would make sure you're not barking up the wrong tree.
 
Heres mine..
 

Attachments

  • 2022-12-16-084638_1600x900_scrot.png
    2022-12-16-084638_1600x900_scrot.png
    1.9 MB · Views: 147

Staff online

Members online


Top