Re: SMP per-CPU statistics under FreeBSD.
Marco van Tol <[email protected]>
| Newsgroups | gmane.comp.gnome.apps.gkrellm |
|---|---|
| Message-ID | <[email protected]> |
On Mon, Apr 17, 2006 at 10:43:14AM -0500, Bill WIlson wrote: > On Mon, 17 Apr 2006 14:03:58 +0000 > Marco van Tol <[email protected]> wrote: > > > I asked on the FreeBSD hackers mailing list whether per CPU statistics were > > available under FreeBSD, with the intention to modify gkrellm 2.2.9 to > > support it. I had seen per CPU statistics with gkrellm under linux, and > > really liked it. I'm running an AMD Athlon64 dual-core. > > > > John Baldwin has been very helpful and supplied me a patch to get per-CPU > > statistics under FreeBSD as that's not available in the main trunk yet. > > http://lists.freebsd.org/pipermail/freebsd-hackers/2006-April/016093.html > > > > I will try to modify gkrellm 2.2.9 to support what this patch does, and mail > > a patch for gkrellm over here if I succeed. > > > > Is there anything else I should be aware of while making this attempt? > > The cpu interface is fairly simple and is briefly documented in gkrellm-sysdeps.h. > The things to know are: > > 1) Give the gkrellm_cpu_set_number_of_cpus() the number of real CPUs (ie > don't include composite even if you report data for a composite CPU). > > 2) You have the choice of reporting composite CPU data yourself or letting gkrellm > calculate the composite data. Just never call gkrellm_cpu_assign_composite_data() > and gkrellm will do it for you. > > 3) You probably don't need to use the gkrellm_cpu_add_instance() call as it > is meant for architectures where non-contiguous CPU numbers will be reported. > This can happen on Solaris where for example the reporting can be for CPU > numbers 0,1 and 3 with 2 missing. > > 3) You should probably test that your implementation works in client/server mode. > You can do this on a single machine. Just start gkrellmd and then run > gkrellm -s localhost or whatever is needed on FreeBSD. Thank you very much for these pointers. Much appreciated! :) I hope to have something to play with soon. Marco -- Cool town, evening in the city. Dressing so fine and looking so pretty. Cool cat, looking for a kitty. Gonna look in every corner of the city. - Joe Jackson - Summer in the city _______________________________________________ Gkrellm mailing list [email protected] http://ninja.linux-phreak.biz/mailman/listinfo/gkrellm