VMS Log Parser for Tesla Roadster

Last Updated June 1, 2016


Tesla Roadster Logging

The Tesla Roadster maintains an internal log that stores information about the car's full history and more detailed records of recent use. This log can be downloaded to a USB thumb drive. Various Tesla owners have figured out a lot of what the log file contains and written programs to extract that information, most notably Scott451 from the Tesla Motors Club forum. Using a log parsing program, owners can extract interesting data from their cars.

Extracting the Log File

To extract the log file, you'll need a USB thumb drive. The drive has to be 4 GB or smaller and formatted FAT32. In the root, there must be a directory named VehicleLogs.

Insert the drive into the car's USB port. In the 2008 Roadster, it's under the center console, under the HVAC controls, just above the 12V power socket. After a few seconds, the car should beep and the touchscreen will display a message letting you know it's copying the log file to the drive and that you shouldn't unplug it until it's done. It'll take about 15 minutes to complete the download.

Inside the VehicleLogs directory on your USB drive, you'll find a directory named with your VIN. Inside that directory, you'll find the log file(s) you've downloaded named with the date and time of the download (it'll likely be off by a few hours from your local time as it uses UTC). Copy the log files to your computer.

Keeping a Complete History

There's no harm in downloading the log file. It just downloads a copy of the current log file which doesn't change what the car keeps stored internally. So, you can download as frequently as you want, or chose a schedule that matches your driving.

I try to grab a log file about every month as well as before and/or after any significant road trip. Because I'm fanatic about keeping a complete history, I also grab a log before and after every service call.

If you want to know how often to capture your log file, just run one of your files through my parser with no command line options. You'll see a summary of your driving and charging sessions. Note how far back that history goes. If your driving was typical in that time period, that's how often you need to download the log file.

If you do more driving you should capture the file more often, like before and/or after a long road trip. Likewise if you do less driving because you're away, or drive less during the winter, you can capture files less often.

Technical details...

The detailed records of recent activity fill up a fixed-size area in the file. When that area is full, new records start writing over the oldest records. If you want to keep a complete history of your car, you need to download a new log file before all of the records from your previous download get overwritten. The log is dominated by records that get written every second while the car is on. There is enough room to store records for the last 50 hours of driving. So, download a log file every 50 hours of driving. Depending on how much you drive, this may be a week in an extreme case. If you drive very little, then charge and other records will eventually fill up the space, but it could take months.

I just analyzed all of my log files. I see log files that cover anywhere from 29 days to 4 months, between 1500 and 2100 miles, but the driving time covered is in the narrow band between 58 and 62 hours.

There are a couple of potential issues with service calls...

Occasionally, a service call will erase the log file. A few owners have experienced this. So, it's a good idea to grab a log file just before each service visit.

Tesla has a way to turn on more verbose logging which dumps a record every second, 24x7. That drops the cycle time to about a week. This issue seems to be a rare problem, but it's a good idea to take a look at your log file to make sure things look right especially if you're about to do a drive that you want to capture in the logs.

Log Parsing Programs

To extract data from the log files, download one of the parsers and run it on the log file.

  • My log parsing program is a command-line program with versions for Mac OS X and Windows. Download instructions are below.
  • Scott451 is no longer working on his parser. The final version can be downloaded from this post on Tesla Motors Club.
  • Doug_G created the Tesla Graphical Log Parser, or TeslaGLoP, for Windows. You can download it from http://www.teslaflux.com/.
  • Another TMC member, S-2000 Roadster, has created a graphical log parser for Mac OS X. It can be downloaded from http://www.audiobanshee.com/software/TeslaLogs.dmg.

Battery Capacity History

A lot of owners are interested in how their battery pack capacity has changed over time. We've been told by Tesla service techs that the best measure of a pack's capacity is the Calculated Amp-hour Capacity (CAC) which they can read from the service screens. I found that the CAC is stored in the logs, in the daily records written into the long-term section of the file, so we can access our CAC history as far back as that section goes. Frequently, that's all the way back to when the car was built.

To get the CAC history from the log file, run this command:

	VMSParser -p -r DAY your_log_file.tar

To get a tab-delimited file you can load into a spreadsheet or graphing program, use this command:

	VMSParser -p -r DAY -t your_log_file.tar > daily-history.txt

