bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Obtain number of ports in proc and libps


From: olafBuddenhagen
Subject: Re: [PATCH] Obtain number of ports in proc and libps
Date: Wed, 8 Sep 2010 01:38:25 +0200
User-agent: Mutt/1.5.20 (2009-06-14)

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-



reply via email to

[Prev in Thread] Current Thread [Next in Thread]