pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
users work now with PostgreSQL
10+ messages / 4 participants
[nested] [flat]

* users work now with PostgreSQL
@ 2000-12-10 20:35 Michael B. Babakov <M.Babakov@sochi.net.ru>
  0 siblings, 0 replies; 10+ messages in thread

From: Michael B. Babakov @ 2000-12-10 20:35 UTC (permalink / raw)
  To: pgsql-admin

Good day!

How to look what users work now with PostgreSQL?

-- 
Good luck,
    Michael

---
e-mail: M.Babakov@sochi.net.ru
http://sochi.net.ru/~mike



^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* users work now with PostgreSQL
@ 2000-12-11 08:39 Michael B. Babakov <M.Babakov@sochi.net.ru>
  2000-12-12 16:50 ` Re: users work now with PostgreSQL Ross J. Reedstrom <reedstrm@rice.edu>
  0 siblings, 1 reply; 10+ messages in thread

From: Michael B. Babakov @ 2000-12-11 08:39 UTC (permalink / raw)
  To: pgsql-admin

Good day!

How to look what users work now with PostgreSQL?

Good luck,
    Michael

---
e-mail: M.Babakov@sochi.net.ru
http://sochi.net.ru/~mike



^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* Re: users work now with PostgreSQL
  2000-12-11 08:39 users work now with PostgreSQL Michael B. Babakov <M.Babakov@sochi.net.ru>
@ 2000-12-12 16:50 ` Ross J. Reedstrom <reedstrm@rice.edu>
  2000-12-12 19:25   ` Re: users work now with PostgreSQL Michael B. Babakov <M.Babakov@sochi.net.ru>
  0 siblings, 1 reply; 10+ messages in thread

From: Ross J. Reedstrom @ 2000-12-12 16:50 UTC (permalink / raw)
  To: Michael B. Babakov <M.Babakov@sochi.net.ru>; +Cc: pgsql-admin

It's encoded in the process environment, so the 'ps' command will
give you what you want:

On my Debian linux box, I do something like:

reedstrm@cooker:~$ ps ax | grep '[/]postgres '
18737 ?        S      0:02 /usr/lib/postgresql/bin/postmaster -b /usr/lib/postgresql/bin/postgres -B 128 -D /var/lib/postgres/data -d 2 -i -o -E
 8696 ?        S      0:00 /usr/lib/postgresql/bin/postgres localhost reedstrm reedstrm idle                                                   
 8697 ?        S      0:00 /usr/lib/postgresql/bin/postgres 192.168.1.190 reedstrm idas idle                                                   
reedstrm@cooker:~$ 


This shows you the postmaster, and two clients connected: Both are
user 'reedstrm' one is connected to database 'reedstrm' and is a local
conenction, the other to 'idas' from a remote machine (I faked the IP).
Both are currently idle.

The odd form of the grep argument is just to filter out the psql client,
and the grep process itself. If you want something completely automated,
say to use in a script of some sort, I'd go with (note that the exact
syntax depends on your version of unix):

reedstrm@cooker:~$ ps ax | grep '[/]usr/lib/postgresql/bin/postgres' |
grep -v postmaster | awk '{print $6,$7,$8,$9}'

localhost reedstrm reedstrm idle
192.168.1.190 reedstrm idas idle

Ross

On Mon, Dec 11, 2000 at 11:39:01AM +0300, Michael B. Babakov wrote:
> Good day!
> 
> How to look what users work now with PostgreSQL?
> 
-- 
Open source code is like a natural resource, it's the result of providing
food and sunshine to programmers, and then staying out of their way.
[...] [It] is not going away because it has utility for both the developers 
and users independent of economic motivations.  Jim Flynn, Sunnyvale, Calif.



^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* Re: users work now with PostgreSQL
  2000-12-11 08:39 users work now with PostgreSQL Michael B. Babakov <M.Babakov@sochi.net.ru>
  2000-12-12 16:50 ` Re: users work now with PostgreSQL Ross J. Reedstrom <reedstrm@rice.edu>
