PgFouine is a interesting PostgreSQL Analyzer Tool which is available for Generating the Reports in html format.

Advantage of using this tool is that user gets report in text or HTML format, which is easy to analyze.

Using pgFouine user can make following types of Reports:
1. Error Reports
2. Slow Query reports
3. Vacuum Verbose Reports etc…

Installation of pgFouine is simple.

Download the source from following location:
http://pgfoundry.org/frs/download.php/2575/pgfouine-1.2.tar.gz

and then extract the pgfouine source using following command:

<pre class="cpp">tar zxvf pgfouine-1.2.tar.gz.</pre>

Please note, before using pgfouine user has to make sure that it has php installed on his server.

pgFouine has some restriction over analyzing the log file. It analyzes the PostgreSQL logfiles, if the log_line_prefix has following format:

<pre class="cpp">log_line_prefix = 'user=%u,db=%d ' ( Filter on database with user with syslog )
log_line_prefix = '%t [%p]: [%l-1] ' ( For standard errors)
log_line_prefix = '%t [%p]: [%l-1] user=%u,db=%d ' (Filter on database/user with steer)</pre>

For more information on Installation and configuration of pgfouine, following is a link:
http://pgfouine.projects.postgresql.org/tutorial.html

Usage of pgfouine:

<pre class="cpp">php pgfouine.php -file  -logtype [syslog|stderr|csvlog] > report.html</pre>
<pre class="cpp">

pgfouine can also be used for analyzing the vacuum verbose output.

Following are sample of VACUUM VERBOSE report generated by pgfouine.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s