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

Re: pgmonitor on solaris

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Roberto João Lopes Garcia <roberto(at)mha(dot)com(dot)br>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: pgmonitor on solaris
Date: 2001-03-26 16:21:42
Message-ID: 200103261621.LAA13484@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-interfaces
OK, my guess is that it is failing on these two lines:

		gsub(\"\\\\(\[\^\\\\)\]*\\\\)\",\"\",cmd); # remove entries around parens, (), *BSD
		gsub(\"\^\[\^:\]*:\",\"\",cmd);		# remove command with colon, cmd:, Linux

Can you confirm that adding a # to the front of each lines prevents the
error.  If so, can you find out from the manual pages if your awk
version supports gsub, and if it doesn't, can you send me a copy of the
manual page so I can find a work around.  gsub in gawk says:

       gsub(r, s [, t])        for  each  substring  matching the
                               regular expression r in the string
                               t,  substitute  the  string s, and
                               return  the  number  of  substitu-
                               tions.   If t is not supplied, use
                               $0.  An & in the replacement  text
                               is replaced with the text that was
                               actually matched.  Use \& to get a
                               literal  &.  See AWK Language Pro-
                               gramming for a  fuller  discussion
                               of  the  rules  for  &'s and back-
                               slashes in the replacement text of
                               sub(), gsub(), and gensub().


[ Charset ISO-8859-1 unsupported, converting... ]
> Thank You
> I?m using old solaris 2.5.1
> I download pgmonitor 0.27 tryed again, and:
> 
> $ ./pgmonitor
> Can't run 'ps': awk: syntax error near line 3
> awk: illegal statement near line 3
> awk: illegal statement near line 4
> Please send in a patch.
> $
> 
> As sugested by Peter Eisentraut I changed all /bin/ps to /usr/ucb/ps and 
> the error is now:
> 
> $ ./pgm-ucb
> Can't run 'ps': child process exited abnormally
> Please send in a patch.
> $
> 
> I tryed /usr/ucb/ps with the following args:
> 
> /usr/ucb/ps auww - OK -also show PID?s
> /usr/ucb/ps p - There is no p args
> /usr/ucb/ps U postgres- The U arg does not accept the name of user, looks 
> like it is not for display postgres (user) process.
> 
> Synce I will move the PostgreSQL to a dual PIII linux server and, I think, 
> pgmonitor will work OK on linux, it is not an emergency, but I would like 
> to see pgmonitor working in my old Solaris.
> 
> Do you think it will work in newer Solaris versions?
> 
> Thank you
> 
> ROberto
> 
> 
> At 18:36 25/03/01, you wrote:
> >You don't mention the version of pgmonitor, but 0.27 is the most recent.
> >I just made a few awk fixes.  Maybe that will fix it.
> >
> >Strange it is mentining an 'awk' error here.  My guess is that it
> >doesn't like some of the 'awk' commands I have used.  Does anyone see
> >some non-portable awk stuff in there?  Can you run the command manually
> >to find the part of the awk it is failing with?
> >
> >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
> >
> >Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
> >[ Charset ISO-8859-1 unsupported, converting... ]
> > > Roberto Jo?o Lopes Garcia writes:
> > >
> > > > Is there a pgmonitor version for Solaris?? It dies with:
> > > >
> > > > Can't run 'ps': awk: syntax error near line 3
> > > > awk: illegal statement near line 3
> > > > awk: illegal statement near line 4
> > > > Please send in a patch.
> > > >
> > > > I tried to fix it whith:
> > > >
> > > > 1 - correct the path to ps.
> > > > 2 - convert Linux ps args to Solaris 2.5.1 ps args.
> > > >
> > > > Step 2 did not work, I could not find equivalents to x,w args and I 
> > do not
> > > > know if it is the only think that must be fixed.
> > >
> > > The x and w options for ps are BSD-style (not Linux).  On Solaris you'll
> > > find a BSD-style ps under /usr/ucb/.  With the SysV-style ps at
> > > /usr/bin/ps the -e option is the closest thing to it, but it probably
> > > won't work with pgmonitor.
> > >
> > > --
> > > Peter Eisentraut      peter_e(at)gmx(dot)net       http://yi.org/peter-e/
> > >
> > >
> > > ---------------------------(end of broadcast)---------------------------
> > > TIP 2: you can get off all lists at once with the unregister command
> > >     (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)
> > >
> >
> >
> >--
> >   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
> 
> 


-- 
  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

pgsql-interfaces by date

Next:From: Bruce MomjianDate: 2001-03-26 17:09:23
Subject: Re: pgmonitor on solaris
Previous:From: Bruce MomjianDate: 2001-03-26 16:15:26
Subject: Re: pgmonitor on solaris

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