Add new mutex page inspired by: http://www.percona.com/blog/2015/01/06/getting-mutex...
[pstop.git] / README.md
index d1a22f2..097450a 100644 (file)
--- a/README.md
+++ b/README.md
@@ -12,13 +12,30 @@ the actiity of those users.
 
 ### Installation
 
-Install and update this go package with `go get -u github.com/sjmudd/pstop`
+Install and update this go package with `go get -u github.com/sjmudd/pstop`.
+
+Note if you are looking for binaries for pstop then look here
+http://gobuild.io/github.com/sjmudd/pstop as a possible location.
+I have not tried this service but it looks ok.
+
+### Dependencies
+
+The following Non-core Go dependencies are:
+* github.com/sjmudd/mysql_defaults_file for connecting to MySQL via
+a defaults file.
+* github.com/nsf/termbox-go a library for creating cross-platform
+text-based interfaces.
 
 ### Configuration
 
-Access to MySQL is currently via a defaults-file which is assumed
-to be `~/.my.cnf`. This should probably be made more configurable.
-If you see a need for this please let me know.
+Access to MySQL can be made by one of the following methods:
+* Default: use a defaults-file named `~/.my.cnf`.
+* use an explicit defaults-file with `--defaults-file=/path/to/.my.cnf`.
+* connect to a host with `--host=somehost --port=999 --user=someuser --password=somepass`, or
+* connect via a socket with `--socket=/path/to/mysql.sock --user=someuser --password=somepass`
+
+The user if not specified will default to the contents of `$USER`.
+The port if not specified will default to 3306.
 
 ### Grants
 
@@ -32,7 +49,15 @@ pstop has 5 different screens which get updated by default every second.
 * Ops (operations) mode: order table activity by the number of operations MySQL performs on them.
 * I/O mode: show where MySQL is spending it's time in file I/O.
 * Locks mode: show order based on table locks
-* User mode: show ordering based on how long users are running queries, or the number of connections they have to MySQL.
+* User mode: show ordering based on how long users are running
+queries, or the number of connections they have to MySQL. This is
+really missing a feature in MySQL (see: http://bugs.mysql.com/75156)
+to provide higher resolution query times than seconds. It gives
+some info but if the queries are very short then the integer runtime
+in seconds makes the output far less interesting. Total idle time is also
+shown as this gives an indication of perhaps overly long idle queries,
+and the sum of the values here if there's a pile up may be interesting.
+* Mutex mode: show the ordering by mutex latency (currently requires correct P_S setup).
 
 You can change the polling interval and switch between modes (see below).
 
@@ -46,7 +71,7 @@ The following keys allow you to navigate around the different pstop displays or
 * q - quit
 * t - toggle between showing the statistics since resetting pstop started or you explicitly reset them (with 'z') [REL] or showing the statistics as collected from MySQL [ABS].
 * z - reset statistics. That is counters you see are relative to when you "reset" statistics.
-* <tab> - change display modes between: latency, ops, file I/O, lock modes and user modes.
+* <tab> - change display modes between: latency, ops, file I/O, lock, user and mutex modes.
 * left arrow - change to previous screen
 * right arrow - change to next screen
 
@@ -74,7 +99,11 @@ BSD 2-Clause License
 
 ### Feedback
 
-Feedback and patches welcome.
+Feedback and patches welcome. I am especially interested in hearing
+from you if you are using pstop, or if you have ideas of how I can
+better use other information from the performance_schema tables to
+provide a more complete vision of what MySQL is doing or where it's
+busy.
 
 Simon J Mudd
 <sjmudd@pobox.com>