What's new
  • 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!

Reset Diversion Stats / logs to zero?

I have trawled through this very long thread, searched the Diversion website and searched Google - so apologies if this request has already been resolved - but I could not find a solution.

I am looking for a simple way to fully reset to zero the Diversion Stats [logs?] - without having to go through the routine of completely uninstalling Diversion and starting all over again.

Why? - because after making a bunch of changes to white lists and/or black lists etc - the historical events cloud the Diversion stats making it difficult to measure the difference made by the user changes. As a "non-coder" I would prefer a solution that does not entail having to navigate the corridors of the router or USB folders and deleting logs or stats ... in case I screw up and break something :rolleyes:.

If the solution is already somewhere in the Diversion Menu - please point it out to me - if not ... is this something that @thelonelycoder may consider?
 
Reset Diversion Stats / logs to zero?

I have trawled through this very long thread, searched the Diversion website and searched Google - so apologies if this request has already been resolved - but I could not find a solution.

I am looking for a simple way to fully reset to zero the Diversion Stats [logs?] - without having to go through the routine of completely uninstalling Diversion and starting all over again.

Why? - because after making a bunch of changes to white lists and/or black lists etc - the historical events cloud the Diversion stats making it difficult to measure the difference made by the user changes. As a "non-coder" I would prefer a solution that does not entail having to navigate the corridors of the router or USB folders and deleting logs or stats ... in case I screw up and break something :rolleyes:.

If the solution is already somewhere in the Diversion Menu - please point it out to me - if not ... is this something that @thelonelycoder may consider?
You mean the ads counters in the header? That's not built in but sounds like a good idea!
Code:
 32,395 t  9,620 w  13 n ads since May 06 22:00

For the dnsmasq logs to reset, use this command in the terminal, it'll update the blocking list and then reset the log files:
Code:
sh /opt/share/diversion/file/update-bf.div reset
 
If the solution is already somewhere in the Diversion Menu - please point it out to me - if not ... is this something that @thelonelycoder may consider?
Something like this? Should be easy to build in.

JDhyvAl.png
 
You mean the ads counters in the header? That's not built in but sounds like a good idea!
Code:
 32,395 t  9,620 w  13 n ads since May 06 22:00

For the dnsmasq logs to reset, use this command in the terminal, it'll update the blocking list and then reset the log files:
Code:
sh /opt/share/diversion/file/update-bf.div reset

MANY thanks again for your incredibly quick response :).
The issue was prompted by my installation @Jack Yaz 's uiDivStats - which in turn "graphically" drew my attention to massive hits on particular sites.
That caused me to make mods to Diversion lists - but the historical stats clouded the result of my efforts because it still showed the massive hits of prior weeks / months on the affected sites.

So - it's not really the ad counters of the header I was after - but the stats generated and emailed to me or displayed by uiDivStats that I was keen to clear. HOWEVER - your solution ... sh /opt/share/diversion/file/update-bf.div reset did the trick - so many thanks for that :D!

I do believe it would be a useful addition to your extensive Diversion menu - perhaps with a caveat for "noobs" like me who may not realise the consequence of triggering :( ;).
 
Something like this? Should be easy to build in.

JDhyvAl.png

You just too quick for an "old-timer" like me - above is an excellent inclusion ... but maybe include a warning as I assume this is an irreversible process?
 
You just too quick for an "old-timer" like me - above is an excellent inclusion ... but maybe include a warning as I assume this is an irreversible process?
Diversion always asks to confirm when doing critical changes and will explain what it does at that prompt.
 
Or maybe an option to keep counters/logs for a finite time only? A week? A month?

I like the idea of self purging after a programmable [option menu: day, week(s), month] set time and the manual option, so both.

With humble regards @thelonelycoder
 
Or maybe an option to keep counters/logs for a finite time only? A week? A month?
The dnsmasq logs are purged once a week on blocking list update day.

The ads counters can go up to a billion (Milliarde for the German and maybe other speakers). The human_number function stops at billions but will simply show how many it counts.

Three hundred thousand billion in my account (and some change) would be displayed thus:
First shalt thou take out the Holy Pin, then shalt thou count to three: 300300300300303
In the UI: 300300.300B t

I guess my proposal for the manual reset would do.
 
that con
The dnsmasq logs are purged once a week on blocking list update day.

The ads counters can go up to a billion (Milliarde for the German and maybe other speakers). The human_number function stops at billions but will simply show how many it counts.

Three hundred thousand billion in my account (and some change) would be displayed thus:
First shalt thou take out the Holy Pin, then shalt thou count to three: 300300300300303
In the UI: 300300.300B t

I guess my proposal for the manual reset would do.
the count shall not be one nor shall it be two....

[EDIT] Oh you linked the clip too...nice.... Micheal Palin always has me in stitches
 
Last edited:
The dnsmasq logs are purged once a week on blocking list update day.

The ads counters can go up to a billion (Milliarde for the German and maybe other speakers). The human_number function stops at billions but will simply show how many it counts.

Three hundred thousand billion in my account (and some change) would be displayed thus:
First shalt thou take out the Holy Pin, then shalt thou count to three: 300300300300303
In the UI: 300300.300B t

I guess my proposal for the manual reset would do.
Brilliant. Being a Life of Brian disciple, I don’t know how I missed this. If it’s half as good as Life of Brian, it’ll be worth watching.
 
Brilliant. Being a Life of Brian disciple, I don’t know how I missed this. If it’s half as good as Life of Brian, it’ll be worth watching.
Oh boy, are you in for a surprise.
 
I think a useful enhancement to Diversion would be to incorporate kvics reporting script which requires an email notification script (like you already provide) and ideally separate logging for the extra pixelserv logging level. Just an idea to consider.
Where can I find that reporting script?
 
Hi -
when I try and execute this I get
Code:
/jffs/scripts$ sh tls-alert.sh
tls-alert.sh: line 44: syntax error: unexpected "("

The script requires Bash from Entware to function, install it by executing:

Code:
 opkg install bash

Also you need to do some manual settings in the script to make it work, open it and go through first few lines, it gives you a basic understanding of what needs changing, further more you need to enable at least log level 2 for Pixelserv-TLS.
 
I created a whitelist that is basically a combination of every commonly used whitelist(from pihole and others), if you want a "one and done" style of whitelist:

https://github.com/PracticalChip/Adblocking

This is the link you put IN diversion hosted whitelist: https://raw.githubusercontent.com/PracticalChip/Adblocking/master/RawWhitelist.txt

I will keep it generally updated as I go, feel free to add issues or things you want whitelisted to the issues. I will do the same.

edit: not sure if *. wildcards work, so i just left two in there.

How does one an whitelist to auto update and process like the blacklist does? Like say maybe weekly?
 
How does one an whitelist to auto update and process like the blacklist does? Like say maybe weekly?
You mean like the blocking list, right?
The blacklist, whitelist and wildcard-blacklist have an option to use a hosted list in el Edit <list>: 7. Use hosted <list>.
Enable it and enter the URL to a file that has valid entries. It must be in raw format, no html.
 

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