Re: Analyzer for postgresql.log

From: Justin Clift <justin(at)postgresql(dot)org>
To: Tielman J de Villiers <tjdevil(at)bondnet(dot)co(dot)za>
Cc: "'Antonio Fiol =?iso-8859-1?Q?Bonn=EDn=27?=" <fiol(at)w3ping(dot)com>, "'pgsql-general(at)postgresql(dot)org'" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Analyzer for postgresql.log
Date: 2001-12-11 03:02:47
Message-ID: 3C157757.3944F9E5@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

You might also like to check out "PostgreSQL Log Analyzer v1.1" by
Gilles Darold :

http://www.samse.fr/GPL/pg_analyzer/sample/

:)

Regards and best wishes,

Justin Clift

Tielman J de Villiers wrote:
>
> 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
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster

--
"My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there."
- Indira Gandhi

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Martijn van Oosterhout 2001-12-11 04:22:51 Re: What can I use as a [non-aggregate] minimum function
Previous Message Brian Beuning 2001-12-11 02:50:23 Re: use BLOBS or use pointers to files on the filesystem?