Subject: Re: setting proc title on solaris 2.5 [wu 2.4 beta 11]

From: [email-masked] (Neal S. Pressman ex 2317)
Date: Mon, 16 Dec 96 18:04:11 EST

-> From [email-masked] Mon Dec 16 17:37:00 1996
-> Date: Mon, 16 Dec 1996 17:30:56 -0500 (EST)
-> From: [email-masked] (William L. Sebok)
-> To: [email-masked]
-> Subject: Re: setting proc title on solaris 2.5     [wu 2.4 beta 11]
-> X-Listprocessor-Version: 7.1 -- ListProcessor by CREN
-> Status: RO
-> 
-> Neal S. Pressman <[email-masked]>, speaking of some SETPROCTITLE
-> code says:
-> > i found simillar code in ftpd.c 
-> > 
-> > but i cannot get this to work has anyone else done this with solaris 2.5
-> > before??? 
-> 
-> Process info set by SETPROCTITLE code will not be visible in Solaris 2.X with
-> the standard "ps" command /usr/bin/ps.  However, you will be able to see this
-> info if you use /usr/ucb/ps.  Whether this is a bug or a feature is a matter
-> of opinion. It does prevent hackers from hiding what they are up to.
-> 
-> Bill Sebok      Computer Software Manager, Univ. of Maryland, Astronomy
-> 	Internet: [email-masked]	URL: http://www.astro.umd.edu/~wls/
-> 
i have tried /usr/ucb/ps all i get is :
/usr/ucb/ps -auwx | grep ftp
ftp       7347  0.2  2.0 2160 1848 ?        S 18:06:09  0:00 in.ftpd -adolLi
root      7351  0.1  0.6  740  516 pts/7    S 18:06:39  0:00 grep ftp
ftp       7312  0.0  0.9 2160  808 ?        S 17:57:19  0:00 in.ftpd -adolLi

ftpwho gives me:
Service class mel_ftp: 
     ftp  7347   143  0 18:06:09 ?        0:00 in.ftpd -adolLi
     ftp  7312   143  0 17:57:19 ?        0:00 in.ftpd -adolLi
   -   2 users ( 50 maximum)

i'm probaly missing something obvious but i cant figure out what....

---

From: Jim Simmons <[email-masked]>
Date: Tue, 17 Dec 1996 07:37:03 -0500 (EST)

I did this with wu-ftp 2.4 and it seems to work better (it isn't as
nice as you get with Sunos 4.1.x, but it is better):

diff -c ftpcount.c.orig ftpcount.c
*** ftpcount.c.orig     Wed May 22 10:36:01 1996
--- ftpcount.c  Wed May 22 10:38:06 1996
***************
*** 205,211 ****
              stat = kill(buf[which], SIGCONT);
              if (((stat == -1) && (errno == EPERM)) || !stat) {
                  if (strcmp(progname,"ftpcount")) {
! #if defined(SVR4)
                      sprintf(line,"/bin/ps -l -p %d",buf[which]);
  #elif defined(M_UNIX)
                      sprintf(line,"/bin/ps -f -p %d",buf[which]);
--- 205,213 ----
              stat = kill(buf[which], SIGCONT);
              if (((stat == -1) && (errno == EPERM)) || !stat) {
                  if (strcmp(progname,"ftpcount")) {
! #if defined(SOLARIS_21)
!                     sprintf(line,"/usr/ucb/ps -w %d",buf[which]);
! #elif defined(SVR4)
                      sprintf(line,"/bin/ps -l -p %d",buf[which]);
  #elif defined(M_UNIX)
                      sprintf(line,"/bin/ps -f -p %d",buf[which]);

Jim

---

From: Arthur Darren Dunham <[email-masked]>
Date: Tue, 17 Dec 1996 09:40:45 -0600 (CST)

> i'm probaly missing something obvious but i cant figure out what....

I can't find documentation for it, but it seems to be argument
specific....

<pecos>:add % ps -agux | grep sendmail
add       1005  0.4  0.9  756  536 pts/4    S 09:38:15  0:00 grep sendmail
root       220  0.0  1.5 2164  912 ?        S   Oct 22  0:04 /usr/lib/sendmail 
<pecos>:add % ps -aguxww | grep sendmail
add       1007  0.4  0.9  756  536 pts/4    S 09:38:23  0:00 grep sendmail
root       220  0.0  1.5 2164  912 ?        S   Oct 22  0:04 sendmail: accepting connections

aguxww works, I know I've managed it before with a smaller set...  I
don't remember what it was.  I think agxww will also work.

-- 
Darren Dunham                 		           [email-masked]
UNIX Sysadmin					   Rice University
(This line currently in revision)	               Houston, TX
<This space filled intentionally to prevent shock or mail bounces>