What's new

uiDivStats uiDivStats - WebUI for Diversion statistics

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

The weekly stats appear to be running as scheduled in cron but uiDivStats continues to display the report from Aug 17
Code:
30 1 * * Mon sh /opt/share/diversion/file/stats.div #Diversion_WeeklyStats#

# ls -1 /opt/share/diversion/stats
Diversion_Stats_RT-AX88U_2020-08-10_01.30.txt
Diversion_Stats_RT-AX88U_2020-08-17_01.30.txt
Diversion_Stats_RT-AX88U_2020-08-24_01.30.txt

Diversion Statistics Mon Aug 17 01:30:01 2020
--------------------------------------------------------
RT-AX88U (RT-AX88U) Firmware-384.19 @ 192.168.50.1
Compiled by Diversion 4.1.12
--------------------------------------------------------
Something else I noticed is that the Diversion Statistics Report (click to expand/collapse) bar does not function. The expand/collapse does nothing.
 
The weekly stats appear to be running as scheduled in cron but uiDivStats continues to display the report from Aug 17
Code:
30 1 * * Mon sh /opt/share/diversion/file/stats.div #Diversion_WeeklyStats#

# ls -1 /opt/share/diversion/stats
Diversion_Stats_RT-AX88U_2020-08-10_01.30.txt
Diversion_Stats_RT-AX88U_2020-08-17_01.30.txt
Diversion_Stats_RT-AX88U_2020-08-24_01.30.txt

Diversion Statistics Mon Aug 17 01:30:01 2020
--------------------------------------------------------
RT-AX88U (RT-AX88U) Firmware-384.19 @ 192.168.50.1
Compiled by Diversion 4.1.12
--------------------------------------------------------
Something else I noticed is that the Diversion Statistics Report (click to expand/collapse) bar does not function. The expand/collapse does nothing.
Use uf to force update, i seem to recall fixing that a while ago!
 
Morning Jack! I've done this upgrade twice now (AC86U 384.18 - 384.19 upgrade). Both times the backup and restore of the JFFS (with a format the 2nd time) seems to be losing something WRT running of several amtm scripts: uptime, connmon, ntp, uiDivStats. The scripts do not appear to be collecting data after the upgrade + JFFS restore + reboot. On my first attempt to fix this, I uninstalled them from amtm and then reinstalled them - that solved the issue. On my 2nd attempt (clean format of JFFS) I appear to have hit the same issue. Is there anything getting missed in this process? They have been working great for a year +. The AC86 JFFS resizing gotcha has been a royal PITA to say the least.

I do not think we should be having to remove and reinstall each utility in AMTM - thoughts? But if that's what it takes... I'll do it again. Wanted to make sure it wasn't something simple. Thanks!!

The jobs are in cron...

*** No HOLD ** On this thought. I just rebooted the router about 24 hours after the procedure and now the tooling appears to be collecting and graphing stats - at least for the first few data points this AM. WIll report back later today.

Update: All the tooling remains broken.. nothing updated about 11:00 AM.. so they ran for a couple hours... and this looks very bad.
Reformatting the JFFS twice and then restoring shows the j* scripts starting having issues about 4 hours later. My CRC errors have returned, this time to a different offset location / node.

I will keep posting in the other thread at the bottom of this post to avoid double posting. I think the issues with the J* scripts are clearly related to this JFFS issue.

ep 1 10:08:21 kernel: jffs2: Data CRC 4fa0304b != calculated CRC c3bee566 for node at 02ae3570
Sep 1 10:08:21 kernel: jffs2: read_cache_page() returned error: -5
Sep 1 10:08:21 kernel: jffs2: Error garbage collecting node at 02ae3570!
Sep 1 10:08:21 kernel: jffs2: Data CRC 4fa0304b != calculated CRC c3bee566 for node at 02ae3570
Sep 1 10:08:21 kernel: jffs2: read_cache_page() returned

Aug 31 15:46:27 kernel: jffs2: read_cache_page() returned error: -5
Aug 31 15:46:27 kernel: jffs2: Error garbage collecting node at 025c1510!
Aug 31 15:47:27 kernel: jffs2: Data CRC c80a47a2 != calculated CRC 777bca84 for node at 025c1510
Aug 31 15:47:27 kernel: jffs2: read_cache_page() returned error: -5
Aug 31 15:47:27 kernel: jffs2: Error garbage collecting node at 025c1510!
Aug 31 15:47:27 kernel: jffs2: Data CRC c80a47a2 != calculated CRC 777bca84 for node at 025c1510
Aug 31 15:47:27 kernel: jffs2: read_cache_page() returned error: -5
Aug 31 15:47:27 kernel: jffs2: Error garbage collecting node at 025c1510!

