github.com/m3db/m3@v1.5.0/src/cmd/tools/read_commitlog/README.md (about) 1 # read_commitlog 2 3 `read_commitlog` is a utility to extract data from a commitlog file. 4 5 # Usage 6 ``` 7 $ git clone git@github.com:m3db/m3.git 8 $ make read_commitlog 9 $ ./bin/read_commitlog 10 Usage: read_commitlog [-a value] [-f value] [-p value] [-s value] [-t value] [parameters ...] 11 -a, --action=value 12 Action [print,summary]. Defaults to 'print' 13 -f, --id-filter=value 14 ID Contains Filter (optional) 15 -p, --path=value file path [e.g. 16 /var/lib/m3db/commitlogs/commitlog-0-161023.db] 17 -s, --id-size-filter=value 18 ID Size (bytes) Filter (optional) 19 -t, --top=value Print out only top N IDs 20 21 # Examples. 22 23 # get all datapoints for a given metric 24 $ read_commitlog -p /var/lib/m3db/commitlogs/commitlog-0-161023.db -f 'metric-name' 25 26 # get summary about commit log file 27 $ read_commitlog -p /var/lib/m3db/commitlogs/commitlog-0-161023.db -a summary 28 29 # get summary about commit log file including top 100 largest and most frequent IDs 30 $ read_commitlog -p /var/lib/m3db/commitlogs/commitlog-0-161023.db -a summary -t 100 31 32 # get summary about commit log file including only IDs above 1000 bytes 33 $ read_commitlog -p /var/lib/m3db/commitlogs/commitlog-0-161023.db -a summary -s 1000 34 ```