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!

Out of interest, what happens with diversion's stats generation?
Are you talking about the output of

stats.div.log:
Code:
 START FILE, --- lines are not part of file
 ---------------------------------------------------
 Wed, 15 May 2019 22:52:49 -0700
 diversion.conf found, compiling stats
 start router stats, updating Ad-Blocking stats
 creating filtering lists
 begin of stats computing
 ---------------------------------------------------
 END FILE

That's what I get when doing a "c,2,2" in the Diversion menu

and then it will give me a bunch of these as well
Code:
grep: /tmp/divstats/div-hostleases: No such file or directory
grep: /tmp/divstats/div-hostleases: No such file or directory
grep: /tmp/divstats/div-hostleases: No such file or directory
 
Out of interest, what happens with diversion's stats generation?
Note that the current Diversion stats.div file does not contain the updated code you have in uiDivStats.
 
Ah. I probably did break something :oops:
Change both occurances of:
Code:
if [ "$foundClients" -eq 1 ]; then
back to what I originally set as test:
Code:
if [ "$foundClients" ]; then
Yours throws a "[: bad number" error when no clients are found.
 
Change both occurances of:
Code:
if [ "$foundClients" -eq 1 ]; then
back to what I originally set as test:
Code:
if [ "$foundClients" ]; then
Yours throws a "[: bad number" error when no clients are found.
That's what I thought i'd broken, as i was trying to simulate no clients, and promptly forgot to revert it. oops
 
That's what I thought i'd broken, as i was trying to simulate no clients, and promptly forgot to revert it. oops
Just make the test fail by looking for a non-existent file, tmps instead of tmp:
Code:
if [ -s /tmp/uidivstats/div-allips.tmps ]; then
 
I went ahead and updated this morning but I am still getting the error and no graphs

Not sure if this is relevant to your script to pull data. I don't run DHCP or DNS on my router, as I have it running on another machine.

Code:
#################################################################
##                                                             ##
##          _  _____   _          _____  _          _          ##
##         (_)|  __ \ (_)        / ____|| |        | |         ##
##   _   _  _ | |  | | _ __   __| (___  | |_  __ _ | |_  ___   ##
##  | | | || || |  | || |\ \ / / \___ \ | __|/ _  || __|/ __|  ##
##  | |_| || || |__| || | \ V /  ____) || |_| (_| || |_ \__ \  ##
##   \__,_||_||_____/ |_|  \_/  |_____/  \__|\__,_| \__||___/  ##
##                                                             ##
##                      v1.0.1 on RT-AC5300                    ##
##                                                             ##
##             https://github.com/jackyaz/uiDivStats           ##
##                                                             ##
#################################################################

1.    Generate Diversion Statistics now

u.    Check for updates
uf.   Update uiDivStats with latest version (force update)

e.    Exit uiDivStats

z.    Uninstall uiDivStats

#################################################################

Choose an option:    1

uiDivStats: Starting Diversion statistic generation...


