Using get_system_info() - Obtaining the CPU states...

2007-05-29 Thread Suresh Kumar J

Hi there,

I have an application running on FreeBSD which needs to display the
CPU states as like the top command shows in the 3rd line as below:
-
CPU states:  0.0% user,  0.0% nice,  0.0% system,  0.0% interrupt,  100% idle
-

I learnt that the top command uses the get_system_info() function
for printing the CPU state detail. But I could not locate the source
code of this function. Could anybody help me in locating the
header/source file in which the get_system_info() function is
located?. Any other ideas are also welcome.

Note:
I do not want to display the CPU load average...

--
Thanks,
Suresh Kumar J
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Using get_system_info() - Obtaining the CPU states...

2007-05-29 Thread Mike Bristow
On Tue, May 29, 2007 at 04:24:27PM +0530, Suresh Kumar J wrote:
  I learnt that the top command uses the get_system_info() function
  for printing the CPU state detail. But I could not locate the source
  code of this function. Could anybody help me in locating the
  header/source file in which the get_system_info() function is
  located?

/usr/src/usr.bin/top/machine.c (which can be found on the web at
http://cvsweb.freebsd.org/src/usr.bin/top/machine.c)


-- 
Shenanigans!  Shenanigans!Best of 3!
-- Flash 

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]