Your client runs one command. You get the full picture.
pg-probe records PostgreSQL and Linux host metrics into one file. Open it in a local console, or print a report your client can read.
Capture there. Review here.
The output is one file in the current directory. Nothing leaves the server.
Here is the capture from this morning's slowdown.
db-prod-01-2026-10-24-19h37m27s.sqlite.gz534 KiB Not a pg-probe step. Your client sends the file the way they send any file: email, ticket, or shared folder. pg-probe uploads nothing.
you@laptop:~$ pg-probe analyze -d ~/clients/acme pg-probe: review console listening on http://127.0.0.1:3080/console/
Open the address in your browser. The console reads the same file, on your machine.
A report your client can read.
Print the whole session to PDF from the console: 39 charts of the host and the database, from CPU and disks to locks and WAL. Each chart gets its own page, with what it measures and how to read it.
- Cover and contents, linked to every chart
- "What to look for" on each page, written for a reader who does not know the metric
- Sources that were not available listed after the cover, never drawn as zero
In English, Portuguese, or Spanish, whichever your client reads.
Built for reading a session.
Click a chart to pin one moment, or drag to select a range. Every chart and every legend follows.
From the demo capture: pinned at 15:04:34 UTC, transactions fell to 2.6 per second while 32 lock requests waited, and the CPU was 3.4% busy.
Percentiles, not averages
Every legend shows p50, p75, p95, p99, and the current value.
Rates from samples
--duration and --interval record how counters change. A counter reset is a gap, never a value.
Your own SQL
The artifact is plain SQLite. Open it with sqlite3 when the console is not enough.
Analysis with AI.
Connect pg-probe to Claude Code, Codex, Cursor, or any tool that speaks MCP. Ask in plain language: the AI reads the snapshots with read-only access, writes the SQL on the internal tables for you, and cites the table and value behind each answer.
Ask your agent
Install pg-probe and add its MCP server by following https://pg-probe.dev/llms.txt. My snapshots are in ~/snapshots, but I may point to another folder in each session. The agent reads llms.txt and sets itself up. To set it up by hand in the terminal: claude mcp add pg-probe -- pg-probe mcp.
- Knows the schema: the unit, the source, and what each error code means.
- Read-only SQL: up to 1,000 rows, with
percentile()for p95 and p99, or every row in a CSV. - Runs on your laptop: never connects to PostgreSQL. What the AI reads goes to the model it uses.
Why did transactions per second drop around 15:04 UTC?
- list_snapshots
- describe_schema
- query postgres_database_stats
- query postgres_activity_aggregates
- describe_schema postgres_activity_aggregates
- describe_schema postgres_lock_aggregates
- query postgres_activity_aggregates
- query postgres_lock_aggregates
TPS fell because of row-lock contention.
- The drop: the commit+rollback rate in
postgres_database_statswent from about 5,600/s at 15:03:24 to 2.6/s at 15:03:39. - Who waited: 32 client backends were
activewithwait_event_type = Lock, ontupleExclusiveLock andtransactionidShareLock (postgres_lock_aggregates). - Likely holder: one client backend was
activewithwait_event_type = Timeoutandmax_age_seconds14 to 15. It was sleeping inside a transaction. This is an inference. - Not recorded: the artifact keeps no PIDs or query text, so it cannot name the session or statement.
A real answer from Claude Code on the demo capture, shortened, with the tool calls it made.
No agent. No account. No upload.
Your client does not install a monitoring stack, and you do not need access to their server.
Read-only session
One connection with default_transaction_read_only=on and a statement timeout.
Strict allowlist
No credentials, environment variables, command lines, or network identifiers in the file.
Inspectable
Your client can open the file before sending it. Nothing leaves the server on its own.
What is the database doing right now?
$ pg-probe top See the queries running now, longest first, and what each one waits on. It works with PostgreSQL 9.3 and newer.
pg-probe 0.6.0 PostgreSQL 17.11 (Debian 17.11-1.pgdg13+2) · postgres@127.0.0.1:5432/postgres 20:44:28 · every 2 s Sessions 16/200 · ● 13 active · ○ 0 idle · ● 3 idle in txn · ● 0 aborted · ● 0 waiting Host load 25.77 · mem 32.2 GiB/62.7 GiB avail · swap 18.2 GiB used 1 Running 16 2 Waiting 0 3 Blocking 4 Vacuum 5 Settings 6 Log PID Database User CPU% Read/s Write/s IOW State Time Waiting Query 119 postgres postgres 67.3 0 B 3.3 MiB N active 0.726 SELECT r.aid, r.abalan… 121 postgres postgres 64.3 0 B 3.2 MiB N active 0.498 SELECT r.aid, r.abalan… 124 postgres postgres 58.8 0 B 2.8 MiB N active 0.417 Timeout:… SELECT r.aid, r.abalan… 125 postgres postgres 51.3 0 B 745.4 KiB N active 0.369 SELECT r.aid, r.abalan… 126 postgres postgres 58.8 0 B 2.7 MiB N active 0.316 LWLock:B… SELECT r.aid, r.abalan… 123 postgres postgres 55.3 0 B 1.8 MiB N active 0.309 LWLock:B… SELECT r.aid, r.abalan… 122 postgres postgres 56.8 0 B 996.6 KiB N active 0.106 LWLock:B… SELECT r.aid, r.abalan… 120 postgres postgres 52.3 0 B 881.0 KiB N active 0.070 IO:DataF… SELECT r.aid, r.abalan… 148 postgres postgres 23.4 0 B 4.8 MiB N idle in t… 0.001 UPDATE pgbench_branche… 149 postgres postgres 23.9 0 B 4.7 MiB N active 0.000 LWLock:B… UPDATE pgbench_account… 142 postgres postgres 25.9 0 B 5.5 MiB N active 0.000 UPDATE pgbench_branche… 147 postgres postgres 24.9 0 B 5.2 MiB N active 0.000 UPDATE pgbench_branche… 146 postgres postgres 25.9 0 B 5.2 MiB N idle in t… 0.000 Client:C… INSERT INTO pgbench_hi… 144 postgres postgres 24.9 0 B 5.2 MiB N idle in t… 0.000 BEGIN; 143 postgres postgres 25.4 0 B 5.2 MiB N active 0.000 UPDATE pgbench_branche… 145 postgres postgres 25.9 0 B 5.4 MiB N active 0.000 BEGIN; · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 1-6 view • ↑↓ move • enter details • tab preview • g group • space pause • ? help • q quit
pg-probe 0.6.0 PostgreSQL 17.11 (Debian 17.11-1.pgdg13+2) · postgres@127.0.0.1:5432/postgres 20:44:54 · every 2 s Sessions 17/200 · ● 17 active · ○ 0 idle · ● 0 idle in txn · ● 0 aborted · ● 8 waiting Host load 31.93 · mem 32.0 GiB/62.7 GiB avail · swap 18.2 GiB used 1 Running 17 2 Waiting 8 3 Blocking 4 Vacuum 5 Settings 6 Log PID Database User CPU% Read/s Write/s IOW State Time Waiting Query 147 postgres postgres 0.0 0 B 0 B N active 9.588 Lock:tra… UPDATE pgbench_branche… 146 postgres postgres 0.0 0 B 0 B N active 9.588 Lock:tra… UPDATE pgbench_branche… 143 postgres postgres 0.0 0 B 0 B N active 9.588 Lock:tra… UPDATE pgbench_branche… 144 postgres postgres 0.0 0 B 0 B N active 9.588 Lock:tra… UPDATE pgbench_branche… 145 postgres postgres 0.0 0 B 0 B N active 9.588 Lock:tra… UPDATE pgbench_branche… 149 postgres postgres 0.0 0 B 0 B N active 9.588 Lock:tra… UPDATE pgbench_branche… 142 postgres postgres 0.0 0 B 0 B N active 9.588 Lock:tra… UPDATE pgbench_branche… 148 postgres postgres 0.0 0 B 0 B N active 9.588 Lock:tup… UPDATE pgbench_branche… · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 1-6 view • ↑↓ move • enter details • tab preview • g group • space pause • ? help • q quit
pg-probe 0.6.0 PostgreSQL 17.11 (Debian 17.11-1.pgdg13+2) · postgres@127.0.0.1:5432/postgres 20:44:57 · every 2 s Sessions 17/200 · ● 17 active · ○ 0 idle · ● 0 idle in txn · ● 0 aborted · ● 8 waiting Host load 31.93 · mem 32.1 GiB/62.7 GiB avail · swap 18.2 GiB used 1 Running 17 2 Waiting 8 3 Blocking 2 4 Vacuum 5 Settings 6 Log PID Database User CPU% Read/s Write/s IOW State Time Blocks Query 142 postgres postgres 0.0 0 B 0 B N active 12.653 148 UPDATE pgbench_branche… 569 postgres postgres 0.0 0 B 0 B N active 12.651 142,143,… SELECT pg_sleep(30) · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 1-6 view • ↑↓ move • enter details • tab preview • g group • space pause • ? help • q quit
pg-probe 0.6.0 PostgreSQL 17.11 (Debian 17.11-1.pgdg13+2) · postgres@127.0.0.1:5432/postgres 20:45:32 · every 2 s Sessions 17/200 · ● 17 active · ○ 0 idle · ● 0 idle in txn · ● 0 aborted · ● 0 waiting Host load 26.15 · mem 32.1 GiB/62.7 GiB avail · swap 18.2 GiB used 1 Running 17 2 Waiting 0 3 Blocking 4 Vacuum 1 5 Settings 6 Log Members 0.0% used · autovacuum aggressive from 50% · writes stop at 100% Past a freeze limit 0 · read 20:45:27, every 30 s No table is past autovacuum_freeze_max_age or autovacuum_multixact_freeze_max_age. Running now 1 PID Databa… Table Type Phase CPU% Read/s Write/s Scann… IDX Time Waiti… Query 1276 postgr… audit_… manual scanni… 0.0 0 B 31.9 KiB 0.7% 0 8.175 IO:Da… VACUUM (DISABLE_PAGE_S… · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 1-6 view • ↑↓ move • enter details • tab preview • g group • space pause • ? help • q quit
pg-probe 0.6.0 PostgreSQL 17.11 (Debian 17.11-1.pgdg13+2) · postgres@127.0.0.1:5432/postgres 20:45:34 · every 2 s Sessions 17/200 · ● 14 active · ○ 0 idle · ● 3 idle in txn · ● 0 aborted · ● 0 waiting Host load 28.06 · mem 32.1 GiB/62.7 GiB avail · swap 18.2 GiB used 1 Running 17 2 Waiting 0 3 Blocking 4 Vacuum 5 Settings 14 of 385 6 Log Name Value Default Client Connection Defaults / Locale and Formatting 6 of 12 default_text_search_config ● default_text_search_config pg_catalog.e… pg_catalog.s… Sets default text search configuration. ● lc_messages en_US.utf8 '' ● lc_monetary en_US.utf8 C Value pg_catalog.english ● lc_numeric en_US.utf8 C Default pg_catalog.simple ● lc_time en_US.utf8 C Source configuration file ● TimeZone Etc/UTC GMT File /var/lib/postgresql/data/postgresq l.conf:767 Connections and Authentication / Connection Settings 2 of 10 Context user Applies in the session ● listen_addresses * localhost Pending no ● max_connections 200 100 Reporting and Logging / What to Log 2 of 21 ● log_temp_files 0 -1 ● log_timezone Etc/UTC GMT Reporting and Logging / Where to Log 2 of 13 ● log_destination csvlog stderr ● logging_collector on off Statistics / Cumulative Query and Index Statistics 1 of 7 1-6 view • ↑↓ move • / search • d changed • p pending • r reload • esc clear • ? help • q quit
pg-probe 0.6.0 PostgreSQL 17.11 (Debian 17.11-1.pgdg13+2) · postgres@127.0.0.1:5432/postgres 20:45:53 · every 2 s Sessions 17/200 · ● 17 active · ○ 0 idle · ● 0 idle in txn · ● 0 aborted · ● 0 waiting Host load 28.49 · mem 31.7 GiB/62.7 GiB avail · swap 18.2 GiB used 1 Running 17 2 Waiting 0 3 Blocking 4 Vacuum 5 Settings 14 of 385 6 Log Log /var/lib/postgresql/data/log/postgresql-2026-11-13_204342.csv · following · 5.2 MiB read 12 errors since top started at 20:44:20 · 3 distinct · 12 in the last 5 min Time PID Code Message 20:45:36 1346 23505 duplicate key value violates unique const… Errors by user, database and error top 3… 20:45:36 1346 42P01 relation "order_items" does not exist 20:45:36 1346 22012 division by zero Count Last 5m Last User@database 20:45:36 1353 23505 duplicate key value violates unique const… 4 4 20:45:36 postgres@pos… 20:45:36 1353 42P01 relation "order_items" does not exist division_by_zero division by zero 20:45:36 1353 22012 division by zero 4 4 20:45:36 postgres@pos… 20:45:36 1361 23505 duplicate key value violates unique const… unique_violation duplicate key value vi 20:45:36 1361 42P01 relation "order_items" does not exist 4 4 20:45:36 postgres@pos… 20:45:36 1361 22012 division by zero undefined_table relation "order_items" 20:45:36 1372 23505 duplicate key value violates unique const… 20:45:36 1372 42P01 relation "order_items" does not exist 20:45:36 1372 22012 division by zero · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 1-6 view • e errors • t temp files • c checkpoints • ↑↓ move • ←→ resize • enter details • ? help • q quit
pg-probe 0.6.0 PostgreSQL 17.11 (Debian 17.11-1.pgdg13+2) · postgres@127.0.0.1:5432/postgres ‖ paused · 20:44:28 PID 119 postgres · postgres · active · 0.726 Session Database postgres User postgres Application pgbench Client local socket Backend type client backend State active Waiting Timing Connection age 11.194 (since 2026-11-13 20:44:19) Transaction age 0.096 (since 2026-11-13 20:44:31) Query duration 0.096 In this state 0.096 xid / xmin — / 55377 Resources CPU 67.3% now · 4.920 total Memory 4.3 MiB private · 149.4 MiB resident (includes shared buffers) I/O now read 0 B/s · write 3.3 MiB/s I/O total read 0 B · write 24.7 MiB I/O wait no Query SELECT r.aid, ↑↓ scroll • f functions • e explain • space paused • esc back
pg-probe 0.6.0 PostgreSQL 17.11 (Debian 17.11-1.pgdg13+2) · postgres@127.0.0.1:5432/postgres ‖ paused · 20:44:28 PID 119 postgres · postgres · active · 0.726 Sessi Explain in postgres Dat Use Estimated plan (EXPLAIN without ANALYZE). The query was not run, and the plan may differ from the one App the backend is running. Cli Bac Function Scan on branch_report r (cost=0.25..10.25 rows=1000 width=16) Sta Wai Timin Con Tra Que In xid Resou CPU Mem I/O I/O I/O Query ↑↓ scroll • esc back SELECT r.aid, ↑↓ scroll • esc back
pg-probe 0.6.0 PostgreSQL 17.11 (Debian 17.11-1.pgdg13+2) · postgres@127.0.0.1:5432/postgres ‖ paused · 20:44:28 PID 119 postgres · postgres · active · 0.726 Sessi Function in postgres Dat Use public.branch_report App Cli Arguments p_bid integer Bac Returns TABLE(aid integer, abalance integer, history_rows bigint) Sta Language plpgsql Wai Volatility VOLATILE Security invoker Timin Owner postgres Cost / rows 100 / 1000 Con Tra Calls 271 Que Total time 2:19 (self 2:19, the rest in queries it runs) In Mean time 0.517 xid Source Resou 1 BEGIN CPU 2 RETURN QUERY Mem 3 SELECT a.aid, a.abalance, count(h.*) I/O 4 FROM pgbench_accounts a I/O 5 LEFT JOIN pgbench_history h ON h.aid = a.aid I/O 6 WHERE a.bid = p_bid Query ↑↓ scroll • esc back SELECT r.aid, ↑↓ scroll • esc back
Every client backend that is not idle, longest first. On the database host, also its CPU, I/O, and I/O wait from /proc.
Backends waiting on a lock, and the lock each one waits on.
Who holds the lock, with the queue behind each holder as a tree.
Every autovacuum and manual vacuum. From PostgreSQL 9.6, also its phase and how much of the table it has scanned.
Every row of pg_settings by category, with the default, the source, and when a new value applies. d keeps only what differs from the default.
The csvlog of the server as it grows, on the database host. e, t and c keep only the errors, the temp files or the checkpoints, with a summary of each since top started.
One backend: the full query and every age. On the database host, also its CPU, memory, and I/O.
The estimated plan. EXPLAIN without ANALYZE, so the query does not run again.
The plpgsql function it calls: signature, call statistics, and source.
Runs on the servers your clients have.
$ curl -fsSL https://pg-probe.dev/install.sh | sh On a Mac, the console, pg-probe top and the MCP server run too, on Apple Silicon and Intel. Host metrics come from the Linux server.
$ brew install momoi-labs/packages/pg-probe Open source under the PostgreSQL License. The capture, the console, and the report ship in the same binary.