I have completed version 0.1 of pgtop, a PostgreSQL session monitor.
Screenshot attached.
I show the currently running query by using gdb to attach to a running
backend. The backend must have debug symbols and the 'postgres' binary
must be in the current patch. I check for both of these in the program.
I implement Cancel using SIGINT and Terminate using SIGTERM.
I haven't done SORT yet.
You can get it from:
ftp://candle.pha.pa.us/pub/postgresql/pgtop.tcl
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026