TapeTrack Documentation

Because there is more to tape management than you ever realized

User Tools

Site Tools


billing:ttstats

This is an old revision of the document!


Customer TTSTATS File

A Customer TTSTATS file, normally named using the TapeTrack Customer-ID, contains the statistics extracted from the TapeTrack Journal for a selected billing period.

Example filename:

US01.ttstats

The file is created by TMSS10LogStatsExtractDB and processed by TMSS10LogStatsProcess.

The TTSTATS file provides the operational quantities used to calculate billing items, including storage and movement activity.

It does not contain the complete billing configuration. Customer descriptions, package assignments, rates, rounding and other calculations are supplied separately by the Customer Description Map, Package Map and Billing Rules.

Purpose

The Customer TTSTATS file transfers customer activity from the TapeTrack Journal into the billing calculation process.

The file can be used to:

  • Contain statistics extracted for one TapeTrack Customer.
  • Limit activity to a selected billing date range.
  • Supply quantities to the Billing Rules.
  • Separate the Journal extraction stage from the billing calculation stage.
  • Allow billing data to be reviewed before charges are generated.
  • Provide a repeatable input for testing billing configuration changes.
  • Support the creation of billing XML for QuickBooks Desktop.

The billing relationship is:

Journal → TMSS10LogStatsExtractDB → Customer-ID.ttstats → TMSS10LogStatsProcess → Billing XML

File Creation

The Customer TTSTATS file is created by TMSS10LogStatsExtractDB.

This utility reads the TapeTrack Journal database and creates an extract file for each Customer containing activity within the selected date range.

For example, an extraction containing the following Customers may create:

Customer-ID TTSTATS File
US01 US01.ttstats
US02 US02.ttstats
US03 US03.ttstats

TTSTATS files should be generated from the Journal for the correct billing period. Reusing a file from another period may result in missing, duplicated or incorrect charges.

File Location

TTSTATS files can be stored in any directory accessible to the account running the billing process.

For ease of administration, it is recommended that each billing period has a separate input directory.

Example Windows location:

C:\Program Files\TapeTrack\TapeTrack Framework Server\var\billing\2026-07\US01.ttstats

Example Linux location:

/var/tapetrack/billing/2026-07/US01.ttstats

A billing directory may be arranged as:

billing
├── config
│   ├── customer_map.txt
│   ├── package_map.txt
│   ├── default.ttsdef
│   └── tapetrack.xslt
├── input
│   ├── US01.ttstats
│   └── US02.ttstats
└── output
    ├── Billing_US01.xml
    └── Billing_US02.xml

The location of the TTSTATS file is supplied to TMSS10LogStatsProcess using the -i argument.

File Naming

It is recommended that each TTSTATS filename contains the corresponding TapeTrack Customer-ID.

The general filename format is:

Customer-ID.ttstats

Example:

US01.ttstats

The filename may also include the billing period if files need to be retained in the same directory.

Example:

US01_2026-07.ttstats

Using the Customer-ID and billing period in the filename helps prevent the wrong statistics file from being processed.

File Contents

A TTSTATS file is a TapeTrack statistics extract generated from Journal activity.

The file may contain statistical records relating to:

  • Storage quantities.
  • Onsite and offsite activity.
  • Volume movements.
  • Deliveries and collections.
  • Repository activity.
  • Other operational events recorded in the Journal.

The exact records included depend on:

  • The Customer being extracted.
  • The selected date range.
  • The Journal activity for that period.
  • The installed TapeTrack version.
  • The statistics processed by the Billing Rules.

A TTSTATS file contains activity statistics, not final invoice lines. The final descriptions, rates and totals are produced when the file is processed by TMSS10LogStatsProcess.

Relationship to Billing Configuration

The TTSTATS file supplies the activity and quantities. Other billing files determine how that activity is identified, priced and displayed.