Code:
11,33 * * * * /bin/sed -i '/kernel: dcd/,/kernel: x1 /d' /tmp/syslog.log  #remove-dcd-crash#
25 9 * * * sh /jffs/scripts/firewall banmalware #Skynet_banmalware#
15 1 * * Mon sh /jffs/scripts/firewall update #Skynet_autoupdate#
00 2 * * Sun sh /opt/share/diversion/file/update-bl.div reset #Diversion_UpdateBL#
20 5 * * * sh /opt/share/diversion/file/rotate-logs.div #Diversion_RotateLogs#
20 17 * * * diversion count_ads count #Diversion_CountAds#
0 * * * * sh /jffs/scripts/firewall save #Skynet_save#
*/5 * * * * /jffs/scripts/connmon generate #connmon#
*/10 * * * * /jffs/scripts/ntpmerlin generate #ntpMerlin#
11,41 0-23 * * * /jffs/scripts/spdmerlin generate #spdMerlin#
0 * * * * /jffs/scripts/uiDivStats generate #uiDivStats_generate#
3 0 * * * /jffs/scripts/uiDivStats trimdb #uiDivStats_trim#
* * * * * /jffs/scripts/uiDivStats querylog #uiDivStats_querylog#
4,9,14,19,24,29,34,39,44,49,54,59 * * * * /jffs/scripts/uiDivStats flushtodb #uiDivStats_flushtodb#
45 */12 * * * sh /jffs/scripts/firewall debug genstats #Skynet_genstats#
*/5 * * * * sh /opt/share/diversion/file/yt-blocking.div #Diversion_YTblocking#

See -> https://www.snbforums.com/threads/r...19-is-now-available.65801/page-24#post-615444

Peace, stay safe, stay alive!
 
Last edited:
Use uf to force update, i seem to recall fixing that a while ago!
Thank you, after a forced update, the latest stats report is showing in uiDivStats
 
I have reports enabled and I get them via email but this area is still blank in the tab.

 
After upgrading a router I support to 384.19, I started to update amtm scripts. I usually do it before the firmware upgrade but did it afterwards this time.

I got the following message after updating DivStats. I didn't get the message when I ran the update a second time.
Code:
uiDivStats: Starting first run of stat generation...

awk: cmd. line:1: Division by zero
awk: cmd. line:1: Division by zero
awk: cmd. line:1: Division by zero
 
After upgrading a router I support to 384.19, I started to update amtm scripts. I usually do it before the firmware upgrade but did it afterwards this time.

I got the following message after updating DivStats. I didn't get the message when I ran the update a second time.
Code:
uiDivStats: Starting first run of stat generation...

awk: cmd. line:1: Division by zero
awk: cmd. line:1: Division by zero
awk: cmd. line:1: Division by zero
I remembered seeing @Jack Yaz say something about this awhile back....This was his comment.
"division by 0 suggests stats aren't making it into the database. what does:
Code:
/opt/etc/init.d/S90taildns check
ps | grep taildns
show?"

From
 
How do I removed uiDivStats completely from the setup, including the DB files? I've tried uninstalling, then waiting 10 minutes and reinstalling but the setup wants to hang always with "stale locked files found > 600 seconds".. whenever I try to force it to update. I think the DB might be too large now. I've got 30+ days of stats and I get nothing in the bottom two charts for for Query Log and Diversion Statistics Report. Probably time to starty clean.
Nevermind - thread search is your friend. Located per your earlier posts. I think my db may have grown too large to crunch:
Code:
738181120 Sep  7 11:56 dnsqueries.db.
...
uiDivStats uninstall
rm /opt/share/uiDivStats.d/dnsqueries.db
Thanks!
 
Last edited:
Use uf to force update, i seem to recall fixing that a while ago!
I tried uf, then reboot to be sure... even a power cycle, yet I'm still seeing the issue... 86u w/ .19 and latest scripts.

Something else I noticed is that the Diversion Statistics Report (click to expand/collapse) bar does not function. The expand/collapse does nothing.
I'm seeing the exact same symptom.

I don't think it has anything to do with this, but I've also recently been dealing with wifi auto channels on my 86u.
 
So... my issues with the ui stats tab were the result of an error occurring somewhere between the seat and the keyboard; turns out I did not have stats enabled in Diversion to begin with, LOL! :eek:

To my credit, it's been years since I configured Diversion, and I had to start all scripts up from scratch (.19 firmware update botched my jffs). Diversion has stats disabled by default. During initial configs I decided to stop having stats emailed to myself. So I never even opened the stats section in Diversion communications settings. Had I done so, I may have seen that 'save to /stats/ file' setting.

Anyhow, after enabling the stats, and then of course generating fresh stats, the UI now shows the Diversion stats as it should. Thanks again for your awesomeness Jack and the clan!

Cheers,
Kevin
 
Installation is stuck at:

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-2) installed in root is up to date.
Package sqlite3-cli (3330000-1) installed in root is up to date.
Package procps-ng-pkill (3.3.16-2) installed in root is up to date.
uiDivStats: Creating database table and enabling write-ahead logging...
 
Installation is stuck at:

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-2) installed in root is up to date.
Package sqlite3-cli (3330000-1) installed in root is up to date.
Package procps-ng-pkill (3.3.16-2) installed in root is up to date.
uiDivStats: Creating database table and enabling write-ahead logging...

Issue resolved with re-formatting the jffs partition and installing diversion from scratch.
 
Screenshots:

ec022f2e1c.png

How did you get the diversion tab?, also when I click on the uidivstats tab it opens it in a new window instead as a tab thus having to click backpage to get back to the merlin GUI. Fresh isntall of diversion and uidivstats I just performed.
 
Trying to reinstall, amtm install script gets stuck at ``Creating database table and enabling write-ahead logging...``. Any ideas?
 
i am getting the same thing when i tried to install from amtm script. This is my first attempt.

Creating database table and enabling write-ahead logging...

I am using YazFi and SkyNet. They have usb installed as well that they are writing to.
 
i am getting the same thing when i tried to install from amtm script. This is my first attempt.

Creating database table and enabling write-ahead logging...

I am using YazFi and SkyNet. They have usb installed as well that they are writing to.

I went through and ran all the updates available in amtm for everything i could find. Seems to have resolved the issue.
 

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top