From: | Massimo Dal Zotto <dz(at)cs(dot)unitn(dot)it> |
---|---|
To: | hackers(at)postgreSQL(dot)org (PostgreSQL Hackers) |
Cc: | black(at)lins(dot)ospu(dot)odessa(dot)ua (Blashko Alexander) |
Subject: | Re: pg_options ? |
Date: | 1999-01-04 17:36:57 |
Message-ID: | 199901041737.SAA01937@boogie.cs.unitn.it |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers |
>
>
> Hi everybody.
> I tried to use pg_options for monitoring sql-query.
> pg_options: all=1
> /ets/syslog.conf:
> local5.* /var/log/postgres
> for postgres start i use script src/contrib/linux/postgres.init.csh:
> (postmaster -d 2 2>&1 | logger -p local5.notice) &
>
> In /var/log/postgres i have:
> Jan 4 17:13:09 SantaMariya logger: StartTransactionCommand
>
>
> How can i give syslog information in form:
> #timestamp #pid #message
>
> For example:
> Jan 4 17:13:09.173 [29271] StartTransactionCommand
> ^^^ ^^^^^
> I need this
> information.
>
> Thank you for your answer.
There is a better way to do it. Compile postgres with -DUSE_SYSLOG, add
syslog=1 or syslog=2 into pg_options and it will output all elog messages
to the syslog facility with the pid. See trace.c for details.
But you won't be able to see the milliseconds fields because syslog
doesn't handle this information.
--
Massimo Dal Zotto
+----------------------------------------------------------------------+
| Massimo Dal Zotto email: dz(at)cs(dot)unitn(dot)it |
| Via Marconi, 141 phone: ++39-0461534251 |
| 38057 Pergine Valsugana (TN) www: http://www.cs.unitn.it/~dz/ |
| Italy pgp: finger dz(at)tango(dot)cs(dot)unitn(dot)it |
+----------------------------------------------------------------------+
From | Date | Subject | |
---|---|---|---|
Next Message | The Hermit Hacker | 1999-01-04 17:51:17 | Postgresql v6.4.2 Released ... (fwd) |
Previous Message | Herouth Maoz | 1999-01-04 17:04:43 | Re: [GENERAL] Failed to compile |
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 1999-01-04 17:40:04 | Re: [HACKERS] 6.4.2? |
Previous Message | The Hermit Hacker | 1999-01-04 17:16:03 | Re: [HACKERS] 6.4.2? |