How do I display network usage in GNOME top panel?
Solution 1:
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.
Solution 2:
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}'
Implementation of above command
Solution 3:
NetSpeed is just an extension used to display network speed.
For your network usage
If you want to graphically display your local network connections, you may be interested in etherape. Free and cross platform. The thickness of the connection is an indicator of traffic volume.