File or Component Purpose
Customer-ID.ttstats Contains the Customer's extracted activity statistics and quantities.
Customer Description Map Maps the Customer-ID to a readable Customer or location description.
Package Map Selects the billing package assigned to the Customer.
Billing Rules Defines which statistics are billable and applies rates, rounding and calculations.
tapetrack.xslt Controls how the resulting billing XML is displayed.
XMLQuickBooks Mapping Maps approved TapeTrack billing values to QuickBooks customers and items.

For example:

TTSTATS:
11 qualifying LTO volumes stored for one day

Customer Description Map:
US01 New York Data Center

Package Map:
US01 STANDARD

Billing Rules:
Round storage quantity up to the next 10
Charge $0.01 per volume per day

Result:
20 billed volumes × $0.01 = $0.20

Processing the File

Use the -i argument to supply a TTSTATS file to TMSS10LogStatsProcess.

Example:

TMSS10LogStatsProcess -i US01.ttstats -M customer_map.txt -P package_map.txt -c default.ttsdef -X tapetrack.xslt > Billing_US01.xml

Where:

Argument Value Description
-i US01.ttstats Specifies the Customer statistics input file.
-M customer_map.txt Specifies the Customer Description Map.
-P package_map.txt Specifies the Package Map.
-c default.ttsdef Specifies the Billing Rules.
-X tapetrack.xslt Specifies the XML stylesheet.
Standard output Billing_US01.xml Receives the calculated billing XML.

If the files are stored in different directories, specify their complete paths.

Example:

TMSS10LogStatsProcess ^
-i "C:\TapeTrack\Billing\Input\US01.ttstats" ^
-M "C:\TapeTrack\Billing\Config\customer_map.txt" ^
-P "C:\TapeTrack\Billing\Config\package_map.txt" ^
-c "C:\TapeTrack\Billing\Config\default.ttsdef" ^
-X "C:\TapeTrack\Billing\Config\tapetrack.xslt" ^
> "C:\TapeTrack\Billing\Output\Billing_US01.xml"

Processing Result

TMSS10LogStatsProcess reads the statistics and applies the selected billing configuration.

The resulting XML may contain:

<?xml version="1.0" encoding="ISO8859-1"?>
<?xml-stylesheet type="text/xsl" href="tapetrack.xslt"?>
<tapetrack_data>
  <item>
    <customer>US01</customer>
    <itemcode>New York STORAGE_OFFSITE</itemcode>
    <description>LTO Vault Storage Charge</description>
    <count>60</count>
    <cost>0.01</cost>
    <total>0.60</total>
  </item>
</tapetrack_data>

In this example:

Value Source
Customer activity and quantity US01.ttstats
Customer description Customer Description Map
Billing package Package Map
Item code, description and rate Billing Rules
XML presentation tapetrack.xslt

Validation

The TTSTATS file should be validated before production billing is generated.

Check that:

  • The filename identifies the correct Customer.
  • The file was created for the correct billing period.
  • The extraction start and end dates are correct.
  • The file is not empty.
  • The file was created successfully by TMSS10LogStatsExtractDB.
  • The Customer-ID matches the Customer Description Map.
  • The Customer-ID matches the Package Map.
  • Expected billing activity is present.
  • The file has not already been invoiced.
  • The billing service account can read the file.
  • The generated billing XML contains reasonable quantities.

A billing control record should identify:

Control Example
Customer-ID US01
Billing period 2026-07-01 to 2026-07-31
TTSTATS filename US01_2026-07.ttstats
Extraction date 2026-08-01
Billing XML filename Billing_US01_2026-07.xml
Processing status Approved
QuickBooks invoice Invoice number or import reference

File Handling

TTSTATS files are generated processing files and should not normally be edited manually.

Manual changes can cause:

  • Activity to be omitted.
  • Quantities to be altered.
  • Charges to be duplicated.
  • Invalid statistics records.
  • A loss of traceability to the Journal.
  • Billing results that cannot be reproduced.

