[SOLVED] Monitoring Daily Data Usage on Linux
[SOLVED] Hurray! I did it!
https://lemmy.ml/pictrs/image/72225811-5394-4758-a7c9-d29270650aac.png
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
https://lemmy.ml/pictrs/image/18b70e4f-70ef-4775-ba3f-986452c18fb2.png
In generic monitor give the exact location of the script like I have done here (also copy other details too)
https://lemmy.ml/pictrs/image/384ee3c6-687b-4097-b4c1-618f00e767df.png
Now save
Here’s what is in the trial file
<span style="color:#323232;">#!/bin/bash
</span><span style="color:#323232;">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)')
</span><span style="color:#323232;">rounded_eleven=$(printf "%.2f" "$eleven")
</span><span style="color:#323232;">
</span><span style="color:#323232;">echo " $rounded_eleven GB"
</span>
And that’ about it, for Network Usage Gouger you need Network Monitor
Package xfce4-netload-pluginYou 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.
https://lemmy.ml/pictrs/image/83a73e16-4c23-4e95-8f15-45aef6877f3c.png
I have installed vnstat
package and it’s quite handy. I have a few questions about it though.
- What is
rx
&tx
mean in this package?rx
stands forreceived``tx
stands fortransmission
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
https://lemmy.ml/pictrs/image/02bbfd0e-ccb9-4a83-afc6-8c30e7788316.png
Note to Future self: rx
: received``tx
: transmission``lo
: local loopback``wlan0
: ethernet