Re: using get_system_info() - obtaining system load averages

2006-01-10 Thread Tofik Suleymanov
kamal kc wrote: --- Peter Jeremy <[EMAIL PROTECTED]> wrote: On Mon, 2006-Jan-09 23:59:10 -0800, kamal kc wrote: thanks i tried getloadavg() it worked. but when i tried to put it in the kernel the kernel failed to link. You didn't mention the kernel bit before. To access the

Re: using get_system_info() - obtaining system load averages

2006-01-10 Thread Peter Jeremy
On Tue, 2006-Jan-10 17:55:04 -0800, kamal kc wrote: >after i put my code i got a very high amount of interrupts (irq 21: >xl1 interrupts) that overloads the cpu withing seconds if i pump >about 4Mbps traffic through it. > >so i thought as a temp solution that i could turn off the compression >if ev

Re: using get_system_info() - obtaining system load averages

2006-01-10 Thread Julian Elischer
kamal kc wrote: actually the thing is , i have put some code in the bridge.c routine that attempts to compress/decompress ip packets. i don't know if it was a good idea since i am just a beginner in programming in the kernel and have a little knowledge regarding it. after i put my code

Re: using get_system_info() - obtaining system load averages

2006-01-10 Thread kamal kc
--- Tofik Suleymanov <[EMAIL PROTECTED]> wrote: > kamal kc wrote: > > >--- Peter Jeremy <[EMAIL PROTECTED]> > wrote: > >>>thanks i tried getloadavg() it worked. > >>> > >>>but when i tried to put it in the kernel the > kernel > >>>failed to link. > >>You didn't mention the kernel bit before.

Re: using get_system_info() - obtaining system load averages

2006-01-10 Thread kamal kc
--- Peter Jeremy <[EMAIL PROTECTED]> wrote: > On Mon, 2006-Jan-09 23:59:10 -0800, kamal kc wrote: > >thanks i tried getloadavg() it worked. > > > >but when i tried to put it in the kernel the kernel > > failed to link. > > You didn't mention the kernel bit before. To access > the load average

Re: using get_system_info() - obtaining system load averages

2006-01-10 Thread Peter Jeremy
On Mon, 2006-Jan-09 23:59:10 -0800, kamal kc wrote: >thanks i tried getloadavg() it worked. > >but when i tried to put it in the kernel the kernel > failed to link. You didn't mention the kernel bit before. To access the load average in the kernel, you just access "averunnable" (see ). Note tha

Re: using get_system_info() - obtaining system load averages

2006-01-10 Thread kamal kc
--- Dan Nelson <[EMAIL PROTECTED]> wrote: > In the last episode (Jan 09), kamal kc said: > > dear everybody, > > > > i want to use the routine get_system_info() to get > the load averages > > of the cpu. i found it that top uses it. > > get_system_info is just a function /in/ top itself > that

Re: using get_system_info() - obtaining system load averages

2006-01-09 Thread Dan Nelson
In the last episode (Jan 09), kamal kc said: > dear everybody, > > i want to use the routine get_system_info() to get the load averages > of the cpu. i found it that top uses it. get_system_info is just a function /in/ top itself that gets the CPU usage. It uses the vm.loadavg sysctl to get the

Re: using get_system_info() - obtaining system load averages

2006-01-09 Thread kamal kc
> On Mon, 2006-Jan-09 19:14:53 -0800, kamal kc wrote: > >i want to use the routine get_system_info() to get > the > >load averages of the cpu. i found it that top uses > it. > > The approved mechanism is via the sysctl(3) name > "vm.loadavg" or OID > CTL_VM.VM_LOADAVG - which returns a struct load

Re: using get_system_info() - obtaining system load averages

2006-01-09 Thread Peter Jeremy
On Mon, 2006-Jan-09 19:14:53 -0800, kamal kc wrote: >i want to use the routine get_system_info() to get the >load averages of the cpu. i found it that top uses it. The approved mechanism is via the sysctl(3) name "vm.loadavg" or OID CTL_VM.VM_LOADAVG - which returns a struct loadavg. See sysctl(3

using get_system_info() - obtaining system load averages

2006-01-09 Thread kamal kc
dear everybody, i want to use the routine get_system_info() to get the load averages of the cpu. i found it that top uses it. but i do not know which object files do i need to link it to my program. also the struct system_info is defined in the machine.h of the /usr/src/contrib/top. do i need t