背景
PostgreSQL 的统计信息、实时会话信息、操作系统状态信息等汇总,统计,展示。
https://www.postgresql.org/docs/devel/static/monitoring-stats.html
1 pgcenter
https://github.com/lesovsky/pgcenter
Command-line admin tool for observing and troubleshooting Postgres.
wget https://github.com/lesovsky/pgcenter/releases/download/v0.5.0/pgcenter.linux-amd64.tar.gz
pgCenter is a command line admin tool for PostgreSQL.
Usage:
pgcenter [flags]
pgcenter [command] [command-flags] [args]
Available commands:
config configures Postgres to work with pgcenter
record record stats to file
report make report based on previously saved statistics
top top-like stats viewer
Flags:
-?, --help show this help and exit
--version show version information and exit
Use "pgcenter [command] --help" for more information about a command.
Report bugs to https://github.com/lesovsky/pgcenter/issues
./pgcenter -p 1921 top
2 pg_top