From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96078728411706.tru64-unix-managers.marc@archive.invalid> From: "Irene A. Shilikhina" Date: Thu, 05 Nov 1998 11:40:56 +0000 To: tru64-unix-managers Subject: Following: [Summary]: Some details of startup/stop/restart script for X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96078728411706 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.