https://github.com/qxip/stenoscope
SSTable Scanner & Parser for Stenographer Packet Indices
https://github.com/qxip/stenoscope
google hepic leveldb metrics pcap scan sstable sstables stenographer
Last synced: 29 days ago
JSON representation
SSTable Scanner & Parser for Stenographer Packet Indices
- Host: GitHub
- URL: https://github.com/qxip/stenoscope
- Owner: QXIP
- License: apache-2.0
- Created: 2021-04-03T19:48:44.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-05-06T16:56:54.000Z (about 4 years ago)
- Last Synced: 2025-05-25T10:17:49.186Z (about 2 months ago)
- Topics: google, hepic, leveldb, metrics, pcap, scan, sstable, sstables, stenographer
- Language: Go
- Homepage:
- Size: 1.42 MB
- Stars: 4
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

# Stenoscope
A golang scanner & JSON parser for PCAP SST index files generated by [stenographer](https://github.com/google/stenographer) with NodeJS binding### Command Line
Compile the command line version using go 1.10+
```
make
```#### Usage
##### JSON
```
./SSTableKeys /data/stenographer/1/thread0/index $(date -d '1 minute ago' +%s) $(date +%s)
```### NodeJS Module
Compile the native binding for nodejs (or download a prebuilt version)
```
npm install stenoscope
```#### Usage
```
const stenoscope = require('stenoscope');
var args = process.argv.slice(2);// Define Folder Path & Time Range
var datapath = args[0] || '/var/lib/stenographer/thread0/index';
var fromtime = parseInt(args[1]) || parseInt(new Date().getTime()/1000) - 60;
var totime = parseInt(args[2]) || parseInt(new Date().getTime()/1000);// Query SStable range to JSON (sstj)
console.log(
sstable.sstj(datapath, fromtime, totime )
);
```