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!

@Jack Yaz: Just to let you know, I decided to re-flash my router from scratch this morning - re-installed everything & it's all back to normal again. I can only presume that something got corrupted at some point somehow - but thanks for taking the time to help out, it's very much appreciated.
 

Attachments

  • stats.PNG
    stats.PNG
    41.2 KB · Views: 450
Code:
0 * * * * /jffs/scripts/uiDivStats generate #uiDivStats#
25 9 * * * sh /jffs/scripts/firewall banmalware #Skynet_banmalware#
25 1 * * Mon sh /jffs/scripts/firewall update #Skynet_autoupdate#
0 * * * * sh /jffs/scripts/firewall save #Skynet_save#
00 2 * * Fri 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#
30 1 * * Fri sh /opt/share/diversion/file/stats.div #Diversion_WeeklyStats#
50 1 * * Fri sh /opt/share/diversion/file/backup.div #Diversion_AutoBackup#
10 1 * * Fri sh /opt/share/diversion/file/update.div #Diversion_UpdateCheck#
*/2 * * * * /etc/openvpn/server1/vpns-watchdog1.sh #CheckVPNServer1#
*/2 * * * * /etc/openvpn/server2/vpns-watchdog2.sh #CheckVPNServer2#
5 0 * * * /opt/sbin/logrotate /opt/etc/logrotate.conf >> /opt/tmp/logrotate.daily 2>&1 #logrotate#
30 3 * * * /jffs/scripts/FreshJR_QOS -check #FreshJR_QOS#
*/10 * * * * /jffs/scripts/ntpmerlin generate #ntpMerlin#
0 * * * * /jffs/scripts/uiDivStats generate #uiDivStats#
*/5 * * * * /jffs/scripts/connmon generate #connmon#
I have two uiDivStats in my list o_Oo_O:(
who will win :eek::eek::eek::eek:
hard times for stat generation....:oops:
 
Code:
0 * * * * /jffs/scripts/uiDivStats generate #uiDivStats#
25 9 * * * sh /jffs/scripts/firewall banmalware #Skynet_banmalware#
25 1 * * Mon sh /jffs/scripts/firewall update #Skynet_autoupdate#
0 * * * * sh /jffs/scripts/firewall save #Skynet_save#
00 2 * * Fri 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#
30 1 * * Fri sh /opt/share/diversion/file/stats.div #Diversion_WeeklyStats#
50 1 * * Fri sh /opt/share/diversion/file/backup.div #Diversion_AutoBackup#
10 1 * * Fri sh /opt/share/diversion/file/update.div #Diversion_UpdateCheck#
*/2 * * * * /etc/openvpn/server1/vpns-watchdog1.sh #CheckVPNServer1#
*/2 * * * * /etc/openvpn/server2/vpns-watchdog2.sh #CheckVPNServer2#
5 0 * * * /opt/sbin/logrotate /opt/etc/logrotate.conf >> /opt/tmp/logrotate.daily 2>&1 #logrotate#
30 3 * * * /jffs/scripts/FreshJR_QOS -check #FreshJR_QOS#
*/10 * * * * /jffs/scripts/ntpmerlin generate #ntpMerlin#
0 * * * * /jffs/scripts/uiDivStats generate #uiDivStats#
*/5 * * * * /jffs/scripts/connmon generate #connmon#
I have two uiDivStats in my list o_Oo_O:(
who will win :eek::eek::eek::eek:
hard times for stat generation....:oops:
That's one of those things that is rather explicitly not supposed to happen.
 
That's one of those things that is rather explicitly not supposed to happen.
Code:
25 9 * * * sh /jffs/scripts/firewall banmalware #Skynet_banmalware#
25 1 * * Mon sh /jffs/scripts/firewall update #Skynet_autoupdate#
0 * * * * sh /jffs/scripts/firewall save #Skynet_save#
*/2 * * * * /etc/openvpn/server1/vpns-watchdog1.sh #CheckVPNServer1#
*/2 * * * * /etc/openvpn/server2/vpns-watchdog2.sh #CheckVPNServer2#
5 0 * * * /opt/sbin/logrotate /opt/etc/logrotate.conf >> /opt/tmp/logrotate.daily 2>&1 #logrotate#
30 3 * * * /jffs/scripts/FreshJR_QOS -check #FreshJR_QOS#
00 2 * * Fri 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#
30 1 * * Fri sh /opt/share/diversion/file/stats.div #Diversion_WeeklyStats#
50 1 * * Fri sh /opt/share/diversion/file/backup.div #Diversion_AutoBackup#
10 1 * * Fri sh /opt/share/diversion/file/update.div #Diversion_UpdateCheck#
*/10 * * * * /jffs/scripts/ntpmerlin generate #ntpMerlin#
0 * * * * /jffs/scripts/uiDivStats generate #uiDivStats#
*/5 * * * * /jffs/scripts/connmon generate #connmon#
it went back to normal. must have fixed it with the lockfile of it trying to run twice.
 
Still shouldn't happen. The process that maintains the cron file shouldn't allow it. Weird.
 
Hello everyone!

First of all, a big thanks to @Jack Yaz for making this script. I like it alot, so much easier to view a graph than read plain text.

I have some feedback on the script:
  • At the moment the script enables us to view the top 15 blocked domains from the LAN and also the top 15 requested domains per LAN client, with data coming from the Diversion statistics file (thank you for an awesome script aswell @thelonelycoder) . However, shouldn't it be top 10, since the graphs only show 10 domains and the Diversion statistics file only has records of the top 10 rather than top 15 domains?

  • In the top requested domain graph (per client), would it be possible to add to the graph the extra information from the Diversion statistics file that shows if the requested domain was accepted, blocked or whitelisted etc?

  • Add another graph showing the relation between the number of accepted, blocked and whitelisted domains based on the top 10 requested domains of the client (as per the Diversion statistics file), ie 50% blocked, 25% accepted and 25% whitelisted. Just an idea...
Once again, thank you for your time and effort in making scripts like theese!
 
Last edited:
Hello everyone!

First of all, a big thanks to @Jack Yaz for making this script. I like it alot, so much easier to view a graph than read plain text.

I have some feedback on the script:
  • At the moment the script enables us to view the top 15 blocked domains from the LAN and also the top 15 requested domains per LAN client, with data coming from the Diversion statistics file (thank you for an awesome script aswell @thelonelycoder) . However, shouldn't it be top 10, since the graphs only show 10 domains and the Diversion statistics file only has records of the top 10 rather than top 15 domains?

  • In the top requested domain graph (per client), would it be possible to add to the graph the extra information from the Diversion statistics file that shows if the requested domain was accepted, blocked or whitelisted etc?

  • Add another graph showing the relation between the number of accepted, blocked and whitelisted domains based on the top 10 requested domains of the client (as per the Diversion statistics file), ie 50% blocked, 25% accepted and 25% whitelisted. Just an idea...
Once again, thank you for your time and effort in making scripts like theese!
Start here and read down to see the earlier discussion on this, it covers more than one page.
https://www.snbforums.com/threads/u...iversion-statistics.56393/page-15#post-502887

It appears that uiDivStats has added it, I think Diversion needs an update that thelonelycoder has stated in that thread it is being developed.
 
It appears that uiDivStats has added it, I think Diversion needs an update that thelonelycoder has stated in that thread it is being developed.
The stats function in Diversion always had that setting in c, 2 "3. Top 'x' setting Top 10 hosts for 10 clients".
The hard coded limit in UiDivStats just needed the additional code to use the Diversion settings. Which I provided to @Jack Yaz who promptly released it in an update.
 
  • At the moment the script enables us to view the top 15 blocked domains from the LAN and also the top 15 requested domains per LAN client, with data coming from the Diversion statistics file (thank you for an awesome script aswell @thelonelycoder) . However, shouldn't it be top 10, since the graphs only show 10 domains and the Diversion statistics file only has records of the top 10 rather than top 15 domains?

  • In the top requested domain graph (per client), would it be possible to add to the graph the extra information from the Diversion statistics file that shows if the requested domain was accepted, blocked or whitelisted etc?
Now available in 1.1.3!

Changelog:
Code:
Make chart section headers dynamic
Add block type to tooltip on requested domain chart
 
I'm having an issue where it says it's not installed.
Yet it's installed using ssh.
I can update it and all.
But it's lacking many options.

And now it's refusing me to re install it.
upload_2019-7-10_23-5-4.png
 
@thelonelycoder Any chance you can release a version of amtm which auto updates? I understand this should be disabled by default as any code pushes done automatically can be malicious, but for me, I would never know the difference so I just update every time i see a new post.
 
@thelonelycoder Any chance you can release a version of amtm which auto updates? I understand this should be disabled by default as any code pushes done automatically can be malicious, but for me, I would never know the difference so I just update every time i see a new post.
You may want to post this in the proper thread for AMTM.;)
 
Update what? uiDivStats?
I would venture to guess he would like "U" to update all scripts that show they need to be updated instead of going into them and updating each one individually.
 
I don't get how to enable this. (Solved)
I forgot that i had to have both Entware and Diversion installed first.

upload_2019-7-11_18-35-11.png

upload_2019-7-11_18-35-31.png
 
Last edited:
I no longer see the "Top x blocked domains" or the "Top x requested domains" statistics after this latest update. The charts are completely blank. I've given it lots of time and uninstalled and reinstalled without luck. When I try to update the stats I do get this:

Choose an option: 1

uiDivStats: Starting Diversion statistic generation...

awkNR: /tmp/uidivstats/div-toptop: No such file or directory
awkNR: /tmp/uidivstats/div-toptop: No such file or directory

uiDivStats: Diversion statistic generation completed successfully!

Press enter to continue...

I'm still running 384.11_2 so could that be the issue?
 
I no longer see the "Top x blocked domains" or the "Top x requested domains" statistics after this latest update. The charts are completely blank. I've given it lots of time and uninstalled and reinstalled without luck. When I try to update the stats I do get this:



I'm still running 384.11_2 so could that be the issue?
Do you get the same error running stats generation through Diversion itself?
 

Latest threads

Sign Up For SNBForums Daily Digest

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