User and Computer Stats to CSV

Message boards : Number crunching : User and Computer Stats to CSV
Message board moderation

To post messages, you must log in.

AuthorMessage
Mark Loukko

Send message
Joined: 7 Jun 99
Posts: 52
Credit: 40,406,567
RAC: 108
Canada
Message 1810503 - Posted: 19 Aug 2016, 21:45:18 UTC

I signed up for the SETI WoW event yesterday and noticed they were able to track my stats by hour. I’ve always wanted to view my stats with a bit better resolution than BOINC provides. My goal was to create something very simple, flexible and easy to modify. After a few Google searches and head scratching I wrote a small script using powershell. Yesterday was my first experience with powershell so please keep the laughter to a minimum when looking at my code ;-)

In a nut shell: This script downloads statistics for your user account and each of your computers. It creates a single CSV for your user account and one CSV for each computer you have.

I picked CSV because of its simplicity and ability to load easily into Excel. You can now graph your data anyway you want.

Each time the script runs it appends the latest stats to the end of the CSV file. This should provide you with a fine-grained historical view.

Features:
- Monitors all of your computers.
- Dates are converted from UNIX epoch format to local time.
- Pick and choose the fields you want by editing the script.
- There is no 24 hour lag time.
- Everything you need to run the script should already be installed in Windows.

Setup:
1. Create a directory. c:\seti for example
2. Place this script into c:\seti
3. Run the script. There are two required parameters
1. Directory where you want the CSV files placed.
2. Your account key. Click "view" beside "Account Keys" on your SETI Account web page. The account key look something like: 771d3fcb247b017fc82a0262760eb2s5

Example:
powershell -executionpolicy bypass -file c:\seti\seti_user_stats.ps1 c:\seti\ 771d3fcb247b017fc82a0262760eb2s5

Run every hour:
schtasks /create /tn SETI_User_Stats /tr "powershell -executionpolicy bypass -file c:\seti\seti_user_stats.ps1 c:\seti\ 771d3fcb247b017fc82a0262760eb2s5" /sc hourly /mo 1

If all goes well you should see a few csv files.

That’s it. Happy to receive feedback. Hopefully somebody finds this useful.

Cheers
Mark

PS. You should not run this more than once per hour to prevent undo stress on the SETI servers.
ID: 1810503 · Report as offensive

Message boards : Number crunching : User and Computer Stats to CSV


 
©2024 University of California
 
SETI@home and Astropulse are funded by grants from the National Science Foundation, NASA, and donations from SETI@home volunteers. AstroPulse is funded in part by the NSF through grant AST-0307956.