Re: Finding connected users - Mailing list pgsql-novice

From Patrick Hatcher
Subject Re: Finding connected users
Date
Msg-id OF5513081F.6656B5A4-ON88256D9F.005572D1-88256D9F.005638F2@fds.com
Whole thread Raw
In response to Finding connected users  ("M. Bastin" <marcbastin@mindspring.com>)
List pgsql-novice
Select * from pg_stat_activity

HTH
Patrick Hatcher



|--------+--------------------------------->
|        |          "M. Bastin"            |
|        |          <marcbastin@mindspring.|
|        |          com>                   |
|        |          Sent by:               |
|        |          pgsql-novice-owner@post|
|        |          gresql.org             |
|        |                                 |
|        |                                 |
|        |          09/12/2003 03:10 AM    |
|--------+--------------------------------->
  >----------------------------------------------------------------------------------------------------------|
  |                                                                                                          |
  |      To:     PgSQL Novice ML <pgsql-novice@postgresql.org>                                               |
  |      cc:                                                                                                 |
  |      Subject:     [NOVICE] Finding connected users                                                       |
  >----------------------------------------------------------------------------------------------------------|




Hi,

I posted this question before on this list but got no replies and
still didn't find the answer myself, so here's another attempt:

How can I find the currently connected users?  I.e. what query must I
use from a TCP/IP client?

Thanks,

Marc

----------------
Original question:

I would like to know what the best queries are to get system status info
like:

Number of connected users
List of connected user names with the database to which they are connected
List of used databases with number of currently connected users
Last startup date and time of PostgreSQL
IP address

etc. (If anybody can think of anything else)
I already know SELECT VERSION()  ;-)

(on version 7.3, on a client over TCP/IP)

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
      subscribe-nomail command to majordomo@postgresql.org so that your
      message can get through to the mailing list cleanly




pgsql-novice by date:

Previous
From: Ron Johnson
Date:
Subject: Re: operation logging
Next
From: "White, Benjamin"
Date:
Subject: Standard in must be a tty