fstat -p thepid_of_my_process

Repeat for the child processes.  It's easier if you start with a child
process though...

pid=5902
while (( $pid != 1 )); do
 pid=$(ps -o ppid -o ppid= -p $pid)
 fstat -p $pid
done

Regards,
Andreas


On 04/08/06, Stephan A. Rickauer <[EMAIL PROTECTED]> wrote:
How can one list the number of file descriptors a shell and any
processes created by that shell are currently opened?

I've learned 'sysctl kern.nfiles' from the archives but believe this is
the overall number of opened file descriptors, isn't it?

Thanks,

--

 Stephan A. Rickauer

 -----------------------------------------------------------
 Institut f|r Neuroinformatik          Tel: +41 44 635 30 50
 Universitdt / ETH Z|rich              Sek: +41 44 635 30 52
 Winterthurerstrasse 190               Fax: +41 44 635 30 53
 CH-8057 Z|rich                        Web:  www.ini.ethz.ch

 RSA public key: https://www.ini.ethz.ch/~stephan/pubkey.asc
 -----------------------------------------------------------

[demime 1.01d removed an attachment of type application/pgp-signature which had 
a name of signature.asc]




--
Andreas Kahari
Somewhere in the general Cambridge area, UK

Reply via email to