Re: Analyzer for postgresql.log

From: Tielman J de Villiers <tjdevil(at)bondnet(dot)co(dot)za>
To: 'Antonio Fiol Bonnín' <fiol(at)w3ping(dot)com>
Cc: "'pgsql-general(at)postgresql(dot)org'" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Analyzer for postgresql.log
Date: 2001-12-10 14:27:15
Message-ID: E1F206EC93DCD4119A05009027A41359064AEF@sbssvr.bondnet.co.za
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Thank you,

I will be using this in a cronjob to act kind of as the "analog" web log
analyser for my postgres logs ...

Just one question -- the "list of times" (eg 13,15) wheat do they refer to
(mine all shows a "0")

Regards

Tielman J de Villiers
BondNet Pty Ltd

-----Original Message-----
From: Antonio Fiol Bonnín [mailto:fiol(at)w3ping(dot)com]
Sent: Monday, December 10, 2001 2:37 PM
To: PostgreSQL General Mailing list
Subject: [GENERAL] Analyzer for postgresql.log

Attached is a little AWK script that you may find of some use.

It takes as standard input a file with the format of the Postgresql log
(level 2, for PostgreSQL 7.0.3 tested).

On standard output, you get a list of times and a mangled form of every
executed request.

Something like

13;select * from my_table where field=''
15;select * from other_table where id= and test>

All number are removed from requests. Also removed are the contents
between single quotes.

This allows me to sort by request and then either count them or add up
the times. That way I know what I need to optimize.

The script is far from perfect. It just works for me ;-)

Antonio Fiol

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Mourad EL HADJ MIMOUNE 2001-12-10 15:30:45 Limit of sequence
Previous Message Alex Avriette 2001-12-10 14:01:59 Suitability of postgres for very high transaction volume