Re: Getting CPU usage in FreeBSD

2000-03-13 Thread Garance A Drosihn
At 12:00 PM -0800 3/12/00, Jordan K. Hubbard wrote: > > I'm definitely for it... If I can get permission from Jordan, > > perhaps the attached patches can make it into upcoming release. > >I think it's a fine idea, I'm just not sure one day before release >is the time to be talking about it. It s

Re: Getting CPU usage in FreeBSD

2000-03-12 Thread Arun Sharma
> On Linux this is what I do to get this value: Measure the number of > scheduled jiffies (hundreths of second), measure elapsed time since last > measurement, divide. I ran into the same problem as you - and took the time to implement it. My patches fix the SMP case as well as getting it via sy

Re: Getting CPU usage in FreeBSD

2000-03-12 Thread Andrzej Bialecki
On Sun, 12 Mar 2000, Jordan K. Hubbard wrote: > > I'm definitely for it... If I can get permission from Jordan, perhaps the > > attached patches can make it into upcoming release. > > I think it's a fine idea, I'm just not sure one day before release > is the time to be talking about it. It sho

Re: Getting CPU usage in FreeBSD

2000-03-12 Thread Jordan K. Hubbard
> I'm definitely for it... If I can get permission from Jordan, perhaps the > attached patches can make it into upcoming release. I think it's a fine idea, I'm just not sure one day before release is the time to be talking about it. It should have been raised before now. :( - Jordan To Unsubs

Re: Getting CPU usage in FreeBSD

2000-03-12 Thread Andrzej Bialecki
On Sun, 12 Mar 2000, Oliver Fromme wrote: > Kris Kennaway <[EMAIL PROTECTED]> wrote in list.freebsd-hackers: > > On Sun, 12 Mar 2000, Oliver Fromme wrote: > > > Then look up the definition of kread() in the same file, and > > > how the contents of cur.cp_time are used in the cpustats() > > >

Re: Getting CPU usage in FreeBSD

2000-03-12 Thread Oliver Fromme
Kris Kennaway <[EMAIL PROTECTED]> wrote in list.freebsd-hackers: > On Sun, 12 Mar 2000, Oliver Fromme wrote: > > Then look up the definition of kread() in the same file, and > > how the contents of cur.cp_time are used in the cpustats() > > function. Note that "cur" is a "struct statinfo", wh

Re: Getting CPU usage in FreeBSD

2000-03-12 Thread Andrzej Bialecki
On Sat, 11 Mar 2000, Kris Kennaway wrote: > On Sun, 12 Mar 2000, Oliver Fromme wrote: > > > Then look up the definition of kread() in the same file, and > > how the contents of cur.cp_time are used in the cpustats() > > function. Note that "cur" is a "struct statinfo", which is > > defined in /

Re: Getting CPU usage in FreeBSD

2000-03-11 Thread Pedro A M Vazquez
|o|... Sat, Mar 11, 2000 at 11:56:30PM -0800, Kris Kennaway ...|o| wrote: > On Sun, 12 Mar 2000, Pedro A M Vazquez wrote: > > > > We probably should make this into a sysctl to divorce the binaries from > > > having to read kvm. > > > > it's already there: > > > > vm.loadavg: { 1.40 1.33 1.2

Re: Getting CPU usage in FreeBSD

2000-03-11 Thread Kris Kennaway
On Sun, 12 Mar 2000, Pedro A M Vazquez wrote: > > We probably should make this into a sysctl to divorce the binaries from > > having to read kvm. > > it's already there: > > vm.loadavg: { 1.40 1.33 1.23 } Thats the system load average. The question referred to CPU usage percentages. Kri

Re: Getting CPU usage in FreeBSD

2000-03-11 Thread Pedro A M Vazquez
|o|... Sat, Mar 11, 2000 at 11:37:18PM -0800, Kris Kennaway ...|o| wrote: > On Sun, 12 Mar 2000, Oliver Fromme wrote: > > > Then look up the definition of kread() in the same file, and > > how the contents of cur.cp_time are used in the cpustats() > > function. Note that "cur" is a "struct stati

Re: Getting CPU usage in FreeBSD

2000-03-11 Thread Kris Kennaway
On Sun, 12 Mar 2000, Oliver Fromme wrote: > Then look up the definition of kread() in the same file, and > how the contents of cur.cp_time are used in the cpustats() > function. Note that "cur" is a "struct statinfo", which is > defined in /usr/include/devstat.h. The CPU states are defined > in

Re: Getting CPU usage in FreeBSD

2000-03-11 Thread Oliver Fromme
Felipe Paulo Guazzi Bergo <[EMAIL PROTECTED]> wrote in list.freebsd-hackers: > I am the author of gPS (http://gps.seul.org) and I'm trying to finish the > FreeBSD native poller. All I need now is a routine to get the CPU usage. > [...] > I've already looked at the source of top but couldn't ge

Re: Getting CPU usage in FreeBSD

2000-03-11 Thread W Gerald Hicks
Hi Felipe, (You should probably be targeting -current for software under development) Perhaps consulting /usr/src/usr.bin/top/machine.c might offer up some clues. Cheers, Jerry Hicks [EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the b

Getting CPU usage in FreeBSD

2000-03-11 Thread Felipe Paulo Guazzi Bergo
Hi, I am the author of gPS (http://gps.seul.org) and I'm trying to finish the FreeBSD native poller. All I need now is a routine to get the CPU usage. My program needs it every quarter of second, so the loadavg value is not enough accurate for me. (the objective is the CPU/memory history window