Subject: Re: About ftpwho

From: Carlos Lazcano-Vega <[email-masked]>
Date: Fri, 9 Aug 1996 11:56:49 -0500 ()

> ftpcount.c uses /bin/ps. To get a listing of processes which shows modified
> environments you'll have to use /usr/ucb/ps with Solaris 2.x
>

I modified ftpcount.c to look like this:

  #if defined(SVR4) || defined (M_UNIX)
                    sprintf(line,"/usr/ucb/ps -aux %d",buf[which]);
  #else
                    sprintf(line,"/usr/ucb/ps %d",buf[which]);

but ftpwho still responds like this:

Service class local:
root      6526  0.4  5.4 2084 1624 ?        S 11:22:44  0:00 in.ftpd -la
root      2991  0.0  1.9 2076  576 ?        S 23:46:43  0:00 in.ftpd -la
root      2620  0.0  1.7 2076  496 ?        S 22:36:37  0:00 in.ftpd -la
   -   3 users ( 50 maximum)

Service class remote:
root      2565  0.0  1.9 1396  576 ?        S 22:28:38  0:00 in.ftpd -la
root      1919  0.0  1.4 2076  404 ?        S 20:50:55  0:00 in.ftpd -la
root      1391  0.0  1.3 2076  372 ?        S 19:09:45  0:00 in.ftpd -la
root      1849  0.0  0.4 2076  112 ?        S 20:41:40  0:00 in.ftpd -la
root      3259  0.0  2.0 2076  600 ?        S 02:19:27  0:00 in.ftpd -la
root      1218  0.0  0.4 2076  100 ?        S 18:46:07  0:00 in.ftpd -la
root      3072  0.0  1.9 2076  576 ?        S 00:11:24  0:00 in.ftpd -la
root      1187  0.0  1.0 2076  304 ?        S 18:39:31  0:01 in.ftpd -la
root      3093  0.0  1.9 2076  580 ?        S 00:22:10  0:00 in.ftpd -la

Is this all???

Thanx

---
Carlos Lazcano-Vega                 Voice: (52-8) 358-2000 x4084
Internet Services Manager           Fax: (52-8) 328-4129
ITESM / Technological Computing     Email: [email-masked]
Av. Eugenio Garza Sada 2501 Sur     http://homepages.mty.itesm.mx/~clazcano/
Sucursal de Correos "J"
Monterrey, N.L, Mexico. CP 64849    Heroes get remembered; legends never died

            *** All my opinions are not really opinions ***

---

From: Rainer Schoepf <[email-masked]>
Date: Mon, 12 Aug 1996 09:14:19 +0200 (MET DST)

>                     sprintf(line,"/usr/ucb/ps %d",buf[which]);

Try the following:

#if defined(SVR4)
#ifdef AIX
                    sprintf(line,"/bin/ps %d",buf[which]);
#elif defined(sun)
                    sprintf(line,"/usr/ucb/ps auxww %d",buf[which]);
#else
                    sprintf(line,"/bin/ps -l -p %d",buf[which]);
#endif
#elif defined(M_UNIX)
                    sprintf(line,"/bin/ps -f -p %d",buf[which]);
#else
                    sprintf(line,"/bin/ps %d",buf[which]);
#endif

-- 
   Rainer Schöpf
   Zentrum für Datenverarbeitung           A point of view can be a dangerous
    der Universität Mainz                  luxury when substituted for insight
   Anselm-Franz-von-Bentzel-Weg 12         and understanding.
   D-55099 Mainz
   Germany                                  Herbert Marshall McLuhan:
   <[email-masked]>                          The Gutenberg Galaxy