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:
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:
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.