From: | John Burski <John(dot)Burski(at)911ep(dot)com> |
---|---|
To: | Tim Barnard <tbarnard(at)povn(dot)com> |
Cc: | pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Number of Connections |
Date: | 2001-02-16 22:47:46 |
Message-ID: | 3A8DAE12.BD7FA386@911ep.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)klamath(dot)dyndns(dot)org>
> To: "pgsql-general" <pgsql-general(at)postgreSQL(dot)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(at)home(dot)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? +
++++++++++++++++++++++++++++++++++
From | Date | Subject | |
---|---|---|---|
Next Message | Konstantinos Agouros | 2001-02-16 23:35:12 | Re: How to use postgres 7.0.3 with -F? |
Previous Message | Bruce Momjian | 2001-02-16 22:47:16 | Re: How to use gethostbyname() |