/opt/bin/grep: /tmp/uidivstats/div-hostleases: No such file or directory
awkNR: /tmp/uidivstats/div-bwl: No such file or directory
/opt/bin/grep: /tmp/uidivstats/div-hostleases: No such file or directory
/opt/bin/grep: /tmp/uidivstats/div-hostleases: No such file or directory
/opt/bin/grep: /tmp/uidivstats/div-hostleases: No such file or directory
/opt/bin/grep: /tmp/uidivstats/div-hostleases: No such file or directory
/opt/bin/grep: /tmp/uidivstats/div-hostleases: No such file or directory
/opt/bin/grep: /tmp/uidivstats/div-hostleases: No such file or directory
/opt/bin/grep: /tmp/uidivstats/div-hostleases: No such file or directory
/opt/bin/grep: /tmp/uidivstats/div-hostleases: No such file or directory
/opt/bin/grep: /tmp/uidivstats/div-hostleases: No such file or directory
/opt/bin/grep: /tmp/uidivstats/div-hostleases: No such file or directory
/opt/bin/grep: /tmp/uidivstats/div-iphostleases: No such file or directory
/opt/bin/grep: /tmp/uidivstats/div-iphostleases: No such file or directory
/opt/bin/grep: /tmp/uidivstats/div-iphostleases: No such file or directory
/opt/bin/grep: /tmp/uidivstats/div-iphostleases: No such file or directory
/opt/bin/grep: /tmp/uidivstats/div-iphostleases: No such file or directory
/opt/bin/grep: /tmp/uidivstats/div-iphostleases: No such file or directory
/opt/bin/grep: /tmp/uidivstats/div-iphostleases: No such file or directory
/opt/bin/grep: /tmp/uidivstats/div-iphostleases: No such file or directory
/opt/bin/grep: /tmp/uidivstats/div-iphostleases: No such file or directory
/opt/bin/grep: /tmp/uidivstats/div-iphostleases: No such file or directory
awkNR: /tmp/uidivstats/div-noisy: No such file or directory
/opt/bin/grep: /tmp/uidivstats/div-iphostleases: No such file or directory
/opt/bin/grep: /tmp/uidivstats/div-hostleases: No such file or directory
awkNR: /tmp/uidivstats/div-toptop: No such file or directory
/opt/bin/grep: /tmp/uidivstats/div-iphostleases: No such file or directory
/opt/bin/grep: /tmp/uidivstats/div-hostleases: No such file or directory
awkNR: /tmp/uidivstats/div-toptop: No such file or directory
/opt/bin/grep: /tmp/uidivstats/div-iphostleases: No such file or directory
/opt/bin/grep: /tmp/uidivstats/div-hostleases: No such file or directory
awkNR: /tmp/uidivstats/div-toptop: No such file or directory
/opt/bin/grep: /tmp/uidivstats/div-iphostleases: No such file or directory
/opt/bin/grep: /tmp/uidivstats/div-hostleases: No such file or directory
awkNR: /tmp/uidivstats/div-toptop: No such file or directory
/opt/bin/grep: /tmp/uidivstats/div-iphostleases: No such file or directory
/opt/bin/grep: /tmp/uidivstats/div-hostleases: No such file or directory
awkNR: /tmp/uidivstats/div-toptop: No such file or directory
/opt/bin/grep: /tmp/uidivstats/div-iphostleases: No such file or directory
/opt/bin/grep: /tmp/uidivstats/div-hostleases: No such file or directory
awkNR: /tmp/uidivstats/div-toptop: No such file or directory
/opt/bin/grep: /tmp/uidivstats/div-iphostleases: No such file or directory
/opt/bin/grep: /tmp/uidivstats/div-hostleases: No such file or directory
awkNR: /tmp/uidivstats/div-toptop: No such file or directory
/opt/bin/grep: /tmp/uidivstats/div-iphostleases: No such file or directory
/opt/bin/grep: /tmp/uidivstats/div-hostleases: No such file or directory
awkNR: /tmp/uidivstats/div-toptop: No such file or directory
/opt/bin/grep: /tmp/uidivstats/div-iphostleases: No such file or directory
/opt/bin/grep: /tmp/uidivstats/div-hostleases: No such file or directory
awkNR: /tmp/uidivstats/div-toptop: No such file or directory
/opt/bin/grep: /tmp/uidivstats/div-iphostleases: No such file or directory
/opt/bin/grep: /tmp/uidivstats/div-hostleases: No such file or directory
awkNR: /tmp/uidivstats/div-toptop: No such file or directory
sed: /tmp/uidivstats/div-iphostleases: No such file or directory
cat: can't open '/tmp/uidivstats/div-iphostleases': No such file or directory
uiDivStats: Diversion statistic generation completed successfully!
 
Unless I'm misunderstanding, how are you using Diversion if you're not using the router for dns?
 
Unless I'm misunderstanding, how are you using Diversion if you're not using the router for dns?
Since I have a domain and several subdomains and VLANs, I have a MS DNS & DHCP running. my MS DNS resolve all name lookup for my domain and subdomains, anything else is forwarded to Diversion( that I am assuming running Dnsmasq) then through Stubby and out to Cloudflare.

I am assuming your script is basically pulling from Diversion's compiled status?

Since I run the 'Compile Current Status report' i get the same/similar errors. I have posted on Diversion's thread.

The ASUS router's Network Map -> View List does show all my network devices and their MAC/IP and names. Not knowing much how Diversion pulls the information it needs it can definitely be pulled from that same method
 
Last edited:
v1.1.0 is now available
Changelog:
Code:
Add zoom/pan support to charts
OK, so I couldn't help myself

Run u twice to make sure the required js files (plugins) are downloaded


Works great! Just keeps getting better. :)
 
Looks good thank you [emoji106]


Sent from my iPad using Tapatalk
 

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