Command line options to clear Application Usage Data
Started by Nasapunk88
Nasapunk88
Command line options to clear Application Usage Data 14 August 2015, 06:21 |
When I notice I have accidentally downloaded a bunch of data in the past hour, going to the Application Usage tab is useless if I forgot to clear all data since the previous Free Zone. (I get 10gigs per month and I can download over 15gigs during 1 night of Free Zone lol. It messes up the usage stats very much.)
Is there any Command Line Interface or API available that I can hook into for controlling Networx? Something to run a scheduled script that can clear the data. Any hidden feature or way to do this without manually using the mouse. The only other way I can think of is a script to exit Networx, edit the database file and then restart Networx.
Thanks!
Re: Command Line Options, Clear Application Usage Data 14 August 2015, 07:58 |
Registered: 13 years ago Posts: 241 |
QuoteNasapunk88
The Application Usage tracking is a great feature to understand what is using the bandwidth, however, it would be even better if I was able to track it daily, or reset it daily, or to also follow the On-Peak/Off-Peak hours.
If you want to reset only the Application statistics without affecting your other statistics, you can right click inside the App stats window and either "Delete" a single line at a time or "Clear All" App totals whenever you want to.
If you press the [Reset] button at the top you'll delete ALL stats, which is not what you appear to want.
nasapunk88
Re: Command Line Options, Clear Application Usage Data 14 August 2015, 17:08 |
Re: Command Line Options, Clear Application Usage Data 14 August 2015, 18:50 |
Registered: 13 years ago Posts: 241 |
J
PS It may or may not be possible if Networx is running when the script starts to execute, Networx may lock the database to prevent the script, etc.
Re: Command line options to clear Application Usage Data 14 August 2015, 23:39 |
Admin Registered: 18 years ago Posts: 3 519 |
Re: Command line options to clear Application Usage Data 15 August 2015, 02:57 |
Registered: 13 years ago Posts: 241 |
I tried and failed. I opened sqlitespy and created an .sql file containing:
OPEN networx.db
DELETE FROM application
CLOSE
My thinking was that
1) the database must be opened before
2) the table can be referenced and then
3) the database should be closed.
When I tried to Execute the .sql I got a message that there was an error close to "Open".
Can you please provide the details? I've searched the web and can't find anything.
Then the Scheduled Task requires a pointer to the program and another if there are optional arguments. What should the optional argument be?
Thanks,
J
Re: Command line options to clear Application Usage Data 15 August 2015, 18:35 |
Admin Registered: 18 years ago Posts: 3 519 |
sqlite3.exe "c:\full\path\to\NetWorx.db" "DELETE FROM application"Hope this helps.
Re: Command line options to clear Application Usage Data 15 August 2015, 22:18 |
Registered: 13 years ago Posts: 241 |
I also set up an annual task to clear Usage.
Enter the first day of a year into a spreadsheet and format the cell as numeric with zero decimals, this number is used to define the prior records to be deleted.
Set up/modify the task to Run Once (but never expire so it can be used again next year) so that it runs
on 1 Jan 2016 run with date 1 Jan 2015 which is expressed as an integer 42005
on 1 Jan 2017 run with date 1 Jan 2016 which is expressed as an integer 42736 etc. etc.
I have things set up in custom locations because I run:
1) Installed instance for Application stats which is 'cleared' every day at 06:56 using your instructions
2) Portable instance for Usage for the last 2 years which is 'cleared' on the first day of a new year of all usage prior to one year ago.
For example the task will run on 1 Jan 2016 using the clause "DELETE FROM usage WHERE DAY < 42005" which will leave only usage for 2015.
Thanks Andrew, and I hope this helps anyone else that wants to 'clean the house'
J
nasapunk88
Re: Command line options to clear Application Usage Data 16 August 2015, 16:29 |
Re: Command line options to clear Application Usage Data 17 August 2015, 01:52 |
Registered: 13 years ago Posts: 241 |