@ 2000-12-12 19:25   ` Michael B. Babakov <M.Babakov@sochi.net.ru>
  2000-12-12 19:42     ` Re: users work now with PostgreSQL Ross J. Reedstrom <reedstrm@rice.edu>
  2000-12-13 18:43     ` Re: users work now with PostgreSQL Peter Eisentraut <peter_e@gmx.net>
  0 siblings, 2 replies; 10+ messages in thread

From: Michael B. Babakov @ 2000-12-12 19:25 UTC (permalink / raw)
  To: Ross J. Reedstrom <reedstrm@rice.edu>; +Cc: pgsql-admin


On 12-Dec-00 Ross J. Reedstrom wrote:
> It's encoded in the process environment, so the 'ps' command will
> give you what you want:

 Yes! For version < 7.0.2 it's right. After 7.0.2 postgresql don't write user
in 'ps' command.
 I'm use FreeBSD 4.2.

 I'm make:

1. In src/include/config.h:

#define ELOG_TIMESTAMPS

...

gmake

2. In data/pg_options:

verbose=1
hostlookup

3. Running postgresql as:

#!/usr/local/bin/bash

export LC_COLLATE=ru_SU.KOI8-R
export LC_CTYPE=ru_SU.KOI8-R

/usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data  -o \
 "-o -F -B 256 -i" start \
 2>&1 | /home/mike/program/perl/pg_user/filter.pl > /usr/local/pgsql/errlog &

4. /home/mike/program/perl/pg_user/filter.pl:

#!/usr/bin/perl
$| = 1;
while(<STDIN>) {
        print $_ if /started/ || / exit/;
};

 'grep' command buffered output (?) and posting filtered message more laters.

Some more ideas?

P.S. Sorry, for my bad english. :(

Good luck,
    Michael

---
e-mail: M.Babakov@sochi.net.ru
http://sochi.net.ru/~mike




^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* Re: users work now with PostgreSQL
  2000-12-11 08:39 users work now with PostgreSQL Michael B. Babakov <M.Babakov@sochi.net.ru>
  2000-12-12 16:50 ` Re: users work now with PostgreSQL Ross J. Reedstrom <reedstrm@rice.edu>
  2000-12-12 19:25   ` Re: users work now with PostgreSQL Michael B. Babakov <M.Babakov@sochi.net.ru>
@ 2000-12-12 19:42     ` Ross J. Reedstrom <reedstrm@rice.edu>
  2000-12-12 20:15       ` Re: users work now with PostgreSQL Bruce Momjian <pgman@candle.pha.pa.us>
  1 sibling, 1 reply; 10+ messages in thread

From: Ross J. Reedstrom @ 2000-12-12 19:42 UTC (permalink / raw)
  To: Michael B. Babakov <M.Babakov@sochi.net.ru>; +Cc: pgsql-admin

On Tue, Dec 12, 2000 at 10:25:43PM +0300, Michael B. Babakov wrote:
> 
> On 12-Dec-00 Ross J. Reedstrom wrote:
> > It's encoded in the process environment, so the 'ps' command will
> > give you what you want:
> 
>  Yes! For version < 7.0.2 it's right. After 7.0.2 postgresql don't write user
> in 'ps' command.
>  I'm use FreeBSD 4.2.

Ah, I vaguely remember some talk about setting the command line being
expensive on some of the *BSDs. It's in the hackers archives a few months
back. You'll have to wait for a FreeBSD person to tell you the details.

Ross




^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* Re: users work now with PostgreSQL
  2000-12-11 08:39 users work now with PostgreSQL Michael B. Babakov <M.Babakov@sochi.net.ru>
  2000-12-12 16:50 ` Re: users work now with PostgreSQL Ross J. Reedstrom <reedstrm@rice.edu>
  2000-12-12 19:25   ` Re: users work now with PostgreSQL Michael B. Babakov <M.Babakov@sochi.net.ru>
  2000-12-12 19:42     ` Re: users work now with PostgreSQL Ross J. Reedstrom <reedstrm@rice.edu>
