Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 1860F476F97 for ; Fri, 6 Sep 2002 10:38:41 -0400 (EDT) Received: from candle.pha.pa.us (momjian.navpoint.com [207.106.42.251]) by postgresql.org (Postfix) with ESMTP id B978647686F for ; Fri, 6 Sep 2002 10:38:31 -0400 (EDT) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.10.1) id g86EcUD18853; Fri, 6 Sep 2002 10:38:30 -0400 (EDT) From: Bruce Momjian Message-Id: <200209061438.g86EcUD18853@candle.pha.pa.us> Subject: Re: Remote monitoring In-Reply-To: <003601c255ab$3688d1a0$7501050a@eisolution.com> To: Marc Mitchell Date: Fri, 6 Sep 2002 10:38:30 -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/67 X-Sequence-Number: 5606 Marc Mitchell wrote: > > Well, if you enable stats_command_string in postgresql.conf you will > > see the queries being run in pg_stat_activity. > > Would this have a performance cost? Where does the X-based pgmonitor get Less that 1% performance load. > its query string data? The X-based solution gets its query string from the local machine, it just pipes the X display back to your local machine. > > 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. > > When remote, the link between my workstation to the box being monitored is > via the net where my machine gains access via a NAT router and does not > have its own publicly routable IP. So making the connection back from > server to workstation is problematic at best. > > Would it be possible to get the code for the current X-based stuff in order > to convert it to a straight text based display in either ksh script or > perhaps C? I wouldn't try to implement some of the more UI related stuff > like the ability to specify sort order or shutdown the server. But having > a basic refreshing display of active sessions and the ability to get query > details on an one would same a do-able thing in C. Actually, there is a text-based TCL/Tk library. I think it was done by SCO initially for their install stuff. Anyway, I am sure it exists somewhere, and if you can get it, the script should just run with no changes to pgaccess. -- 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