Contact Us

If you are interested in our services leave your contact details below and our sales representatives will contact you.

The organization which you represent
Email address we will use to contact you
Longer contact form…
 
  • About

    mFabrik Blog is about mobile and web software development, open source and Linux. We tell exciting tales where business, technology, web and mobile convergence.

    Creative Commons License
    This work is licensed under a Creative Commons Attribution 3.0 Unported License.

Profiling PostgreSQL database

Posted on January 2, 2010  by Mikko Ohtamaa
Filed Under linux, postgresql, ubuntu

This blog post will have some short notes about monitoring and profiling PostgreSQL databases.

pgtop

pgtop provides UNIX top command like user interface for PostgreSQL. pgtop command is available as Perl CPAN module.

How to install Perl CPAN modules as non-root user on Ubuntu (note: when it prompts to run sudo, answer no).

To install pgtop install following CPAN modules first: Term::ANSIColor, Term::ReadKey, DBD::Pg

perl -MCPAN -Mlocal::lib -e 'CPAN::install(DBD::Pg)'
perl -MCPAN -Mlocal::lib -e 'CPAN::install(Term::ReadKey)'
perl -MCPAN -Mlocal::lib -e 'CPAN::install(Term::ANSIColor)'

pgtop install instructions

pgtop manul

Running pgtop:

perl pgtop -d databasename -u yourdbuser -p yourdbuserpassword

pgfouine

pgfouine is a log analyzer for PostgreSQL.

 

Other posts by Mikko Ohtamaa

 

Comments

Leave a Reply