If the contents appear incorrect:

  1. Confirm the extraction date range.
  2. Review the Journal activity.
  3. Correct the source data or extraction settings where appropriate.
  4. Run TMSS10LogStatsExtractDB again.
  5. Replace the incorrect extract with the newly generated file.
  6. Reprocess the billing XML.

Do not correct a TTSTATS file by manually changing its statistics unless specifically instructed by TapeTrack Support. Regenerate the file from the authoritative Journal data whenever possible.

Troubleshooting

TTSTATS File Is Missing

Check that:

  • TMSS10LogStatsExtractDB completed successfully.
  • The Customer had Journal activity during the selected date range.
  • The output directory exists.
  • The extraction account has permission to write to the output directory.
  • The expected Customer-ID was included in the extraction.
  • The file was not moved or archived after extraction.

TTSTATS File Is Empty

Confirm that:

  • The correct billing date range was selected.
  • Journal records exist for the Customer.
  • The correct Journal database was processed.
  • The Customer-ID is correct.
  • The Customer had billable activity during the period.

An empty file may be valid when the Customer had no relevant activity. It should be investigated before being excluded from billing.

Incorrect Customer Is Processed

Check that:

  • The correct TTSTATS file was supplied using the -i argument.
  • The filename corresponds to the Customer-ID contained in the file.
  • The correct Customer Description Map was used.
  • The correct Package Map was used.
  • A file from another billing period or environment was not selected.

Billing Quantities Are Incorrect

Check that:

  • The extraction date range is correct.
  • The Journal contains the expected activity.
  • The correct TTSTATS file was processed.
  • The Billing Rules select the intended statistics.
  • Rounding or minimum-quantity rules are being applied correctly.
  • The same TTSTATS file was not processed more than once.

The raw activity may be correct while the billed quantity differs because of a Billing Rule.

For example:

Actual TTSTATS Quantity Billing Rule Billed Quantity
11 Round up to the next 10 20

No Billing XML Is Produced

Check that:

  • The -i argument specifies a valid TTSTATS file.
  • The process account has permission to read the file.
  • The Customer exists in the Customer Description Map.
  • The Customer exists in the Package Map.
  • The assigned package exists in the Billing Rules.
  • The statistics match at least one Billing Rule.
  • TMSS10LogStatsProcess completed without errors.

Redirect diagnostic messages to an error file.

Windows example:

TMSS10LogStatsProcess -i US01.ttstats -M customer_map.txt -P package_map.txt -c default.ttsdef > Billing_US01.xml 2> Billing_US01_error.txt

Review Billing_US01_error.txt for file, mapping and configuration errors.

Charges Are Duplicated

Confirm that:

  • The TTSTATS file was processed only once.
  • The billing XML was imported into QuickBooks only once.
  • The selected extraction date range does not overlap another billing period.
  • Duplicate Billing Rules are not matching the same statistics.
  • Previously processed files are moved to an archive directory.
  • Generate a new TTSTATS file for every billing period.
  • Use the Customer-ID and billing period in the filename.
  • Store each billing period in a separate directory.
  • Do not manually edit generated TTSTATS files.
  • Record the extraction start and end dates.
  • Review extraction logs before processing billing.
  • Prevent the same file from being processed twice.
  • Retain the TTSTATS file with its billing XML and invoice reference.
  • Restrict write access to authorized billing administrators.
  • Archive completed billing files as read-only records.

Security

A TTSTATS file does not normally contain passwords or authentication details. However, it may contain Customer activity and commercially sensitive operational statistics.

Access should therefore be restricted to:

  • TapeTrack administrators.
  • Authorized billing staff.
  • The service account running TMSS10LogStatsExtractDB.
  • The service account running TMSS10LogStatsProcess.

The file should not be publicly accessible or stored in an unsecured shared directory.

See Also

billing/ttstats.1787022115.txt.gz · Last modified: 2026/08/18 03:01 by Scott Cunliffe