active connections

Started by João Paulo Zavanelaover 18 years ago4 messagesgeneral
Jump to latest
#1João Paulo Zavanela
joao_zava@globo.com

Hi,

I would like to know how many active connections exist.
Is necessary show the number ip of client.

Please, somebody knows?

Thanks!

#2A. Kretschmer
andreas.kretschmer@schollglas.com
In reply to: João Paulo Zavanela (#1)
Re: active connections

am Tue, dem 30.10.2007, um 14:51:33 -0300 mailte Jo�o Paulo Zavanela folgendes:

Hi,

I would like to know how many active connections exist.
Is necessary show the number ip of client.

ask pg_stat_activity

(select * from pg_stat_activity;)

Andreas
--
Andreas Kretschmer
Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID: 0x3FFF606C, privat 0x7F4584DA http://wwwkeys.de.pgp.net

#3João Paulo Zavanela
joao_zava@globo.com
In reply to: A. Kretschmer (#2)
Re: active connections

I don't understand, where I do it?

Show quoted text

-- Mensagem Original --
From: "Martin Gainty" <mgainty@hotmail.com>
To: João Paulo Zavanela <joao_zava@globo.com>
Subject: Re: [GENERAL] active connections
Date: Mon, 30 Oct 2000 16:51:30 -0500

ps aux | grep postgres

M--
----- Original Message -----
From: "João Paulo Zavanela" <joao_zava@globo.com>
To: <pgsql-general@postgresql.org>
Sent: Tuesday, October 30, 2007 12:51 PM
Subject: [GENERAL] active connections

Hi,

I would like to know how many active connections exist.
Is necessary show the number ip of client.

Please, somebody knows?

Thanks!

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

#4Andreas Kretschmer
akretschmer@spamfence.net
In reply to: João Paulo Zavanela (#3)
Re: active connections

Jo�o Paulo Zavanela <joao_zava@globo.com> schrieb:

I don't understand, where I do it?

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

Please no top-posting, it's hard to read.

ps aux | grep postgres

You mean this? Okay, type it on the command-line on the db-server.
I assume it's a *NIX-like machine, no Windoze.

I would like to know how many active connections exist.
Is necessary show the number ip of client.

the more db-like solution, as i said, ask the system-view
pg_stat_activity

Andreas
--
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect. (Linus Torvalds)
"If I was god, I would recompile penguin with --enable-fly." (unknow)
Kaufbach, Saxony, Germany, Europe. N 51.05082�, E 13.56889