I am running Ubuntu 18.04 with GNOME 3.28.1. I need a GNOME extension that would display my network speed on the top panel. I have tried NetSpeed which is an extension that displays the speed on the panel but since I use a capped network, I need to know how much data I use per session. Which extension would show me this when I hover over it?
4 Answers
None of the answers fit my needs so I decided to do some more digging and found out the most suitable solution. That is to use both NetSpeed and Simple Net Speed
Simple Net Speed has the option of displaying total network usage and I use this to know how much data has been used and I use NetSpeed to know the current speed.

- 141
-
1If you find this solution ideal you can accept your own answer – dsSTORM Jun 06 '18 at 08:37
Simple Net Speed will reset if you restart your system. Use vnstat
instead.
sudo apt-get install vnstat
Wait for 5 minutes to let vnstat add all the available interfaces to its database or if you don't want to wait then do it manually like vnstat -i <interface> --add
for all the interfaces. (use vnstat --iflist
to view all the available interfaces)
Once added, you have lot of nice options to view your network usage (daily, weekly, monthly, yearly, top data usage days, live traffic etc). Those are beyond the scope for your use case. The command vnstat -i <interface>
will give you the data usage of that interface for the day, month and year. Extract just the current day's data usage with the below command.
vnstat -i wlp4s0 --oneline | awk -F ';' '{print "Today:" $6}'
Executor is a gnome extension which lets you run any command at a specified interval and display the output in the top bar.Install this extension and add the above command and configure the interval. If you are good in shell scripting, you can use vnstat and extract any data you need and display in the top bar(could be useful if your data plan is capped monthly or weekly). Below command will give the output shown in the image
vnstat -i <interface> --oneline | awk -F ';' '{print "Today:" $6 " | Month:" $11}'

- 51
gnome-shell-system-monitor-applet
would be the best integrated option, but AFAIK it doesn't track data usage.
One solution would be to use a Conky with vnstat
. See this answer (at the end) to see how to set it up

- 198