Received: from postgresql.org.org (webmail.postgresql.org [216.126.85.28]) by postgresql.org (8.11.3/8.11.1) with SMTP id f2UEZkK53385 for ; Fri, 30 Mar 2001 09:35:46 -0500 (EST) (envelope-from pgsql-admin-owner@postgresql.org) Received: from serv1.ilse.nl (serv1.ilse.nl [212.189.131.11]) by mail.postgresql.org (8.11.3/8.11.1) with ESMTP id f2SMpTU12979; Wed, 28 Mar 2001 17:51:29 -0500 (EST) (envelope-from mathijs@serv0.ilse.nl) Received: from serv0.ilse.nl (intra.ilse.nl [10.1.8.249]) by serv1.ilse.nl (8.11.0/8.10.2) with ESMTP id f2SMpQ700601; Thu, 29 Mar 2001 00:51:26 +0200 (MEST) Received: (from mathijs@localhost) by serv0.ilse.nl (8.11.1/8.11.1) id f2SMpQK27086; Thu, 29 Mar 2001 00:51:26 +0200 (CEST) (envelope-from mathijs) Date: Thu, 29 Mar 2001 00:51:26 +0200 From: Mathijs Brands To: Bruce Momjian Cc: Larry Rosenman , Peter Eisentraut , PostgreSQL-development , PostgreSQL-ports , PostgreSQL-Admin Subject: Re: [HACKERS] Re: [PORTS] pgmonitor and Solaris Message-ID: <20010329005126.D26435@ilse.nl> References: <20010329003006.A26435@ilse.nl> <200103282233.RAA24095@candle.pha.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200103282233.RAA24095@candle.pha.pa.us>; from pgman@candle.pha.pa.us on Wed, Mar 28, 2001 at 05:33:05PM -0500 X-Unexpected-Header: The Spanish Inquisition X-Archive-Number: 200103/258 X-Sequence-Number: 1120 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 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