Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 04 Nov 1999 18:20:48 -0800
From:      Mike Smith <mike@smith.net.au>
To:        "Ricardo Bernardini" <rbernardini@hotmail.com>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: kstat - an API for gathering kernel stats 
Message-ID:  <199911050220.SAA00592@dingo.cdrom.com>
In-Reply-To: Your message of "Thu, 04 Nov 1999 15:46:54 %2B0700." <19991104184654.89040.qmail@hotmail.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
> ----Original Message Follows----
> From: Mike Smith <mike@smith.net.au>
> 
> >You can add "counters" with sysctl.  You can also add read/write
> >variables of any type.
> 
> You can add them dynamically at runtime? How do you know which counters are 
> available at a given time?

The same way you do it with any other mechanism; you enumerate them, or 
just try to look up the one(s) you're interested in.

> >One thing that puzzles me; you say "userland processes can add their
> >own".  What value would that have, since there'd be nothing in the
> >kernel that would do anything with such an object?
> 
> But if a user mode server can mantain performance statistics there, then 
> some performance monitoring tool would be able to query that counters and 
> allow some analysis. It can be done by other means, but I think it can be 
> usefull having it all together using a unique system call.

I'm not at all sure that's a good idea.  You end up either having to 
attach the nodes to the process that's created them, or you end up with 
stale nodes when the process dies (see the ipcrm fiasco).

-- 
\\ Give a man a fish, and you feed him for a day. \\  Mike Smith
\\ Tell him he should learn how to fish himself,  \\  msmith@freebsd.org
\\ and he'll hate you for a lifetime.             \\  msmith@cdrom.com




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199911050220.SAA00592>