From: Scott Marlowe <scott.marlowe@gmail.com>
To: Renato Oliveira <renato.oliveira@grant.co.uk>
Cc: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Subject: Re: Tail -f or watch for postgres
Date: Tue, 20 Apr 2010 04:32:57 -0600
Message-ID: <j2wdcc563d11004200332hf17ead27l8c21f8b3aaf17c12@mail.gmail.com> (raw)
In-Reply-To: <7965A9DCF12CC14984420BCC37B1608F25AC0B9EF1@Elzar.grant.co.uk>
References: <7965A9DCF12CC14984420BCC37B1608F25AC0B9EF1@Elzar.grant.co.uk>
On Tue, Apr 20, 2010 at 1:20 AM, Renato Oliveira
<renato.oliveira@grant.co.uk> wrote:
> Dear all,
>
> It may sounds crazy it may not sound so crazy.
>
> I was here think are there any commands to watch new transactions rolling
> through the screen like a terminal monitor?
>
> For example, if you want to watch a log file you can execute the command;
> tail –f <logfile> or watch.
>
> This will keep the log entries rolling and being displayed on screen.
>
> Is there something similar to postgreSQL?
while true; do psql mydb -c "select * from pg_stat_activity where
current_query <>'<IDLE>'";sleep 10;done
or something like that.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: scott.marlowe@gmail.com, renato.oliveira@grant.co.uk
Subject: Re: Tail -f or watch for postgres
In-Reply-To: <j2wdcc563d11004200332hf17ead27l8c21f8b3aaf17c12@mail.gmail.com>
References: <7965A9DCF12CC14984420BCC37B1608F25AC0B9EF1@Elzar.grant.co.uk> <j2wdcc563d11004200332hf17ead27l8c21f8b3aaf17c12@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox