Jack Yaz
Part of the Furniture
How big is your db?No luck, still sitting there, barely idling.
How big is your db?No luck, still sitting there, barely idling.
112 MBHow big is your db?
It should really not be taking that long :/ (these indexes will be created on fresh dbs for new installs, so I am not anticipating any problems there, early adopters seem to be suffering though112 MB
killall uiDivStats
/opt/etc/init.d/S90taildns stop
cru d uiDivStats_generate
cru d uiDivStats_trim
cru d uiDivStats_querylog
sqlite3 /opt/share/uiDivStats.d/dnsqueries.db
drop index idx_dns;
drop index idx_dns_clients;
create index idx_dns_domains on dnsqueries (ReqDmn,Timestamp);
create index idx_dns_time on dnsqueries (Timestamp,ReqDmn);
create index idx_dns_clients on dnsqueries (SrcIP,Timestamp,ReqDmn);
touch /jffs/addons/uiDivStats.d/.upgraded
touch /jffs/addons/uiDivStats.d/.upgraded2
/opt/etc/init.d/S90taildns start
uiDivStats
You may have been struck by the same bug/issue - follow the steps in https://www.snbforums.com/threads/u...iversion-statistics.56393/page-31#post-589694 please
@Jack Yaz next project coming soon....Merlin supported router office heater!All four cores are busy, I'll let it heat up the office for the time being.
When in doubt, call it a "feature".with my haphazard coding, probably
Are other stats updating correctly?Does anyone know why the pixelserv stats are not being updated in the "Addons" tab of Merlin+AMTM? When I access the stats directly from my browser (http://192.168.111.2/servstats), I see current, updating pixelserv stats. Then when viewing off the Addons tab, expanding the "Pixelserv Statistics Report" the WebGUI shows me the same report that's always 6 days old. I updated AMTM and then restarted the router this AM - no change in behavior. THANKS!
They should update hourly - do you get any errors if you update manually via the CLI menu?^^^ Actually, great point - No. The Diversion Stats are stuck on 24 May 2020 10:00. Thoughts? I've upgraded everything and do so weekly. Already done a couple of full reboots this AM. It's been working awesome! I've also done a "uf" forced update to uiDivStats.
All of the ping, ntp, uptime monitoring appear to be updating with current time etc..
OK, actually maybe this helps. I logged out using Brave and then logged back in using Chrome and the Addon > uiDivStats is now showing current. Maybe there's some reason those pages are not being refreshed? They don't appear to "refresh" when I hit refresh in the browser. I log into the WEBGUI every couple of days so I know I've logged in (using Brave) many times since 24 May. Thoughts?
Still not working.It should really not be taking that long :/ (these indexes will be created on fresh dbs for new installs, so I am not anticipating any problems there, early adopters seem to be suffering though
Manual method:
Code:killall uiDivStats /opt/etc/init.d/S90taildns stop cru d uiDivStats_generate cru d uiDivStats_trim cru d uiDivStats_querylog
Then, open the database:
Code:sqlite3 /opt/share/uiDivStats.d/dnsqueries.db
Run each of the below commands one at a time:
Code:drop index idx_dns; drop index idx_dns_clients; create index idx_dns_domains on dnsqueries (ReqDmn,Timestamp); create index idx_dns_time on dnsqueries (Timestamp,ReqDmn); create index idx_dns_clients on dnsqueries (SrcIP,Timestamp,ReqDmn);
Once completed:
Code:/opt/etc/init.d/S90taildns start uiDivStats
Really sorry for this, I don't know why running the commands as part of the launching isn't working
sqlite> .recover
SQL error: no such table: sqlite_dbpage
sqlite> .tables
dnsqueries dnsqueriesmonthly dnsqueriesweekly
sqlite> .show
echo: off
eqp: off
explain: auto
headers: off
mode: list
nullvalue: ""
output: stdout
colseparator: "|"
rowseparator: "\n"
stats: off
width:
filename: /opt/share/uiDivStats.d/dnsqueries.db
sqlite> drop index idx_dns;
Error: no such index: idx_dns
sqlite> drop index idx_dns_clients;
sqlite> create index idx_dns_domains on dnsqueries (ReqDmn,Timestamp);
Error: index idx_dns_domains already exists
sqlite> create index idx_dns_time on dnsqueries (Timestamp,ReqDmn);
Error: index idx_dns_time already exists
sqlite> create index idx_dns_clients on dnsqueries (SrcIP,Timestamp,ReqDmn);
sqlite> .quit
tlc@RT-AX88U-D378:/tmp/home/root# /opt/etc/init.d/S90taildns start
Starting taildns... done.
tlc@RT-AX88U-D378:/tmp/home/root# uiDivStats
Choose an option: 2
sed: /jffs/addons/uiDivStats.d/SQLData.js: No such file or directory
uiDivStats: Stats updated successfully
Idiot over here forgot to include the command to "touch" the file to tell uiDivStats that an upgrade was not necessary. I am not doing well today, sorryStill not working.
I moved the existing db and started new.Code:sqlite> .recover SQL error: no such table: sqlite_dbpage sqlite> .tables dnsqueries dnsqueriesmonthly dnsqueriesweekly sqlite> .show echo: off eqp: off explain: auto headers: off mode: list nullvalue: "" output: stdout colseparator: "|" rowseparator: "\n" stats: off width: filename: /opt/share/uiDivStats.d/dnsqueries.db sqlite> drop index idx_dns; Error: no such index: idx_dns sqlite> drop index idx_dns_clients; sqlite> create index idx_dns_domains on dnsqueries (ReqDmn,Timestamp); Error: index idx_dns_domains already exists sqlite> create index idx_dns_time on dnsqueries (Timestamp,ReqDmn); Error: index idx_dns_time already exists sqlite> create index idx_dns_clients on dnsqueries (SrcIP,Timestamp,ReqDmn); sqlite> .quit tlc@RT-AX88U-D378:/tmp/home/root# /opt/etc/init.d/S90taildns start Starting taildns... done. tlc@RT-AX88U-D378:/tmp/home/root# uiDivStats
After a fresh install of the unreleased 2.0.0 version, I get this error on first run, subsequent runs don't. I have not run option 1 before:
Code:Choose an option: 2 sed: /jffs/addons/uiDivStats.d/SQLData.js: No such file or directory uiDivStats: Stats updated successfully
Complete re-write! uiDivStats now pushes dnsmasq log entries to SQLite in realtime via the "taildns" script. All graphical data is then generated against this database. The database will keep the last 30 days worth of requests and is typically a minimum of 200-300MB with 30 days' worth of data. The database is stored on an attached USB, in /opt/share/uiDivStats.d
The tab has been relocated from Addons to LAN - it may stay in Addons until you reboot, however.
Data is now displayed for:
- Last 24 hours
- Last 7 days
- Last 30 days
and is available per-client.
Data for "Last 24 hours" is refreshed hourly. Data for "Last 7 days" and "Last 30 days" is refreshed daily, at midnight.
A query log is now available in the WebUI, for ease of checking if a domain is blocked (refreshes every 60 seconds)
I'll PM you, there was a db change that didn't upgrade correctly for some users who beta testedGreat stuff Jack; installing now!
Sorry I couldn't give any more feedback the past few days, just been too busy with work but thanks for all your hard work
EDIT: Updated but now when I go to enter uiDivStats in amtm it just sits there loading the page with nothing happening. The tab in LAN in the router web GUI also shows no stats. Any ideas?
awk: cmd. line:1: Division by zero
uiDivStats: Stats updated successfully
Enter option j5
Downloading http://bin.entware.net/armv7sf-k2.6/Packages.gz
Updated list of available packages in /opt/var/opkg-lists/entware
Package grep (3.4-1) installed in root is up to date.
Package sqlite3-cli (3310100-1) installed in root is up to date.
Installing procps-ng-pkill (3.3.15-4) to root...
Downloading http://bin.entware.net/armv7sf-k2.6/procps-ng-pkill_3.3.15-4_armv7-2.6.ipk
Installing procps-ng (3.3.15-4) to root...
Downloading http://bin.entware.net/armv7sf-k2.6/procps-ng_3.3.15-4_armv7-2.6.ipk
Configuring procps-ng.
Configuring procps-ng-pkill.
uiDivStats: New version of taildns.tar.gz downloaded
Welcome To SNBForums
SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.
If you'd like to post a question, simply register and have at it!
While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!