29
submitted 1 year ago* (last edited 1 year ago) by Subject6051@lemmy.ml to c/linux@lemmy.ml

[SOLVED] Hurray! I did it!


Solution: You need to have Generic monitor xfce link installed [available almost on every DE out there]

Two finger Tap on Panel Panel (dropdown) > Panel Preferences > Items > Add Item > Generic Monitor

In generic monitor give the exact location of the script like I have done here (also copy other details too)

Now save

Here's what is in the trial file

#!/bin/bash
eleven=$(vnstat --json | jq --arg day "$(date +'%d')" --arg month "$(date +'%m')" '.interfaces[0].traffic.day[] | select(.date.day == ($day | tonumber) and .date.month == ($month | tonumber)) | (.rx + .tx) / (1024*1024*1024)')
rounded_eleven=$(printf "%.2f" "$eleven")

echo " $rounded_eleven GB"

And that' about it, for Network Usage Gouger you need Network Monitor Package xfce4-netload-plugin You can see more into here

Adios!


[ORIGINAL POST]

edit: I am open to installing other packages, I ain't married to any of these packages.

I have installed vnstat package and it's quite handy. I have a few questions about it though.

  1. What is rx & tx mean in this package? rx stands for received tx stands for transmission

Is there a command to check data usage on my system using this? I mean, I want to create a Add an item to my panel which will show me my daily data usage updating it every minute. Basically, I want to to see what the arrow points to on the panel next to my date and I want it to update it every minute. I have 1.5GBs of data a day and I usually am not able to use it efficiently or I use too early and spent hours without data. So, I want to try and handle this problem by monitoring my data.


Note: I want to measure gauge data speed here, not do a speed test on how fast my internet is.

Also, I want to monitor the instantaneous rate of data usage and for that package bwm-ng does a great job, but I want to see in the panel and I want it to update every 0.5 s how can I achieve this?

I would like for a command to either view red arrow or the black arrow with the right mark depending upon which of them is instantaneous data speed


Note to Future self: rx : received tx : transmission lo : local loopback wlan0 : ethernet

you are viewing a single comment's thread
view the rest of the comments
[-] Subject6051@lemmy.ml 1 points 1 year ago

thank you very much! it works!

this post was submitted on 17 Sep 2023
29 points (100.0% liked)

Linux

48317 readers
676 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS