Inspect TSI indexes

Use the influxd inspect command to inspect the InfluxDB time series index (TSI).

Output information about TSI index files

Use the influxd inspect dump-tsi command to output low-level details about TSI index (tsi1) files.

Provide the following:

  1. influxd inspect dump-tsi \
  2. --series-file ~/.influxdbv2/engine/data/056d83f962a08461/_series \
  3. ~/.influxdbv2/engine/data/056d83f962a08461/autogen/1023/index

View example output

  1. [LOG FILE] L0-00000006.tsl
  2. Series: 0
  3. Measurements: 0
  4. Tag Keys: 0
  5. Tag Values: 0
  6. [INDEX FILE] L3-00000008.tsi
  7. Measurements: 3
  8. Series data size: 0 (0.0b)
  9. Bytes per series: 0.0b
  10. Tag Keys: 15
  11. Tag Values: 1025
  12. Series: 1700
  13. Series data size: 0 (0.0b)
  14. Bytes per series: 0.0b
  15. [LOG FILE] L0-00000010.tsl
  16. Series: 0
  17. Measurements: 0
  18. Tag Keys: 0
  19. Tag Values: 0
  20. [INDEX FILE] L2-00000011.tsi
  21. Measurements: 1
  22. Series data size: 0 (0.0b)
  23. Bytes per series: 0.0b
  24. Tag Keys: 5
  25. Tag Values: 9
  26. Series: 10
  27. Series data size: 0 (0.0b)
  28. Bytes per series: 0.0b

Output raw series data stored in the index

To output raw series data stored in index files, include the --series flag with the influxd inspect dump-tsi command:

  1. influxd inspect dump-tsi \
  2. --series \
  3. --series-file ~/.influxdbv2/engine/data/056d83f962a08461/_series \
  4. ~/.influxdbv2/engine/data/056d83f962a08461/autogen/1023/index

View example output

  1. earthquake,code=6000iuad,id=us6000iuad,magType=mww,net=us,title=M\ 5.2\ -\ 101\ km\ SE\ of\ Palca\,\ Peru
  2. earthquake,code=71377273,id=pr71377273,magType=md,net=pr,title=M\ 1.9\ -\ Puerto\ Rico\ region
  3. earthquake,code=73794611,id=nc73794611,magType=md,net=nc,title=M\ 0.6\ -\ 13km\ ESE\ of\ Mammoth\ Lakes\,\ CA
  4. earthquake,code=40361800,id=ci40361800,magType=ml,net=ci,title=M\ 1.3\ -\ 12km\ SE\ of\ Olancha\,\ CA
  5. earthquake,code=6000itfk,id=us6000itfk,magType=mb,net=us,title=M\ 4.4\ -\ Mindanao\,\ Philippines
  6. earthquake,code=2022ucrr,id=ok2022ucrr,magType=ml,net=ok,title=M\ 1.4\ -\ 4\ km\ SSE\ of\ Dover\,\ Oklahoma
  7. earthquake,code=73792706,id=nc73792706,magType=md,net=nc,title=M\ 0.6\ -\ 7km\ W\ of\ Cobb\,\ CA
  8. earthquake,code=6000isjn,id=us6000isjn,magType=mww,net=us,title=M\ 5.5\ -\ 69\ km\ E\ of\ Hualien\ City\,\ Taiwan
  9. earthquake,code=022d8mp4dd,id=ak022d8mp4dd,magType=ml,net=ak,title=M\ 1.3\ -\ Southern\ Alaska
  10. earthquake,code=022dbrb8vb,id=ak022dbrb8vb,magType=ml,net=ak,title=M\ 1.6\ -\ 37\ km\ NE\ of\ Paxson\,\ Alaska
  11. earthquake,code=6000iu2e,id=us6000iu2e,magType=mb,net=us,title=M\ 4.1\ -\ 81\ km\ WSW\ of\ San\ Antonio\ de\ los\ Cobres\,\ Argentina

