I needed a utility for capturing various data-points about a PostgreSQL database as I performed load tests. I copied a utility I have used previously on Oracle that worked quite well. The new utility is called pgd pgstat. This utility spits out various DB metrics on the command line similar to iostat. It’s good for quick diagnosis, performance testing, etc. The output is suitable for import/graphing in excel as well, just use space delimited format when importing the data. Here is a screenshot of how the output appears. You can download the utility and give it a whirl.

I am a Data Architect for Shutterfly Inc. in Redwood Shores, CA.
LinkedIn Profile-
Github activity
2010-07-30 18:02:40: kgorman created gist: 5010142010-07-28 19:33:17: kgorman updated gist: 4959412010-07-28 19:33:03: kgorman created gist: 4959412010-07-27 22:51:10: kgorman updated gist: 4925692010-07-27 17:39:08: kgorman created gist: 492569 Categories
- Data Architecture (3)
- Database Engineering (10)
- Mongodb (9)
- MySQL (1)
- Oracle (5)
- PostgreSQL (18)
- Python (6)
- Random (5)
Recent Comments
- jametong on Data clustering in MongoDB using embedded docs
- Data clustering in MongoDB using embedded docskennygorman.com | kennygorman.com on Cluster data, save cash
- kgorman on WordPress 3.0
- Disk I/O: PCI Based SSDs « makeitfaster on Fusion-io SSD
- Log Buffer #189, A Carnival of the Vanities for DBAs « So Many Oracle Manuals, So Little Time on Wayback Machine: snapshots still valid technique
Tags
acid architecture backups cap theorem clustering database Database Engineering direct i/o durability fusion-io gnuplot hp Mongodb mongosf mongostat MySQL nosql open source Oracle performance pgstat pg_reorg PostgreSQL postgresql Python replication rrdtool rss scalability Shutterfly slony snapshots Solaris SSD statspack strace Sun tools vxfs WordpressBlogroll
Archives

Again: perl version at
http://www.bsdhosting.co.za/~jamesw/pgstat-perl.tgz
Depends on DBI, DBD::Pg, Getopt::Long, Pod::Usage and DateTime
Pingback: Tuning for very large buffer_cache, using Veritas VxFS | kennygorman.com
Pingback: Graphing pgd output | kennygorman.com
Thx Igor for catching a bug.. ;-)