pgcap

command module
v0.0.0-...-eb461b9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 14, 2015 License: MIT Imports: 8 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

pgcap

The PostgreSQL network traffic analyzer

build

sudo apt-get install libpcap-dev

git https://github.com/kshvakov/pgcap.git && cd pgcap

go build --ldflags '-extldflags "-static" -s' 

use

pgcap -h
Usage of /pgcap:
  -bpf_filter string
         (default "tcp and port 5432")
  -device string
         (default "lo")
  -max_query_len int
         (default 2048)
  -query_filter string
        not case-sensitive
  -slow_query_time int
        in milliseconds


sudo pgcap -slow_query_time=1


-[ QUERY 0.094665 s]-:
select count(*) from auth.users ;


-[ QUERY 0.016246 s]-:
select count(*) from test.table;


-[ QUERY 0.136868 s]-:
REFRESH MATERIALIZED VIEW test.m_view

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址