Skip site navigation (1) Skip section navigation (2)

Re: pgmonitor on solaris

From: Roberto João Lopes Garcia <roberto(at)mha(dot)com(dot)br>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: pgmonitor on solaris
Date: 2001-03-26 19:32:17
Message-ID: 5.0.2.1.0.20010326153208.00a79200@ftp.mha.com.br (view raw or flat)
Thread:
Lists: pgsql-interfaces
Ok +/-
On Solaris 2.5.1 - Pgmonitor 0.28

No message errors, the pgmonitor window comes up but does not show any 
proccess. I started psql and make a query that runs a litle long (select 
nm_arq from cd_arqs order by nm_arq), select refresh on pgmonitor and show 
nothing.

Again, I changed the path to ps from /bin/ps to /usr/ucb/ps and it print 
the following errors:

#   ./pgmonitor
Error in startup script: Can't run 'ps'
Please send in a patch.
     while executing
"error "Can't run 'ps'\nPlease send in a patch.""
     (procedure "widget_init" line 62)
     invoked from within
"widget_init $argc $argv .top"
     (procedure "main" line 2)
     invoked from within
"main $argc $argv"
     (file "./pgmonitor" line 833)
#

 From the man /usr/ucb/ps there is no argument to display proccess for a 
expecific user U or u so I think can't be used.
 From the man /bin/ps: -f long format,
                       -U user name list,
                       -u user ID list,
                       -e all proccess,
                       -p proc list

I changed same pgmonitor ps_???_args but I could not fix it. Still not 
showing proccess.

Please see the atached man pages

Thank You

Roberto

The problem know, I think is the ps command
At 14:09 26/03/01, Bruce Momjian wrote:
>[ Charset ISO-8859-1 unsupported, converting... ]
> > The problem is that Solaris uses the "original" version of Awk by default
> > (apparently nobody knows why).
> > This version lacks many features which have been available in later 
> versions
> > for approximately forever (in computing chronology :-)).
> > Two other versions exist on Solaris:
> > *     "nawk" ("new awk", i.e. the updated "old awk")
> > *     /usr/xpg4/bin/awk (another, posix-compliant awk).
> > Solaris seems to be weird this way.  Other platforms don't seem to have 
> this
> > problem.  Linux and FreeBSD, for example, use GNU awk, which would have all
> > of the required functionality and more.
>
>OK, I have confirmed you are correct.  I find at:
>
>         http://www.oase-shareware.org/shell/articles/awkcompat.html
>
>a chart comparing awk versions on different OS's and it shows gsub() not
>supported on Solaris, Solaris 2.5,2.6,5.7,5.8 (sparc), /usr/5bin/awk.
>nawk does have it.
>
>I have put a 0.28 version of pgmonitor on my web site that tests for
>awk/nawk/gawk and gsub(), and uses the one that works.  Can someone test
>this on Solaris and let me know if it is OK?
>
>pgmonitor README attached:
>
>---------------------------------------------------------------------------
>
>                               P G   M O N I T O R
>
>pgmonitor, version 0.28
>
>The main web site for pgmonitor is:
>         http://greatbridge.org/project/pgmonitor/projdisplay.php
>
>You can download the most recent version from
>         ftp://ftp.greatbridge.org/pub/pgmonitor
>
>This tool allows monitoring of PostgreSQL activity.  It requires Tcl/Tk
>8.0 or later.  It may require modification of the 'ps' flags for certain
>platforms.  It is known to run on *BSD, Linux, and HPUX.
>
>Pgmonitor only works when run on the database server machine.  To use it
>remotely, log into the remote machine, set the DISPLAY variable to point
>to your local X server, and start pgmonitor.  Pgmonitor will then run on
>the remote machine, but will display on your local machine.
>
>Pgmonitor uses 'ps' to display backend process activity.  It uses 'gdb'
>to display running queries, and 'kill' to cancel queries and terminate
>database connections.
>
>Pgmonitor stores your most recent refresh and sort settings in the file
>~/.pgmonitor.  This file is used to reload your defaults every time
>pgmonitor is started.
>
>If you are running PostgreSQL 7.1.0 or earlier, the 'query' button will
>not work unless you compile PostgreSQL with debug symbols (-g), or apply
>the supplied patch 'query_display.diff' and recompile PostgreSQL.  The
>later method is recommended.
>
>Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
>
>--
>   Bruce Momjian                        |  http://candle.pha.pa.us
>   pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 853-3000
>   +  If your life is a hard drive,     |  830 Blythe Avenue
>   +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

In response to

Responses

pgsql-interfaces by date

Next:From: Bruce MomjianDate: 2001-03-26 19:47:27
Subject: Re: pgmonitor on solaris
Previous:From: Bruce MomjianDate: 2001-03-26 19:26:47
Subject: Re: pgmonitor on solaris

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group