[osol-discuss] Re: Re: getting current open FDs

2006-04-15 Thread alessioc
 There's no such limit in Solaris so there's no reason
 to make the
 number of file*s in use easily observable.

not easily observable means that i can only do something like this?

n=0; for i in $(find /proc -name fd -type d); do n=$[$(ls -l $i | wc -l) + 
$n]; done; echo $n


if you wonder why i should care about the amount of open FDs since there's no 
upper limit... well, i'm just curious to collect some statistics (without using 
dtrace :)
 
 
This message posted from opensolaris.org
___
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org


Re: [osol-discuss] Re: Re: getting current open FDs

2006-04-15 Thread Daniel Rock

alessioc schrieb:

There's no such limit in Solaris so there's no reason
to make the
number of file*s in use easily observable.


not easily observable means that i can only do something like this?

n=0; for i in $(find /proc -name fd -type d); do n=$[$(ls -l $i | wc -l) + 
$n]; done; echo $n


This will get you wrong results: Inherited file descriptors will be counted 
multiple times.




if you wonder why i should care about the amount of open FDs since there's no 
upper limit... well, i'm just curious to collect some statistics (without using 
dtrace :)


My proposed kstat values should be the right ones.


--
Daniel

___
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org