Getting the CPU load value in a LKM...

Getting the CPU load value in a LKM...

Post by Perego Paol » Sat, 02 Dec 2000 04:00:00



Hi guys, it's me again! :) In my kernel module I'm writing, I need to
know the CPU load value calculated by the kernel. Linking timer.c file
in my module I think isn't the right things so, how can I have exported
for my module this value.

BTW I need the CPU load because I want try to prevent some processes do
a Denial of service against my host.

Thanx a lot

--
$>cd /pub
$>more beer


Tutor at D.S.I. - University of Milan
I'm Linux zion 2.4.0-test9 #1 Fri Oct 20 14:09:56 CEST 2000 i586 unknown

 
 
 

Getting the CPU load value in a LKM...

Post by Rick Ell » Thu, 07 Dec 2000 04:00:00




Quote:>Hi guys, it's me again! :) In my kernel module I'm writing, I need to
>know the CPU load value calculated by the kernel. Linking timer.c file
>in my module I think isn't the right things so, how can I have exported
>for my module this value.

unsigned long avenrun[3] = { 0,0,0 };

--
http://www.spinics.net/linux

 
 
 

1. Getting very high CPU-load with new acpi

I own a fujitsu-siemens lifebook C6155.
With several linux-kernels containing the new acpi (2.5.x, 2.4.21+patch,
2.4.21-ac1), I get very high CPU-load every few seconds. It's even
impossible to listen mp3s.
top shows me that it's the process events on 2.5-kernels and keventd on
2.4-kernels. This does not happen with 2.4.21-vanilla (without
acpi-patch, but with acpi enabled and working).
So the bug seems to be in the new acpi-system.

dmesg-output, lspci-output, dsdt and other information is available
through
http://bugzilla.kernel.org/show_bug.cgi?id=843

--

  application_pgp-signature_part
< 1K Download

2. csh: setpgid error.

3. New: Getting very high CPU load on Laptop with ACPI

4. remote ftp

5. Q: getting the CPU load

6. Whats a good Network Card for 100M under Linux (RH5.2)?

7. Getting CPU-load with snmp

8. SecuPress

9. IDE corruption during heavy bt878-induced interr upt load [LKM]

10. IDE corruption during heavy bt878-induced interrupt load [LKM]

11. cpu load balancing only on cpu 0

12. Relationship between load average and CPU busy or CPU idle

13. Difference between a LOADed CPU & a non IDLE CPU ???