~openerp-dev/openerp-tools/trunk-bootstrap-fme

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
pgFouine is a postgresql log analyzer. This procedure explain how to install it on Ubuntu 10.04 (Lucid Lynx) as the installation tutorial given on the site (http://pgfouine.projects.postgresql.org/index.html) is not up-to-date.

INSTALL
-------
1. go in superuser mode
$ sudo su

2. install pgfouine
# apt-get install pgfouine

3.configure postgresl
# gedit /etc/postgresql/8.4/main/postgresql.conf

append that lines to the file:
#PGFOUINE CONFIG
log_destination = 'syslog'
silent_mode = on
log_min_duration_statement = 0
log_duration = off
log_statement = 'none'

make also sure that the language of the error messages is en_US.utf8 (lc_messages = 'en_US.utf8')

4.configure rsyslog
# gedit /etc/rsyslog.d/50-default.conf

append that lines to the file:
#PGFOUINE CONFIG
local0.*                -/var/log/psql.log
.info;mail.none;authpriv.none;cron.none;local0.none                /var/log/messages

5.restart postgresql and rsyslog
# restart rsyslog

# su postgres
$ /etc/init.d/postgresql-8.4 restart

6. test it's working correctly by doing some flow in openerp 

7. check the report given by pgfouine
# pgfouine -f psql.log > pgfouine.html
# firefox pgfouine.html