Pages: 1/1 First page 1 Final page [ View by Articles | List ]
"pgFouine is a PostgreSQL log analyzer used to generate detailed reports from a PostgreSQL log file. pgFouine can help you to determine which queries you should optimize to speed up your PostgreSQL based application."

you can use syslog or stderr

for example :use syslog

1. edit your /etc/syslog.conf
Quotation
  local0.*    -/var/log/pgsql

Quotation

*.info;mail.none;authpriv.none;cron.none;local0.none                /var/log/messages



2. edit postgresl.conf
Quotation
log_destination = 'syslog'
silent_mode = on

log_min_duration_statement = 0
#set to 0  log all
#set to -1 ,disable query logging
#set to X(positive integral) ,means to log queries slower than X milliseconds:

log_duration = off
log_statement = 'all'


3.download pgFouine
http://pgfouine.projects.postgresql.org/index.html

than restart syslogd and postgresql

4. analyse log
./pgfouine.php -file /var/log/postgresql/pgsql > askwan.com.html

Open in new window

use stderr please refer to http://gkoenig.wordpress.com/2009/02/19/pgfouine-dive-into-postgres-log/
Pages: 1/1 First page 1 Final page [ View by Articles | List ]