Automatically saving speed meter results as CSV

Started by SimonR

SimonR

Automatically saving speed meter results as CSV   01 October 2021, 06:34

I'm running the speed meter scheduler. Is there a way of automatically saving the results in a .csv file after every test, rather than having to go into Networx - Speed Meter and clicking the save icon every time I want to see the results?
SoftPerfect Support forum - Andrew avatar image

Re: Automatically saving speed meter results as CSV   01 October 2021, 09:54

It sort of depends on how frequently and where you need that CSV file. Speed test results are saved to an SQLite database, so you can extract them periodically or on demand.

Download the SQLite command line tools and extract sqlite3.exe. Then in a command prompt execute something like this:
sqlite3 -csv -header "%PROGRAMDATA%\SoftPerfect\NetWorx\NetWorx.db" "SELECT * FROM SPEEDTEST ORDER BY TIMESTAMP" > somefile.csv
This will open the database file, select all records from the SPEEDTEST table and save them to somefile.csv comma-separated.
SimonR

Re: Automatically saving speed meter results as CSV   01 October 2021, 15:03

Thanks Andrew - that's really helpful - just the information I needed.

Executing that command from the command prompt worked perfectly and I have a .csv file just as I wanted.

But as soon as I put that command in a batch (.bat) file I get the dreaded "Access denied" error. I've had this sort of problem many times in the past and usually managed to sort it out. But not this time. Running the batch file as administrator doesn't work and all the file and folder permissions look okay. But I've never used sqlite3.exe before so I'm wondering whether it doesn't like being used from a batch file for some reason? Although it's fine directly from the command prompt. Any ideas?
SoftPerfect Support forum - Andrew avatar image

Re: Automatically saving speed meter results as CSV   01 October 2021, 15:16

There isn't anything special about sqlite3.exe, it's just a regular console program. I have tried this in a batch file and it worked as expected.

How exactly do you run it?

SoftPerfect support forum
SimonR

Re: Automatically saving speed meter results as CSV   02 October 2021, 10:47

Thanks for that Andrew. I've sorted it out. I was trying to run the batch file by double clicking it and I seem to remember from long ago that can introduce problems for some reason. But there's no difficulty running it from the command prompt or a VBA shell command. Thanks for your help.

Reply to this topic

Sometimes you can find a solution faster if you try the forum search, have a look at the knowledge base, or check the software user manual to see if your question has already been answered.

Our forum rules are simple:

  • Be polite.
  • Do not spam.
  • Write in English. If possible, check your spelling and grammar.

Author:

Email:

Subject

A brief and informative title for your message, approximately 4–8 words:

     

Spam prevention: please enter the following code in the input field below.

 ********  **     **  **     **  ********   **      ** 
 **    **  ***   ***  **     **  **     **  **  **  ** 
     **    **** ****  **     **  **     **  **  **  ** 
    **     ** *** **  **     **  ********   **  **  ** 
   **      **     **   **   **   **         **  **  ** 
   **      **     **    ** **    **         **  **  ** 
   **      **     **     ***     **          ***  ***  

Message: