netuse
netuse copied to clipboard
dumper returning errors
When running dumper from the commandline I get the following error: date: invalid date ‘%d %b %G’ ./dumper: line 16: /sys/class/net/ppp0/statistics/rx_bytes: No such file or directory ./dumper: line 16: /home/parkour86/.net///down/: Is a directory ./dumper: line 17: /sys/class/net/ppp0/statistics/tx_bytes: No such file or directory ./dumper: line 17: /home/parkour86/.net///up/: Is a directory
I was able to fix the invalid date error by adding a plus sign after date:
read -r date month year <<< "$(date +'%d %b %G')"
This is what it shows now:
./dumper: line 16: /sys/class/net/ppp0/statistics/rx_bytes: No such file or directory ./dumper: line 17: /sys/class/net/ppp0/statistics/tx_bytes: No such file or directory
I checked and I don't have a ppp0 directory. Not sure what needs to be done.
Thanks for bringing this to attention!
Yes, this is because there is no ppp0
interface on your machine. netuse
tracks usage of a particular interface only, and I had hardcoded this to be ppp0
. You can list all your interfaces using ifconfig
( on linux)
I'll have to make the interface selection configurable!
That makes sense. I updated the ppp0 to my interface and it's working perfectly. Thanks.