Re: see all queries incoming

Поиск
Список
Период
Сортировка
Искать
От
Michael Fuhr
Тема
Re: see all queries incoming
Дата
Msg-id
20050828131923.GA8100@winnie.fuhr.org
Ответ на
Re: see all queries incoming (Kretschmer Andreas)
Список
Дерево обсуждения
see all queries incoming Flávio Brito <flavio@gral.org.br>
Re: see all queries incoming Kretschmer Andreas <andreas_kretschmer@despammed.com>
Re: see all queries incoming Flávio Brito <flavio@gral.org.br>
Re: see all queries incoming Kretschmer Andreas <andreas_kretschmer@despammed.com>
Re: see all queries incoming Michael Fuhr <mike@fuhr.org>
Re: see all queries incoming Kretschmer Andreas <andreas_kretschmer@despammed.com>
On Sun, Aug 28, 2005 at 02:37:00PM +0200, Kretschmer Andreas wrote:
> Flávio Brito  schrieb:
> > How can I see, such as MSSQL screen, all queries that are processing in real
> > time?
> > 
> > I want to monitor all the queries that are being processed by a user in real
> > time.
> 
> watch "echo \"SELECT * FROM pg_stat_activity;\" | psql -U  

Does that actually work on your system?  On the system I tested it
sends screen control garbage to the pipe.  Aside from that, "watch"
isn't a standard command -- on one of my systems (FreeBSD) I get this:

  watch: fatal: cannot open snoop device

On another (Solaris) I get this:

  watch: Command not found.

Additionally, periodically doing "SELECT * FROM pg_stat_activity"
isn't a reliable way to see *all* queries, as you'll miss queries
that happened between your SELECTs.  It's also wasteful of resources,
especially if you start a new session for each query.

-- 
Michael Fuhr
В списке pgsql-novice по дате отправления
От: Kretschmer Andreas
Дата:
Сообщение: Re: see all queries incoming
От: Kretschmer Andreas
Дата:
Сообщение: Re: see all queries incoming
FAQ