Output measurement data stored in the index

To output measurement information stored in index files, include the --measurement flag with the influxd inspect dump-tsi command:

  1. influxd inspect dump-tsi \
  2. --measurements \
  3. --series-file ~/.influxdbv2/engine/data/056d83f962a08461/_series \
  4. ~/.influxdbv2/engine/data/056d83f962a08461/autogen/1023/index

View example output

  1. Measurement
  2. earthquake
  3. explosion
  4. quarry blast
  5. Measurement
  6. earthquake
  7. explosion
  8. ice quake
  9. quarry blast
  10. Measurement
  11. earthquake
  12. explosion

Export TSI index data as SQL

Use the influxd inspect export-index command to export an index in SQL format for easier inspection and debugging. Provide the following:

  1. influxd inspect export-index \
  2. --series-path ~/.influxdbv2/engine/data/056d83f962a08461/_series \
  3. --index-path ~/.influxdbv2/engine/data/056d83f962a08461/autogen/1023/index

View example output

  1. CREATE TABLE IF NOT EXISTS measurement_series (
  2. name TEXT NOT NULL,
  3. series_id INTEGER NOT NULL
  4. );
  5. CREATE TABLE IF NOT EXISTS tag_value_series (
  6. name TEXT NOT NULL,
  7. key TEXT NOT NULL,
  8. value TEXT NOT NULL,
  9. series_id INTEGER NOT NULL
  10. );
  11. BEGIN TRANSACTION;
  12. INSERT INTO measurement_series (name, series_id) VALUES ('earthquake', 26920);
  13. INSERT INTO measurement_series (name, series_id) VALUES ('earthquake', 26928);
  14. INSERT INTO measurement_series (name, series_id) VALUES ('earthquake', 26936);
  15. INSERT INTO measurement_series (name, series_id) VALUES ('earthquake', 26944);
  16. INSERT INTO measurement_series (name, series_id) VALUES ('earthquake', 26952);
  17. INSERT INTO measurement_series (name, series_id) VALUES ('earthquake', 26960);
  18. INSERT INTO measurement_series (name, series_id) VALUES ('earthquake', 26968);
  19. INSERT INTO measurement_series (name, series_id) VALUES ('earthquake', 26976);
  20. INSERT INTO measurement_series (name, series_id) VALUES ('earthquake', 26984);
  21. INSERT INTO measurement_series (name, series_id) VALUES ('earthquake', 26992);
  22. COMMIT;

Report the cardinality of TSI files

Use the influxd inspect report-tsi command to output information about the cardinality of data in a bucket’s index. Provide the following:

  • --bucket-id with the ID of the bucket.
  1. influxd inspect report-tsi --bucket-id 056d83f962a08461

View example output

  1. Summary
  2. Database Path: /Users/scottanderson/.influxdbv2/engine/data/056d83f962a08461
  3. Cardinality (exact): 101698
  4. Measurement Cardinality (exact)
  5. "earthquake" 99876
  6. "quarry blast" 1160
  7. "explosion" 589
  8. "ice quake" 58
  9. "other event" 10
  10. "chemical explosion" 2
  11. "rock burst" 1
  12. "sonic boom" 1
  13. "volcanic eruption" 1
  14. ===============
  15. Shard ID: 452
  16. Path: /Users/scottanderson/.influxdbv2/engine/data/056d83f962a08461/autogen/452
  17. Cardinality (exact): 1644
  18. Measurement Cardinality (exact)
  19. "earthquake" 1607
  20. "quarry blast" 29
  21. "explosion" 7
  22. "sonic boom" 1
  23. ===============
  24. ===============
  25. Shard ID: 453
  26. Path: /Users/scottanderson/.influxdbv2/engine/data/056d83f962a08461/autogen/453
  27. Cardinality (exact): 2329
  28. Measurement Cardinality (exact)
  29. "earthquake" 2298
  30. "quarry blast" 24
  31. "explosion" 7
  32. ===============

storage internals