how to get the status of cpu in kernel?
shiner chen
shiner_chen at yahoo.com.cn
Sat May 21 10:49:39 GMT 2005
In order to implement a dispacthing policy I want to get the status of cpu. I have read the code of top command and i find it get the status of cpu by the function :
int sysctlbyname(const char *, void *, size_t *, void *, size_t);
I search the code of kernel ,then I consider that i can get the status of cpu through the funciton:
int kernel_sysctlbyname(struct thread *td, char *name, void *old, size_t *oldlenp, void *new, size_t newlen, size_t *retval);
I try to get the status of cpu by that function ,but it does not work!
who can tell me the problem?
How do i get the status of cpu?
How do i use it if the funcion is right? what's the mean of the function's arguments ?
thanks !
shiner_chen
May 21th 2005
---------------------------------
Do You Yahoo!?
×¢²áÊÀ½çÒ»Á÷Æ·ÖʵÄÑÅ»¢Ãâ·ÑµçÓÊ
More information about the freebsd-hackers
mailing list