Skip to content

kshvakov/pgcap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

About

The PostgreSQL network traffic analyzer

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages