Received: from candle.pha.pa.us (candle.navpoint.com [162.33.245.46]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f2TH2pK53470 for ; Thu, 29 Mar 2001 12:02:51 -0500 (EST) (envelope-from pgman@candle.pha.pa.us) Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id MAA13902; Thu, 29 Mar 2001 12:02:32 -0500 (EST) From: Bruce Momjian Message-Id: <200103291702.MAA13902@candle.pha.pa.us> Subject: Re: Re: [PORTS] pgmonitor and Solaris In-Reply-To: "from Peter Eisentraut at Mar 29, 2001 06:49:42 pm" To: Peter Eisentraut Date: Thu, 29 Mar 2001 12:02:32 -0500 (EST) CC: Tom Lane , Mathijs Brands , Larry Rosenman , PostgreSQL-development X-Mailer: ELM [version 2.4ME+ PL77 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Archive-Number: 200103/1489 X-Sequence-Number: 6850 > Tom Lane writes: > > > Mathijs Brands 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. > > I think I broke it. > > The deal on Solaris is this: There's SysV-style ps at /usr/bin/ps, and > there's BSD-style ps at /usr/ucb/ps. The most obvious differences are the > different argument style and the different output format. In true BSD > style, the /usr/ucb/ps display can be changed by assigning argv[x] = > "whatever". In true SysV style, the /usr/bin/ps display can (presumably) > be changed with strcpy(argv[0], "whatever"). > > The old (pre-7.1) code only worked for BSD and had an exception case for > Linux. The new code is mostly adopted from Sendmail. So in pre-7.1 you > could get /usr/ucb/ps to work, while Sendmail apparently tried to get the > SysV-style ps to work -- and failed(?). (This is generally the right > direction, because the /usr/ucb stuff is obsolescent on Solaris, only for > compatibility with SunOS 4.) > > The consequence should be: > > 1. check if sendmail works with /usr/bin/ps > > 2. a) if yes, figure out what got lost in PostgreSQL > > 2. b) if no, make the Solaris case in ps_status.c use the BSD approach [ I had tried to move this discussion to ports, but hackers is OK too.] Well, this is very interesting. I am glad to hear you based the current ps_status code on sendmail, which I think is the perfect way to go. I seem to remember the Solaris manual page stating it doesn't update the ps display, but I may be mixing that up with something else. I agree /usr/bin/ps is the better option, if we can get it working. Most people will not remember to use /usr/ucb/ps. I just uploaded a 0.34 version that allows the 'ps' command to be customized by editing the script. -- 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