vergoh / vnstat

vnStat - a network traffic monitor for Linux and BSD
GNU General Public License v2.0
1.36k stars 120 forks source link

[Feature] Show usage traffic per app #213

Closed Hulxv closed 2 years ago

Hulxv commented 2 years ago

A lot of apps are made to show traffic usage (on windows/mobile) through which you can show traffic usage per app (like glassware) Example: Screenshot_20211126_144002.jpg

So, can this wonderful feature be added to vnstat? Or is that impossible on Linux?

vergoh commented 2 years ago

The data source vnStat uses doesn't provide that sort of information, only the overall transfer count for the interface being monitored. As a result, it's not possible to add such feature to vnStat.

Hulxv commented 2 years ago

Can't you add this for the data source?

vergoh commented 2 years ago

I'm not aware of a data source which would provide the necessary information without extra resource cost or permission requirements. The currently used data source is such that it provides the information pretty much free of charge. It doesn't matter how much traffic there is, vnStat will always use the same amount of resources regardless of the traffic rate. The side effect however is that vnStat can't track sources or destinations of that traffic nor which program is generating it. If such data source would become available, I'd more likely create a new program with a different name for such monitoring instead of trying to extended the feature scope of vnStat.