@ 2000-12-12 20:15       ` Bruce Momjian <pgman@candle.pha.pa.us>
  2000-12-13 06:15         ` Re: users work now with PostgreSQL Michael B. Babakov <M.Babakov@sochi.net.ru>
  0 siblings, 1 reply; 10+ messages in thread

From: Bruce Momjian @ 2000-12-12 20:15 UTC (permalink / raw)
  To: Ross J. Reedstrom <reedstrm@rice.edu>; +Cc: Michael B. Babakov <M.Babakov@sochi.net.ru>; pgsql-admin

> On Tue, Dec 12, 2000 at 10:25:43PM +0300, Michael B. Babakov wrote:
> > 
> > On 12-Dec-00 Ross J. Reedstrom wrote:
> > > It's encoded in the process environment, so the 'ps' command will
> > > give you what you want:
> > 
> >  Yes! For version < 7.0.2 it's right. After 7.0.2 postgresql don't write user
> > in 'ps' command.
> >  I'm use FreeBSD 4.2.
> 
> Ah, I vaguely remember some talk about setting the command line being
> expensive on some of the *BSDs. It's in the hackers archives a few months
> back. You'll have to wait for a FreeBSD person to tell you the details.
> 

It should be working.  There is a configure flag that I think controls
it, and on 7.1 it will work by default.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026



^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* Re: users work now with PostgreSQL
  2000-12-11 08:39 users work now with PostgreSQL Michael B. Babakov <M.Babakov@sochi.net.ru>
  2000-12-12 16:50 ` Re: users work now with PostgreSQL Ross J. Reedstrom <reedstrm@rice.edu>
  2000-12-12 19:25   ` Re: users work now with PostgreSQL Michael B. Babakov <M.Babakov@sochi.net.ru>
  2000-12-12 19:42     ` Re: users work now with PostgreSQL Ross J. Reedstrom <reedstrm@rice.edu>
  2000-12-12 20:15       ` Re: users work now with PostgreSQL Bruce Momjian <pgman@candle.pha.pa.us>
@ 2000-12-13 06:15         ` Michael B. Babakov <M.Babakov@sochi.net.ru>
  0 siblings, 0 replies; 10+ messages in thread

From: Michael B. Babakov @ 2000-12-13 06:15 UTC (permalink / raw)
  To: pgsql-admin


On 12-Dec-00 Bruce Momjian wrote:
>> On Tue, Dec 12, 2000 at 10:25:43PM +0300, Michael B. Babakov wrote:
>> > 
>> >  Yes! For version < 7.0.2 it's right. After 7.0.2 postgresql don't write user
>> > in 'ps' command.
>> >  I'm use FreeBSD 4.2.
>> 
> 
> It should be working.  There is a configure flag that I think controls
> it, and on 7.1 it will work by default.

Please, prompt what flag and where about it it is possible to read?

С уважением,
  Михаил Бабаков

--------------------------------
 Телефон: (8622) 919-595
 e-mail: M.Babakov@sochi.net.ru
 ICQ: 16442739



^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* Re: users work now with PostgreSQL
  2000-12-11 08:39 users work now with PostgreSQL Michael B. Babakov <M.Babakov@sochi.net.ru>
  2000-12-12 16:50 ` Re: users work now with PostgreSQL Ross J. Reedstrom <reedstrm@rice.edu>
  2000-12-12 19:25   ` Re: users work now with PostgreSQL Michael B. Babakov <M.Babakov@sochi.net.ru>
@ 2000-12-13 18:43     ` Peter Eisentraut <peter_e@gmx.net>
  2000-12-13 19:11       ` Re: users work now with PostgreSQL Michael B. Babakov <M.Babakov@sochi.net.ru>
  1 sibling, 1 reply; 10+ messages in thread

From: Peter Eisentraut @ 2000-12-13 18:43 UTC (permalink / raw)
  To: Michael B. Babakov <M.Babakov@sochi.net.ru>; +Cc: Ross J. Reedstrom <reedstrm@rice.edu>; pgsql-admin

Michael B. Babakov writes:

>
> On 12-Dec-00 Ross J. Reedstrom wrote:
> > It's encoded in the process environment, so the 'ps' command will
> > give you what you want:
>
>  Yes! For version < 7.0.2 it's right. After 7.0.2 postgresql don't write user
> in 'ps' command.
>  I'm use FreeBSD 4.2.

Doesn't work on FreeBSD 4.* in PostgreSQL 7.0.*.  Sorry.

-- 
Peter Eisentraut      peter_e@gmx.net       http://yi.org/peter-e/




^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* Re: users work now with PostgreSQL
  2000-12-11 08:39 users work now with PostgreSQL Michael B. Babakov <M.Babakov@sochi.net.ru>
  2000-12-12 16:50 ` Re: users work now with PostgreSQL Ross J. Reedstrom <reedstrm@rice.edu>
  2000-12-12 19:25   ` Re: users work now with PostgreSQL Michael B. Babakov <M.Babakov@sochi.net.ru>
  2000-12-13 18:43     ` Re: users work now with PostgreSQL Peter Eisentraut <peter_e@gmx.net>
