Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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: about 1 month ago
JSON representation

SSTable Scanner & Parser for Stenographer Packet Indices

Awesome Lists containing this project

README

        

![image](https://user-images.githubusercontent.com/1423657/113490373-b0c57500-94c9-11eb-92e0-8747166e6ce7.png)

# 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 )
);
```