Skip to content

Commit ebc4c8c

Browse files
authored
Merge pull request #81 from OurSQLFoundation/resources/add-ps-top
Add ps-top to Software & Tools
2 parents dad17b6 + 5e95807 commit ebc4c8c

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
title: "ps-top"
3+
link: "https://github.com/sjmudd/ps-top"
4+
description: "A top-like, real-time terminal monitor for MySQL built on performance_schema — load by table, file, user, mutex, and SQL stage."
5+
subcategories:
6+
- Monitoring & Observability
7+
compatibility:
8+
- MySQL
9+
- MariaDB
10+
deployment:
11+
- Self-Hosted
12+
pricing:
13+
- Open Source
14+
---
15+
16+
ps-top reads MySQL's `performance_schema` and shows server load in real time, refreshed every second by default. Activity is broken down by table or file name and split between select, insert, update, and delete work, so you can see at a glance where the server is spending its time. It works with MySQL 5.6 and later, and with MariaDB once `performance_schema` is switched on (it's off by default there from 10.0.12).
17+
18+
It has seven views — table I/O latency, table I/O operations, file I/O latency, table lock latency, user activity (including how many distinct hosts connect under the same username), mutex latency, and SQL stage timings — which you cycle through with the Tab or arrow keys. The poll interval can be changed on the fly, and statistics can be shown either since ps-top started or last reset, or as the absolute values MySQL reports. An optional `~/.pstoprc` file can merge similarly named tables (for example, date-suffixed ones) into a single row.
19+
20+
ps-top only needs `SELECT` on the `performance_schema` tables. The mutex and stage views need `setup_instruments` to be enabled; ps-top will switch them on itself if the account has the grants and restores the original settings on exit. For credentials it reads `~/.my.cnf` or an explicit defaults file, accepts host, port, socket, and user options on the command line, and can prompt for a password or take a Go DSN from the environment so nothing sensitive lands in a process listing.
21+
22+
It's a single Go program, installed with `go install github.com/sjmudd/ps-top@latest`. Its author, Simon J Mudd, started it as a project to learn Go (the license is copyrighted 2014–2026) and it's still being developed — the latest tag, v1.2.2, dates from April 2026. It's released under the BSD 2-Clause license.

0 commit comments

Comments
 (0)