Hi,
I want to write a Linux kernel module which collects the CPU, RAM and HDD load. I can write a simple kernel module but I don't have any idea where where to find the data from the kernel I need. Can you help me and point me where I can find in the kernel those data?
Regards
Peter
Write Linux kernel module to collect data from the kernel
Re: Write Linux kernel module to collect data from the kernel
All that information is already available in /proc and various utilities use it including top, sar, vmstat and iostat.
Re: Write Linux kernel module to collect data from the kernel
Yes. But /proc in my case is not a solution
Write Linux kernel module to collect data from the kernel
So? Why not? Please elaborate.
Re: Write Linux kernel module to collect data from the kernel
I need a solution that can be deployable in every Linux distribution.
As far as I know /proc in different architectures is different. And sometimes is missing.
As far as I know /proc in different architectures is different. And sometimes is missing.
Re: Write Linux kernel module to collect data from the kernel
/proc comes from the kernel and is likely to be constant across distributions. Across [u]architectures[/u] it is probably the same but I don't use anything except Intel/AMD so cannot swear to this. Chances are that if it is then you kernel module would need to be different too.