Skip to content

A tool for analyzing Postgres network traffic

License

Notifications You must be signed in to change notification settings

procore/pgnetdetective

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pgnetdetective

A command line tool for converting pcap capture files (using tcpdump for example) into usable statistics about your PostgreSQL network traffic.

Installation

go get github.com/procore/pgnetdetective

Getting Started

Once you have installed pgnetdetective, you will want to get a pcap capture file to analyize.

This can be done using this command:

tcpdump -n -s 0 -w ~/pg.cap -i any port 5432

You will want to run the above command on the machine you are concerned with (whether it be client or server).

If you want to try it out, feel free to use the test app within this repo. It requires a little bit of setup, but is great for seeing how the stats work.

Once you have a pcap capture file, running pgnetdetective on it is as easy as:

pgnetdetective ~/pg.cap

Example output (from test_app)

Further options

$ pgnetdetective --help
NAME:
   pgnetdetective - Analyze Postgres Network Traffic Captures

USAGE:
   pgnetdetective [global options] command [command options] [arguments...]

VERSION:
   0.1

COMMANDS:
   help, h      Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --bytes              Display bytes instead of as Human-Readable
   --output value       Specify output file format: [text|json|csv] (default: "text") 
   --limit value        Limit output based on NetworkLoad size in kilobytes (default: 0)
   --help, -h           show help
   --version, -v        print the version

Licence

pgnetdetective is copyright © 2016 Procore. It is free software, and may be redistributed under the terms specified in the LICENSE file.

About Procore

Procore Logo

pgnetdetective is maintained by Procore Technologies.

Procore - building the software that builds the world.

Learn more about the #1 most widely used construction management software at procore.com

Contact us at opensource@procore.com

About

A tool for analyzing Postgres network traffic

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published