@ 2000-12-13 19:11       ` Michael B. Babakov <M.Babakov@sochi.net.ru>
  0 siblings, 0 replies; 10+ messages in thread

From: Michael B. Babakov @ 2000-12-13 19:11 UTC (permalink / raw)
  To: Peter Eisentraut <peter_e@gmx.net>; +Cc: pgsql-admin


On 13-Dec-00 Peter Eisentraut wrote:
> Michael B. Babakov writes:
> 
>>
>> On 12-Dec-00 Ross J. Reedstrom wrote:
>> > It's encoded in the process environment, so the 'ps' command will
>> > give you what you want:
>>
>>  Yes! For version < 7.0.2 it's right. After 7.0.2 postgresql don't write
>>  user
>> in 'ps' command.
>>  I'm use FreeBSD 4.2.
> 
> Doesn't work on FreeBSD 4.* in PostgreSQL 7.0.*.  Sorry.

 Thanks! I have described my solution of this problem. Now I wait for an
release of version 7.1. :)

Good luck,
    Michael

---
e-mail: M.Babakov@sochi.net.ru
http://sochi.net.ru/~mike




^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* users work now with PostgreSQL
@ 2000-12-11 14:38 Michael B. Babakov <M.Babakov@sochi.net.ru>
  0 siblings, 0 replies; 10+ messages in thread

From: Michael B. Babakov @ 2000-12-11 14:38 UTC (permalink / raw)
  To: pgsql-admin

Good day!

How to look what users work now with PostgreSQL?

Good luck,
    Michael

---
e-mail: M.Babakov@sochi.net.ru
http://sochi.net.ru/~mike



^ permalink  raw  reply  [nested|flat] 10+ messages in thread


end of thread, other threads:[~2000-12-13 19:11 UTC | newest]

Thread overview: 10+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2000-12-10 20:35 users work now with PostgreSQL Michael B. Babakov <M.Babakov@sochi.net.ru>
2000-12-11 08:39 users work now with PostgreSQL Michael B. Babakov <M.Babakov@sochi.net.ru>
2000-12-12 16:50 ` Ross J. Reedstrom <reedstrm@rice.edu>
2000-12-12 19:25   ` Michael B. Babakov <M.Babakov@sochi.net.ru>
2000-12-12 19:42     ` Ross J. Reedstrom <reedstrm@rice.edu>
2000-12-12 20:15       ` Bruce Momjian <pgman@candle.pha.pa.us>
2000-12-13 06:15         ` Michael B. Babakov <M.Babakov@sochi.net.ru>
2000-12-13 18:43     ` Peter Eisentraut <peter_e@gmx.net>
2000-12-13 19:11       ` Michael B. Babakov <M.Babakov@sochi.net.ru>
2000-12-11 14:38 users work now with PostgreSQL Michael B. Babakov <M.Babakov@sochi.net.ru>

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