Re: Number of Connections

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Number of Connections
Дата
Msg-id 13807.982358637@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Number of Connections  (Neil Conway <nconway@klamath.dyndns.org>)
Список pgsql-general
Neil Conway <nconway@klamath.dyndns.org> writes:
> On Fri, Feb 16, 2001 at 02:09:42PM -0500, Bryan White wrote:
>> ps ax | grep postgres | wc -l
>> Note the value is often one to high because is picks up the grep process.

> Why not just remove 'grep' - i.e
> ps ax | grep postgres | grep -v grep | wc -l

Actually this is a standard problem with a standard solution: use a
not-so-literal grep pattern, eg

    ps ax | grep '[p]ostgres' | wc -l

This pattern matches 'postgres' but not '[p]ostgres'.  Problem solved.

            regards, tom lane

В списке pgsql-general по дате отправления:

Предыдущее
От: Stephan Szabo
Дата:
Сообщение: Re: Question
Следующее
От: "Tim Barnard"
Дата:
Сообщение: Re: Number of Connections