Hi, On Tue, Sep 07, 2010 at 10:34:04AM +0200, Samuel Thibault wrote:
> Mmm, portinfo <pid> | wc -l works too, is there really a need for a > new RPC, couldn't libps use the same RPC as portinfo does? No, for several reasons: - portinfo is slow. So slow that it's practically unusable for what I want to do. (Log number of ports every couple of seconds.) It makes no sense to fetch a list of all ports, if all we want to know is the number of ports used. - portinfo is privileged. The information available from proc through libps OTOH can be accessed by every user. Also, as libps can handle all kinds of information provided by proc in a rather generic fashion, the implementation is in fact probably simpler... -antrik-