Re: Number of Connections

Поиск
Список
Период
Сортировка
От John Burski
Тема Re: Number of Connections
Дата
Msg-id 3A8DAE12.BD7FA386@911ep.com
обсуждение исходный текст
Ответ на Number of Connections  ("Steve McAtee" <steve@proactivedev.com>)
Список pgsql-general
The "-v" option tells grep to select everything EXCEPT the following
term.  Therefore, the "grep -v grep" section of the piped commands will
delete the "extra" line (the one generated by the "grep postgres"
command) that the ps command spits out prior to piping it into the "wc
-l" command.

Tim Barnard wrote:

> What's the purpose of the "grep -v grep" ?
>
> Tim
>
> ----- Original Message -----
> From: "Neil Conway" <nconway@klamath.dyndns.org>
> To: "pgsql-general" <pgsql-general@postgreSQL.org>
> Sent: Friday, February 16, 2001 12:05 PM
> Subject: Re: [GENERAL] Number of Connections
>
> > On Fri, Feb 16, 2001 at 02:09:42PM -0500, Bryan White wrote:
> > > I use:
> > >     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
> >
> > HTH,
> >
> > Neil
> >
> > --
> > Neil Conway <neilconway@home.com>
> > Get my GnuPG key from: http://klamath.dyndns.org/mykey.asc
> > Encrypted mail welcomed

--
John Burski
Chief IT Cook and Bottlewasher
911 Emergency Products, St. Cloud, MN
(320) 656 0076       www.911ep.com

++++++++++++++++++++++++++++++++++
+ How's your cheese holding out? +
++++++++++++++++++++++++++++++++++




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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: How to use gethostbyname()
Следующее
От: "Brett W. McCoy"
Дата:
Сообщение: Re: Number of Connections