Battery Longevity Studies

Although not directly related to parsing the log file, I administer the Plug In America Roadster Owner Survey. It contains a lot of data on Roadster battery pack longevity and major maintenance issues. If you're a Roadster owner, please contribute your experience. Owners of select other electric vehicles with appropriate instrumentation for tracking battery capacity can participate in other studies.

RichKae is collecting more detailed information for a Roadster battery longevity study using some summary information that you can extract from your log files using my parser. To participate, put all of your collected log files in one directory. From that directory, run this command:

	VMSParser -b *.tar > battery_data.txt

You can examine the resulting battery_data.txt file by opening it in a program like Word, Preview, or Notepad. It contains your car's VIN, info about time spent at various battery temperatures and states-of-charge, charging current, miles driven per day, a history of your battery pack's estimated capacity, and your car's firmware history. It doesn't contain anything personal, nothing about where you drive or even how you drive.

To participate in the study, email the battery data file to Rich at [teslalogdata].

Privacy Issues

Several of us have looked very hard to find any location data and are pretty sure the log files do not contain position information to track your driving.

Early on, there was some information about charging locations (the Roadster stores current limits on a per location basis). From those early log files, it was possible to determine a Roadster's home charging location. That portion of the log is now encrypted, so Tesla can see that information, but we can't. I assume the folks at Tesla are smart enough to use an encryption scheme good enough that if someone could crack it, they could also shut down all commerce on the Internet and wouldn't be fooling around with Roadster log files.

There is very detailed information recorded during drives. Every second, the car logs the time, speed, power, pedal position, whether traction control is enabled, etc. Every ten minutes it records the odometer, state of charge, and elevation. If you know where an owner lives and get a copy of their log file, with a lot of work it may be possible to deduce some driving paths with fairly high confidence. Suppose you know where I live and see from a log file that one morning I drove 3.2 miles at 30 mph, stopped, then accelerated up to 70 mph and drove for 12.8 miles. If you look at a map and see that I live 3.2 miles from a freeway on-ramp and that there's an exit 12.8 miles east but not west, then you have a pretty good idea how that drive started. In practice, you don't have to stop at every stop light, a jaywalking pedestrian can cause you to stop at any point in a road, you may not always drive at the speed limit, etc., so it can take a great deal of work to figure things out and it may be impossible to determine anything with confidence.

Personally, I don't mind that Tesla Motors can see where I charge. (They already know where I live and probably don't need my help finding charging stations and RV parks in the Pacific Northwest.) I'm also willing to potentially give up a little privacy in my driving habits if it helps them better understand how to improve the quality and reliability of electric cars. In fact, our interest in advancing electric cars is why we bought our Roadster in the first place.

Using a Command Line App

Both Scott's log_parser and my VMSParser are command line apps. Giving a full introduction to the command line and how to do things efficiently is not practical on this web page (entire books are available on the subject), but here's a quick intro...

Most of the following applies equally well to my parser and Scott's parser, although the program names and command line options are completely different.

First, you have to enter the path to where the program is. The easiest way to do that is to open a fresh Terminal (Mac) or Command Prompt (Win) window and drag VMSParser into the window. This will insert the full path to the file into the window. If you hit return after doing that, it will run the program with no options which will dump the help text into the window with the list of all the command options and some sample command lines.

On Mac OS X, if you get a "permission denied" error, you need to set a permission flag so the OS knows it's OK to run that file as a program. To do that enter this command:

	chmod u+x <path to VMSParser>

If you then hit the up arrow, it will put the previous command back on the command line. Make sure there's a space after the path to VMSParser, which should happen automatically. To get the summary of what's in your log file, next drag the log file into the window. You should now have:

	<path to VMSParser> <path to your log file>

Hit return.

Hit the up arrow to get that command line back, and append " > filename.txt" (without the quotes) to have the output dumped to a file.

You can get more detail and different information by inserting command-line options between the VMSParser path and the log file path. See the help text for more info. Use the feedback link below if you have more specific questions.

Download VMSParser

Version 1.1.5:

Send any feedback to [software].

 
©2000-2016 Idle Loop Software Design, LLC. You may not copy or reproduce any content from this site without our consent.