After reading through Network Traffic Monitor with vnStat and understanding that the stats are lost on restart I decided not to make my own log file.
Unfortunately when I got to creating the Database I got Error: Not enough free diskspace available which is disappointing since it is the first package I tried to load.
is outdated. You should consider updating to 17.01.4 or even 18.06 , a lot of software got updated in the last 3 Years !
But back to your topic:
3.7G on /dev/sda1 should be more than enough for the Database.
So here some hints:
Did you reboot the OpenWRT router after installing vnStat ?
You should check if the /etc/vnstat.conf is configured right with /tmp/run/mountd/sda1 as destination.
If yes:Test if you are able to write to the Stick e.g. with
echo "test" > /tmp/run/mountd/sda1/writetest.txt
You could double check by mounting it on another machine , after the creation of "writetest.txt" and check if it is really on the stick.
If everythink seems fine try to find out what exactly produces the:
Error: Not enough free diskspace available
What exactly should be written to where from which programm started with which options ?
The modem was accessed using a vulnerability. Unfortunately there are a lot of constraints and we can't recreate the checksums - so we seem to be locked to OpenWrt Chaos Calmer 15.05.1.
These modems use two roms (bank_1 and bank_2) which can be upgraded/used almost independently. They are digital-signature verified before boot so you can’t edit the rom image in the flash. The config is stored in the matching folder in /overlay i.e. /overlay/bank_2 (hint: you can see your modified config files in here if you want to back stuff up or see what changes you made). When a proper factory reset is done, the overlay partition is formatted (but not securely wiped).
I did reboot the modem after installing vnStat. What is really suspicious to me (given this is the first package) is 100% root usage when logged in as root.
I appreciate your suggestions - I'll work through them in about 12 hours.
The 100% percent root usage is normal OpenWRT behaviour.
at my device it states:
Important is the "overlayfs" which states more than 82MB free space on your device.
And even that should be enough for a database.
But you use a kind of "customised OEM-OpenWRT" on your device. Perhaps something got messed up from the manufacturer. Would be hard from over here to figure out if thats the case.
Rebooted again and created database with vnstat -u -i eth4. Fairly confident it is logging:
root@mygateway:~# ls /tmp/run/mountd/sda1/vnstat
br-lan eth4
I'm not sure how I view the results. Still struggling with LuCI Webgui Integration, nothing in my web interface and not sure what the card would look like. Instructions written to download and I'm trying to load from tmp.
root@mygateway:~# opkg list | grep luci
luci-app-vnstat - git-18.021.57137-5fa2132-1
I don't understand instructions This same init.d script ..., the point above it, Image Generation or `Persistent stats'.
Method 1 done - anything else needed in `Persistent stats'?
"opkg list" will show you all avaible packages including the installed !
To view only the intstalled packages you have to enter "opkg list-installed"
see "opkg --help" for more details
if this:
... is the only output of opkg then you have to Install luci (al least in "standart OpenWRT") becuase you are using a custom Web Interface.
I don't understand instructions This same init.d script ..., the point above it
You mean this sentence?
/etc/config/vnstat is the database restore config, not the vnstatd config. vnstatd config is also located at /etc/vnstat.conf
The big exclamationmark points : you could get confused of having 2 files with very similar names. Thats all. Its kind of a reminder ! It tells you further what both files are good for:
If you wish to set up the database restore config (which seems to me to be the config for database handling) you edit this file : /etc/config/vnstat
But if you want to edit the config for vnstatd (the vnstat daemon) you have to edit this : /etc/vnstat.conf
Here you get a script which generates an Image (in the meaning of picture or eyecandy ) to have a nice view on your stats