Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 9EE8C475F3D for ; Fri, 6 Sep 2002 00:25:35 -0400 (EDT) Received: from candle.pha.pa.us (momjian.navpoint.com [207.106.42.251]) by postgresql.org (Postfix) with ESMTP id 6B4FA475EFB for ; Fri, 6 Sep 2002 00:25:33 -0400 (EDT) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.10.1) id g864PHn20477; Fri, 6 Sep 2002 00:25:17 -0400 (EDT) From: Bruce Momjian Message-Id: <200209060425.g864PHn20477@candle.pha.pa.us> Subject: Re: Remote monitoring In-Reply-To: <016801c25534$423316e0$7501050a@eisolution.com> To: Marc Mitchell Date: Fri, 6 Sep 2002 00:25:17 -0400 (EDT) Cc: pgsql-admin@postgresql.org X-Mailer: ELM [version 2.4ME+ PL99 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200209/63 X-Sequence-Number: 5602 Marc Mitchell wrote: > I have a requirement to be able to remotely monitor and diagnose a > production Postgres installation running on a machine with limited firewall > access. When local to the box, I use pgmonitor and find it completely > indispensable. But, from my remote location, I can only slogin to the box > and get terminal access and thus have a problem with the Xwindows display. > Admittedly, I'm not very well versed in Xwindows. Is there any way to > achieve similar functionality but in a completely server based way? I know > pgmonitor is basically based on a series of ps and awk commands. Is there > a way this could be wrapped in a script to provide straight text based > information along the same lines as "top" or "sar"? Well, if you enable stats_command_string in postgresql.conf you will see the queries being run in pg_stat_activity. Another option is to ssh into the machine, set your $DISPLAY back to your local machine, and then run pgmonitor. ssh does secure remote X display. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073