tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* Following: [Summary]: Some details of startup/stop/restart script for
@ 1998-11-05 11:40 Irene A. Shilikhina
  0 siblings, 0 replies; only message in thread
From: Irene A. Shilikhina @ 1998-11-05 11:40 UTC (permalink / raw)
  To: tru64-unix-managers


Recently I summarized that on my system the ps output (for "ps auxww|grep
sendmail" or "ps -e|grep sendmail") was four characters shorter than that
my four correspondents had (a part of my previous summary is under my=20
signature).

As it occured, no mystery... Having a look to sources, I'm able to tell=20
something about why it takes place. Furthermore, perhaps the most surprisin=
g
is that my correspondents also see in your output *not entire* string liabl=
e
to printing! Here it is:

                /* wait for a connection */
                setproctitle("accepting connections on port %d",
                             ntohs(port));

But IT'S NOT A BUG! The matter is the following. In the sources, there is a=
=20
module called conf.c containing two functions - setproctitle and
initsetproctitle.

From=20the beginning, argv[0] contains, as usually, only the name of the im=
age
file (i.e. "sendmail"). In order to include in it additional information=20
about what part of the sendmail is executed in the process, the function=20
initsetproctitle(argc, argv, envp) in the special buffer makes some cooking
with all args giving more place for "process title" (in argv[0]) which we
see in the "command" field of the ps output.
What size of the buffer remains for such extra information, hardly depends
on many circumstances, in particular, on the size of the environment array
and a certain system as well (a lot of system h-files included). Thus, for
different versions and configurations of DU it's rather possible to have a
different rest of that buffer... It's why we may see the strings of differe=
nt
length.
So, the ps output depends not only on "ps" itself, but also on what the=20
program executed in this process does with its arguments.

Now, I'm rather happy... :-)

Thanks,
Irene
*************************************************************************
*                                                                       *
*   Irene A. Shilikhina                 e-mail: irene@alpha.iae.nsk.su  *
*   System administrator,                                               *
*   Institute of Automation & Electrometry,                             *
*   Siberian Branch of Russian Academy of Sciences,                     *
*   Novosibirsk, Russia                                                 *
*                      http://www.iae.nsk.su/~irene                     *
*************************************************************************
*                                   *                                   *
*   Good intentions pave a path to  *  Every cloud has a silver lining. *
*   the hell.                       *                                   *
*                                   *                                   *
*************************************************************************

On Thu, 5 Nov 1998, Irene A. Shilikhina wrote:

> So, what remains without possible explanation is that IN MY SYSTEM the ps
> command output (both /bin/ps and simply ps, with different flags!) has th=
e=20
> "command" field trancated... :
> >/bin/ps auxww|grep sendmail
> root      8554  0.0  0.4 2.10M 248K ??       S      Oct 29     0:25.00
> sendmail: accepting connectio
> >ps -e|grep sendmail
>  8554 ??       I        0:25.00 sendmail: accepting connectio
>
> The remark by Charles M. Richmond:=20
>
>Of more interest is the shortness of the ps -e output.
>Sendmail 8.9.0 gives:
>
>sendmail: accepting connections o
>
>While your output is:
>
>sendmail: accepting connectio
>
>Presumably this bug can be fixed in the 8.9.1 source if you really do not
>want change the script.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1998-11-05 11:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-11-05 11:40 Following: [Summary]: Some details of startup/stop/restart script for Irene A. Shilikhina

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox