Inspect TSI indexes
Use the influxd inspect command to inspect the InfluxDB time series index (TSI).
- Output information about TSI index files
- Output raw series data stored in the index
- Output measurement data stored in the index
- Export TSI index data as SQL
- Report the cardinality of TSI files
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:
- (Required)
--series-fileflag with the path to bucket’s _series directory. - (Required) Path to the shard’s index directory
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
7. [INDEX FILE] L3-00000008.tsi
8. Measurements: 3
9. Series data size: 0 (0.0b)
10. Bytes per series: 0.0b
11. Tag Keys: 15
12. Tag Values: 1025
13. Series: 1700
14. Series data size: 0 (0.0b)
15. Bytes per series: 0.0b
17. [LOG FILE] L0-00000010.tsl
18. Series: 0
19. Measurements: 0
20. Tag Keys: 0
21. Tag Values: 0
23. [INDEX FILE] L2-00000011.tsi
24. Measurements: 1
25. Series data size: 0 (0.0b)
26. Bytes per series: 0.0b
27. Tag Keys: 5
28. Tag Values: 9
29. Series: 10
30. Series data size: 0 (0.0b)
31. 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
7. Measurement
8. earthquake
9. explosion
10. ice quake
11. quarry blast
14. Measurement
15. earthquake
16. 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:
--series-pathflag with the path to the bucket’s _series directory.--index-pathflag with the path to the shard’s index directory.
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. );
6. CREATE TABLE IF NOT EXISTS tag_value_series (
7. name TEXT NOT NULL,
8. key TEXT NOT NULL,
9. value TEXT NOT NULL,
10. series_id INTEGER NOT NULL
11. );
13. BEGIN TRANSACTION;
14. INSERT INTO measurement_series (name, series_id) VALUES ('earthquake', 26920);
15. INSERT INTO measurement_series (name, series_id) VALUES ('earthquake', 26928);
16. INSERT INTO measurement_series (name, series_id) VALUES ('earthquake', 26936);
17. INSERT INTO measurement_series (name, series_id) VALUES ('earthquake', 26944);
18. INSERT INTO measurement_series (name, series_id) VALUES ('earthquake', 26952);
19. INSERT INTO measurement_series (name, series_id) VALUES ('earthquake', 26960);
20. INSERT INTO measurement_series (name, series_id) VALUES ('earthquake', 26968);
21. INSERT INTO measurement_series (name, series_id) VALUES ('earthquake', 26976);
22. INSERT INTO measurement_series (name, series_id) VALUES ('earthquake', 26984);
23. INSERT INTO measurement_series (name, series_id) VALUES ('earthquake', 26992);
24. 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-idwith 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
5. Measurement Cardinality (exact)
7. "earthquake" 99876
8. "quarry blast" 1160
9. "explosion" 589
10. "ice quake" 58
11. "other event" 10
12. "chemical explosion" 2
13. "rock burst" 1
14. "sonic boom" 1
15. "volcanic eruption" 1
18. ===============
19. Shard ID: 452
20. Path: /Users/scottanderson/.influxdbv2/engine/data/056d83f962a08461/autogen/452
21. Cardinality (exact): 1644
23. Measurement Cardinality (exact)
25. "earthquake" 1607
26. "quarry blast" 29
27. "explosion" 7
28. "sonic boom" 1
29. ===============
31. ===============
32. Shard ID: 453
33. Path: /Users/scottanderson/.influxdbv2/engine/data/056d83f962a08461/autogen/453
34. Cardinality (exact): 2329
36. Measurement Cardinality (exact)
38. "earthquake" 2298
39. "quarry blast" 24
40. "explosion" 7
41. ===============
Related
- InfluxDB storage engine
- InfluxDB file system layout
- influxd inspect dump-tsi
- influxd inspect export-index
- influxd inspect report-tsi
