pgmonitor and Solaris
I believe I have found the cause of the pgmonitor problem on Solaris.
pgmonitor assumes you have a working 'ps' status display, which shows
user/database/connection, and query type. I have learned from a Great
Bridge employee that his Solaris box is not updating the ps display for
7.1beta, and I assume the same trouble exists for 7.0.3.
Can someone confirm that 'ps' status display doesn't work on Solaris,
and if it doesn't, can someone come up with a fix that we can put into
7.1.1? You can look in /pg/backend/utils/misc/ps_status.c for all the
ps status code. It has many options for ps status updating.
Thanks.
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.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 writes:
Can someone confirm that 'ps' status display doesn't work on Solaris,
You may need to use /usr/ucb/ps. Last I checked there was no way to
change the display of /usr/bin/ps.
--
Peter Eisentraut peter_e@gmx.net http://yi.org/peter-e/
Bruce Momjian writes:
Can someone confirm that 'ps' status display doesn't work on Solaris,
You may need to use /usr/ucb/ps. Last I checked there was no way to
change the display of /usr/bin/ps.
I can do that, but I am told that /usr/ucb/ps does not allow me to
restrict the display to a specific user. Without that, ps shows all
processes, which is pretty slow to run regularly, no? Can you check for
a user restriction on /usr/ucb/ps. I can certainly code in a check for
its existance and use that instead.
Does 'ps' status display work with PostgreSQL and /usr/ucb/ps?
Let me know. Thanks.
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
whats wrong with /usr/ucb/ps auxw | grep $PGUSER
to get only the processes for PG?
LER
--
Larry Rosenman http://www.lerctr.org/~ler/
Phone: +1 972 414 9812 E-Mail: ler@lerctr.org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749 US
Original Message <<<<<<<<<<<<<<<<<<
On 3/28/01, 3:31:08 PM, Bruce Momjian <pgman@candle.pha.pa.us> wrote
regarding [HACKERS] Re: [PORTS] pgmonitor and Solaris:
Show quoted text
Bruce Momjian writes:
Can someone confirm that 'ps' status display doesn't work on Solaris,
You may need to use /usr/ucb/ps. Last I checked there was no way to
change the display of /usr/bin/ps.
I can do that, but I am told that /usr/ucb/ps does not allow me to
restrict the display to a specific user. Without that, ps shows all
processes, which is pretty slow to run regularly, no? Can you check for
a user restriction on /usr/ucb/ps. I can certainly code in a check for
its existance and use that instead.
Does 'ps' status display work with PostgreSQL and /usr/ucb/ps?
Let me know. Thanks.
-- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026
---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster
[ Charset ISO-8859-1 unsupported, converting... ]
whats wrong with /usr/ucb/ps auxw | grep $PGUSER
to get only the processes for PG?
I can do that if there is no other option, but on my BSDI machine,
restricting ps to a specific user is much faster than a ps on the whole
system. Seeing that 'ps' is run by default every 5 seconds, this could
be a performance issue.
If I have to use 'grep' I will, but I was hoping for a real user
restriction.
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
On Wed, Mar 28, 2001 at 04:56:15PM -0500, Bruce Momjian allegedly wrote:
[ Charset ISO-8859-1 unsupported, converting... ]
whats wrong with /usr/ucb/ps auxw | grep $PGUSER
to get only the processes for PG?
I can do that if there is no other option, but on my BSDI machine,
restricting ps to a specific user is much faster than a ps on the whole
system. Seeing that 'ps' is run by default every 5 seconds, this could
be a performance issue.If I have to use 'grep' I will, but I was hoping for a real user
restriction.
How about the following:
ilsefe2:~$ /usr/ucb/ps -aux|head -1
USER PID %CPU %MEM SZ RSS TT S START TIME COMMAND
Broken Pipe
ilsefe2:~$ /usr/ucb/ps -aux|grep mathijs
mathijs 7255 0.1 0.2 2432 1816 pts/0 S 00:12:41 0:00 -bash
mathijs 7775 0.1 0.1 960 728 pts/0 S 00:24:29 0:00 grep mathijs
mathijs 7344 0.0 0.1 1064 912 pts/0 T 00:14:56 0:00 man ps
mathijs 7359 0.0 0.1 1040 808 pts/0 T 00:14:57 0:00 sh -c more -s /tmp
mathijs 7360 0.0 0.1 1184 968 pts/0 T 00:14:57 0:00 more -s /tmp/mp3Ha
ilsefe2:~$ ps -U mathijs -o user,pid,pcpu,pmem,vsz,rss,tty,s,stime=START -o time,comm
USER PID %CPU %MEM VSZ RSS TT S START TIME COMMAND
mathijs 7359 0.0 0.1 1040 808 pts/0 T 00:14:57 0:00 sh
mathijs 7255 0.1 0.2 2432 1816 pts/0 S 00:12:41 0:00 -bash
root 7816 0.1 0.1 1080 840 pts/0 O 00:28:13 0:00 ps
mathijs 7344 0.0 0.1 1064 912 pts/0 T 00:14:56 0:00 man
mathijs 7360 0.0 0.1 1184 968 pts/0 T 00:14:57 0:00 more
It doesn't use any extra extra programs, nor the somewhat deprecated /usr/ucb/ps
command. The only problem I see may be the alignment of some fields. The ps
command itself is listed because the user mathijs was running it...
Regards,
Mathijs
--
It's not that perl programmers are idiots, it's that the language
rewards idiotic behavior in a way that no other language or tool has
ever done.
Erik Naggum
How about the following:
ilsefe2:~$ /usr/ucb/ps -aux|head -1
USER PID %CPU %MEM SZ RSS TT S START TIME COMMAND
Broken Pipe
ilsefe2:~$ /usr/ucb/ps -aux|grep mathijs
mathijs 7255 0.1 0.2 2432 1816 pts/0 S 00:12:41 0:00 -bash
mathijs 7775 0.1 0.1 960 728 pts/0 S 00:24:29 0:00 grep mathijs
mathijs 7344 0.0 0.1 1064 912 pts/0 T 00:14:56 0:00 man ps
mathijs 7359 0.0 0.1 1040 808 pts/0 T 00:14:57 0:00 sh -c more -s /tmp
mathijs 7360 0.0 0.1 1184 968 pts/0 T 00:14:57 0:00 more -s /tmp/mp3Ha
ilsefe2:~$ ps -U mathijs -o user,pid,pcpu,pmem,vsz,rss,tty,s,stime=START -o time,comm
USER PID %CPU %MEM VSZ RSS TT S START TIME COMMAND
mathijs 7359 0.0 0.1 1040 808 pts/0 T 00:14:57 0:00 sh
mathijs 7255 0.1 0.2 2432 1816 pts/0 S 00:12:41 0:00 -bash
root 7816 0.1 0.1 1080 840 pts/0 O 00:28:13 0:00 ps
mathijs 7344 0.0 0.1 1064 912 pts/0 T 00:14:56 0:00 man
mathijs 7360 0.0 0.1 1184 968 pts/0 T 00:14:57 0:00 moreIt doesn't use any extra extra programs, nor the somewhat deprecated /usr/ucb/ps
command. The only problem I see may be the alignment of some fields. The ps
command itself is listed because the user mathijs was running it...
Sure 'ps -U' will work, but it was reported that on Solaris, plain ps
can't show the postgres status display, while ucb/ps can. I don't need
specific columns. What I need is the postgres status parameters, and if
possible, a user restriction to ps for performance reasons.
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
On Thu, Mar 29, 2001 at 12:30:06AM +0200, Mathijs Brands allegedly wrote:
On Wed, Mar 28, 2001 at 04:56:15PM -0500, Bruce Momjian allegedly wrote:
[ Charset ISO-8859-1 unsupported, converting... ]
whats wrong with /usr/ucb/ps auxw | grep $PGUSER
to get only the processes for PG?
I can do that if there is no other option, but on my BSDI machine,
restricting ps to a specific user is much faster than a ps on the whole
system. Seeing that 'ps' is run by default every 5 seconds, this could
be a performance issue.If I have to use 'grep' I will, but I was hoping for a real user
restriction.How about the following:
ilsefe2:~$ /usr/ucb/ps -aux|head -1
USER PID %CPU %MEM SZ RSS TT S START TIME COMMAND
Broken Pipe
ilsefe2:~$ /usr/ucb/ps -aux|grep mathijs
mathijs 7255 0.1 0.2 2432 1816 pts/0 S 00:12:41 0:00 -bash
mathijs 7775 0.1 0.1 960 728 pts/0 S 00:24:29 0:00 grep mathijs
mathijs 7344 0.0 0.1 1064 912 pts/0 T 00:14:56 0:00 man ps
mathijs 7359 0.0 0.1 1040 808 pts/0 T 00:14:57 0:00 sh -c more -s /tmp
mathijs 7360 0.0 0.1 1184 968 pts/0 T 00:14:57 0:00 more -s /tmp/mp3Ha
ilsefe2:~$ ps -U mathijs -o user,pid,pcpu,pmem,vsz,rss,tty,s,stime=START -o time,comm
USER PID %CPU %MEM VSZ RSS TT S START TIME COMMAND
mathijs 7359 0.0 0.1 1040 808 pts/0 T 00:14:57 0:00 sh
mathijs 7255 0.1 0.2 2432 1816 pts/0 S 00:12:41 0:00 -bash
root 7816 0.1 0.1 1080 840 pts/0 O 00:28:13 0:00 ps
mathijs 7344 0.0 0.1 1064 912 pts/0 T 00:14:56 0:00 man
mathijs 7360 0.0 0.1 1184 968 pts/0 T 00:14:57 0:00 more
Damn! Small correction:
ps -U mathijs -o user,pid,pcpu,pmem,vsz=SZ -o rss,tty,s,stime=START -o time,comm
Mathijs
--
It's not that perl programmers are idiots, it's that the language
rewards idiotic behavior in a way that no other language or tool has
ever done.
Erik Naggum
On Wed, Mar 28, 2001 at 05:33:05PM -0500, Bruce Momjian allegedly wrote:
Sure 'ps -U' will work, but it was reported that on Solaris, plain ps
can't show the postgres status display, while ucb/ps can. I don't need
specific columns. What I need is the postgres status parameters, and if
possible, a user restriction to ps for performance reasons.
My mistake. Have a look at this snippet from the ps manpage:
| args The command with all its arguments as a string. The
| implementation may truncate this value to the field
| width; it is implementation-dependent whether any
| further truncation occurs. It is unspecified whether
| the string represented is a version of the argument
| list as it was passed to the command when it started,
| or is a version of the arguments as they may have been
| modified by the application. Applications cannot
| depend on being able to modify their argument list and
| having that modification be reflected in the output of
| ps. The Solaris implementation limits the string to
| 80 bytes; the string is the version of the argument
| list as it was passed to the command when it started.
Note the last line...
The following must also seem familiar ;)
| The Hermit Hacker <scrappy@hub.org> writes:
| > On Wed, 29 Apr 1998, Bruce Momjian wrote:
| >> No reason for the exec(). I believe the only advantage is that it gives
| >> us a separate process name in the 'ps' listing. I have looked into
| >> simulating this.
| > Under FreeBSD, there is:
| > setproctitle(3) - set the process title for ps 1
| > This isn't available under Solaris though, last I checked...
|
| Setting the process title from C is messy, but there is a readily
| available reference. The Berkeley sendmail distribution includes code
| to emulate setproctitle on practically every platform. See conf.h and
| conf.c in any recent sendmail release. Warning: it's grotty enough to
| make a strong man weep. Don't read near mealtime ;-)
|
| regards, tom lane
Regards,
Mathijs
--
It's not that perl programmers are idiots, it's that the language
rewards idiotic behavior in a way that no other language or tool has
ever done.
Erik Naggum
On Wed, Mar 28, 2001 at 05:33:05PM -0500, Bruce Momjian allegedly wrote:
Sure 'ps -U' will work, but it was reported that on Solaris, plain ps
can't show the postgres status display, while ucb/ps can. I don't need
specific columns. What I need is the postgres status parameters, and if
possible, a user restriction to ps for performance reasons.My mistake. Have a look at this snippet from the ps manpage:
| args The command with all its arguments as a string. The
| implementation may truncate this value to the field
| width; it is implementation-dependent whether any
| further truncation occurs. It is unspecified whether
| the string represented is a version of the argument
| list as it was passed to the command when it started,
| or is a version of the arguments as they may have been
| modified by the application. Applications cannot
| depend on being able to modify their argument list and
| having that modification be reflected in the output of
| ps. The Solaris implementation limits the string to
| 80 bytes; the string is the version of the argument
| list as it was passed to the command when it started.Note the last line...
OK, I need someone on Solaris to test ps and /ucb/ps with regard to user
restriction inside ps, and display of PostgreSQL status display.
I have uploaded a new pgmonitor 0.33 version that has a show_all
configuration parameter. This will show all PostgreSQL-owned processes
for use on operating systems that don't have PostgreSQL status display.
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
On Wed, Mar 28, 2001 at 05:33:05PM -0500, Bruce Momjian allegedly wrote:
Sure 'ps -U' will work, but it was reported that on Solaris, plain ps
can't show the postgres status display, while ucb/ps can. I don't need
specific columns. What I need is the postgres status parameters, and if
possible, a user restriction to ps for performance reasons.
Looking at the sendmail code, it seems they use SPT_REUSEARGV (what we
call PS_USE_CLOBBER_ARGV) technique on Solaris. Possibly the problem is
simply that line 65 in src/backend/utils/misc/ps_status.c fails to
cover Solaris as one of the possible options:
#elif defined(__linux__) || defined(_AIX4) || defined(_AIX3) || defined(__sgi) || (defined(sun) && !defined(BSD)) || defined(ultrix) || defined(__ksr__) || defined(__osf__) || defined(__QNX__) || defined(__svr4__) || defined(__svr5__)
#define PS_USE_CLOBBER_ARGV
Can someone check whether adding an appropriate Solaris symbol (which
one?) fixes the problem?
The coding technique embodied in lines 63-67 pretty much sucks anyway,
since this platform-specific knowledge ought to be out in the port.h
files rather than hidden in the guts of the system. I don't want to
touch it right now, but I think we ought to have things like
#define PS_STATUS_TECHNIQUE PS_USE_CLOBBER_ARGV
in the port.h files, rather than these massive #ifdefs.
regards, tom lane
FYI, the WU-FTPD code (2.6.0 or better) has a couple of more platforms
including UnixWare. The UnixWare code will need /dev/kmem permission to
change it's stuff, so I don't know whether we want to do this or not, but
if people are looking at the ps stuff, please look at this as well.
Larry Rosenman
--
Larry Rosenman http://www.lerctr.org/~ler/
Phone: +1 972 414 9812 E-Mail: ler@lerctr.org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749 US
Original Message <<<<<<<<<<<<<<<<<<
On 3/28/01, 5:23:16 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote regarding Re:
[HACKERS] Re: [PORTS] pgmonitor and Solaris :
On Wed, Mar 28, 2001 at 05:33:05PM -0500, Bruce Momjian allegedly wrote:
Sure 'ps -U' will work, but it was reported that on Solaris, plain ps
can't show the postgres status display, while ucb/ps can. I don't need
specific columns. What I need is the postgres status parameters, and if
possible, a user restriction to ps for performance reasons.
Looking at the sendmail code, it seems they use SPT_REUSEARGV (what we
call PS_USE_CLOBBER_ARGV) technique on Solaris. Possibly the problem is
simply that line 65 in src/backend/utils/misc/ps_status.c fails to
cover Solaris as one of the possible options:
#elif defined(__linux__) || defined(_AIX4) || defined(_AIX3) ||
defined(__sgi) || (defined(sun) && !defined(BSD)) || defined(ultrix) ||
defined(__ksr__) || defined(__osf__) || defined(__QNX__) ||
defined(__svr4__) || defined(__svr5__)
Show quoted text
#define PS_USE_CLOBBER_ARGV
Can someone check whether adding an appropriate Solaris symbol (which
one?) fixes the problem?
The coding technique embodied in lines 63-67 pretty much sucks anyway,
since this platform-specific knowledge ought to be out in the port.h
files rather than hidden in the guts of the system. I don't want to
touch it right now, but I think we ought to have things like
#define PS_STATUS_TECHNIQUE PS_USE_CLOBBER_ARGV
in the port.h files, rather than these massive #ifdefs.
regards, tom lane
On Wed, Mar 28, 2001 at 06:23:16PM -0500, Tom Lane allegedly wrote:
On Wed, Mar 28, 2001 at 05:33:05PM -0500, Bruce Momjian allegedly wrote:
Sure 'ps -U' will work, but it was reported that on Solaris, plain ps
can't show the postgres status display, while ucb/ps can. I don't need
specific columns. What I need is the postgres status parameters, and if
possible, a user restriction to ps for performance reasons.Looking at the sendmail code, it seems they use SPT_REUSEARGV (what we
call PS_USE_CLOBBER_ARGV) technique on Solaris. Possibly the problem is
simply that line 65 in src/backend/utils/misc/ps_status.c fails to
cover Solaris as one of the possible options:#elif defined(__linux__) || defined(_AIX4) || defined(_AIX3) || defined(__sgi) || (defined(sun) && !defined(BSD)) || defined(ultrix) || defined(__ksr__) || defined(__osf__) || defined(__QNX__) || defined(__svr4__) || defined(__svr5__)
#define PS_USE_CLOBBER_ARGVCan someone check whether adding an appropriate Solaris symbol (which
one?) fixes the problem?
PS_USE_CLOBBER_ARGV -is- used on Solaris. I just checked.
ilsedb:~$ uname -a
SunOS ilsedb 5.7 Generic_106541-11 sun4u sparc SUNW,Ultra-80
ilsedb:~$ cat test.c
#include <stdio.h>
main()
{
printf("%d\n", __svr4__);
}
ilsedb:~$ gcc -o test test.c
ilsedb:~$ ./test
1
Regards,
Mathijs
--
It's not that perl programmers are idiots, it's that the language
rewards idiotic behavior in a way that no other language or tool has
ever done.
Erik Naggum
Mathijs Brands <mathijs@ilse.nl> writes:
PS_USE_CLOBBER_ARGV -is- used on Solaris. I just checked.
Hm. But 7.1 postgres backends fail to change their ps display?
Does sendmail change its ps display on your machine?
regards, tom lane
Larry Rosenman <ler@lerctr.org> writes:
FYI, the WU-FTPD code (2.6.0 or better) has a couple of more platforms
including UnixWare. The UnixWare code will need /dev/kmem permission to
change it's stuff, so I don't know whether we want to do this or not, but
if people are looking at the ps stuff, please look at this as well.
Well, *I* sure wouldn't run Postgres with write permission on /dev/kmem.
Especially not just to make ps_status work...
regards, tom lane
I tend to agree, but wanted someone else's opinion.
LER
Original Message <<<<<<<<<<<<<<<<<<
On 3/28/01, 5:51:13 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote regarding Re:
[ADMIN] Re: [HACKERS] Re: [PORTS] pgmonitor and Solaris :
Show quoted text
Larry Rosenman <ler@lerctr.org> writes:
FYI, the WU-FTPD code (2.6.0 or better) has a couple of more platforms
including UnixWare. The UnixWare code will need /dev/kmem permission to
change it's stuff, so I don't know whether we want to do this or not, but
if people are looking at the ps stuff, please look at this as well.
Well, *I* sure wouldn't run Postgres with write permission on /dev/kmem.
Especially not just to make ps_status work...
regards, tom lane
On Wed, Mar 28, 2001 at 06:48:27PM -0500, Tom Lane allegedly wrote:
Mathijs Brands <mathijs@ilse.nl> writes:
PS_USE_CLOBBER_ARGV -is- used on Solaris. I just checked.
Hm. But 7.1 postgres backends fail to change their ps display?
Does sendmail change its ps display on your machine?
template1=# \set
VERSION = 'PostgreSQL 7.0.3 on sparc-sun-solaris2.7, compiled by gcc 2.95.2'
DBNAME = 'template1'
USER = 'mathijs'
PORT = '5432'
ENCODING = 'SQL_ASCII'
PROMPT1 = '%/%R%# '
PROMPT2 = '%/%R%# '
PROMPT3 = '>> '
HISTSIZE = '500'
template1=#
[1]: + Stopped psql template1 jumpstart.l3.ilse.nl:/export/home/mathijs >/usr/ucb/ps auxww|grep post mathijs 297 0.1 0.2 6120 3352 pts/1 S 01:59:18 0:00 /opt/pgsql/bin/./postgres mathijs localhost template1 idle mathijs 319 0.1 0.1 944 696 pts/3 S 01:59:45 0:00 grep post mathijs 25810 0.0 0.1 5736 2160 pts/1 S 20:44:34 0:00 /opt/pgsql/bin/./postmaster
jumpstart.l3.ilse.nl:/export/home/mathijs >/usr/ucb/ps auxww|grep post
mathijs 297 0.1 0.2 6120 3352 pts/1 S 01:59:18 0:00 /opt/pgsql/bin/./postgres mathijs localhost template1 idle
mathijs 319 0.1 0.1 944 696 pts/3 S 01:59:45 0:00 grep post
mathijs 25810 0.0 0.1 5736 2160 pts/1 S 20:44:34 0:00 /opt/pgsql/bin/./postmaster
template1=# \set
VERSION = 'PostgreSQL 7.1RC1 on sparc-sun-solaris2.8, compiled by GCC 2.95.3'
DBNAME = 'template1'
USER = 'mathijs'
PORT = '5432'
ENCODING = 'SQL_ASCII'
PROMPT1 = '%/%R%# '
PROMPT2 = '%/%R%# '
PROMPT3 = '>> '
template1=# ^Z[1]+ Stopped psql template1 jumpstart.l3.ilse.nl:/export/home/mathijs >/usr/ucb/ps auxww|grep post mathijs 297 0.1 0.2 6120 3352 pts/1 S 01:59:18 0:00 /opt/pgsql/bin/./postgres mathijs localhost template1 idle mathijs 319 0.1 0.1 944 696 pts/3 S 01:59:45 0:00 grep post mathijs 25810 0.0 0.1 5736 2160 pts/1 S 20:44:34 0:00 /opt/pgsql/bin/./postmaster + Stopped (SIGTSTP) psql template1
$ /usr/ucb/ps auxww|grep post
mathijs 8072 0.1 1.4 5552 3352 pts/2 S 01:01:43 0:00 ./postmaster -D /export/home/mathijs/pgtest/data
mathijs 8074 0.1 0.3 976 672 pts/2 S 01:01:55 0:00 grep post
mathijs 8067 0.1 0.8 4912 1984 pts/2 S 01:01:37 0:00 ./postmaster -D /export/home/mathijs/pgtest/data
I guess it doesn't work :( Of course, it's also possible it doesn't
work on Solaris 8, but does on 7. I'll check this and if this is the
case, I'll post it.
Regards,
Mathijs
--
It's not that perl programmers are idiots, it's that the language
rewards idiotic behavior in a way that no other language or tool has
ever done.
Erik Naggum
* Tom Lane <tgl@sss.pgh.pa.us> [010328 16:07] wrote:
Larry Rosenman <ler@lerctr.org> writes:
FYI, the WU-FTPD code (2.6.0 or better) has a couple of more platforms
including UnixWare. The UnixWare code will need /dev/kmem permission to
change it's stuff, so I don't know whether we want to do this or not, but
if people are looking at the ps stuff, please look at this as well.Well, *I* sure wouldn't run Postgres with write permission on /dev/kmem.
Especially not just to make ps_status work...
Wow... is this all for "pgmonitor"?
sorry, just my opinion...
If it for pgmonitor then you guys ought to just mark it broken on
these platforms, the non-"ps based" solution could have been
implemented with all the time wasted trying to get the "ps based"
hack working. :(
--
-Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org]
Daemon News Magazine in your snail-mail! http://magazine.daemonnews.org/
Mathijs Brands <mathijs@ilse.nl> writes:
mathijs 297 0.1 0.2 6120 3352 pts/1 S 01:59:18 0:00 /opt/pgsql/bin/./postgres mathijs localhost template1 idle
The interesting point about this is that the 7.0.3-on-2.7 installation
*is* managing to change its PS display. So either Solaris 2.8
retrogressed (different predefined symbols maybe?), or we broke the code
since 7.0.3.
Anyway I think the right thing to look at is why the 7.1 install is not
managing to update the display.
regards, tom lane
On Wed, Mar 28, 2001 at 05:33:05PM -0500, Bruce Momjian allegedly wrote:
Sure 'ps -U' will work, but it was reported that on Solaris, plain ps
can't show the postgres status display, while ucb/ps can. I don't need
specific columns. What I need is the postgres status parameters, and if
possible, a user restriction to ps for performance reasons.Looking at the sendmail code, it seems they use SPT_REUSEARGV (what we
call PS_USE_CLOBBER_ARGV) technique on Solaris. Possibly the problem is
simply that line 65 in src/backend/utils/misc/ps_status.c fails to
cover Solaris as one of the possible options:#elif defined(__linux__) || defined(_AIX4) || defined(_AIX3) || defined(__sgi) || (defined(sun) && !defined(BSD)) || defined(ultrix) || defined(__ksr__) || defined(__osf__) || defined(__QNX__) || defined(__svr4__) || defined(__svr5__)
#define PS_USE_CLOBBER_ARGVCan someone check whether adding an appropriate Solaris symbol (which
one?) fixes the problem?The coding technique embodied in lines 63-67 pretty much sucks anyway,
since this platform-specific knowledge ought to be out in the port.h
files rather than hidden in the guts of the system. I don't want to
touch it right now, but I think we ought to have things like#define PS_STATUS_TECHNIQUE PS_USE_CLOBBER_ARGV
in the port.h files, rather than these massive #ifdefs.
Added to TODO:
* Move platform-specific ps status display info from ps_status.c to ports
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026