No subject

Daniel Lezcano daniel.lezcano at free.fr
Tue Dec 28 20:45:34 UTC 2010


On 12/24/2010 04:24 PM, derleader __ wrote:
>
>   Hi,
>    

Hi Peter,

I think most of the informations is already present in userspace. Maybe 
you don't need a kernel module.
>
>   I'm developing C plugin for Ubuntu which will be installed as kernel module. The problem is how to collect the data about:
>      CPU
> 	Check – Utilization, Model, Number of Cores
>    

/proc/cpuinfo

> 	RAM
> 	Check – Total Memory, Free Memory,  Memory Load
>    

/proc/meminfo

> 	HDD
> 	Check – Number of physical HDDs, Number of logical partitions,
>    

/proc/partitions


> 	Total space, Free space
> 	    Running
> 	processes – Total number of processes
>    

/proc/[0-9].*

> 	Logs
> 	– system logs such as error logs
>    

/var/log/messages
/proc/kmsg System

> 	uptime
>    

/proc/uptime
> 	Users
> 	logged in and last login – total list of users
>    

/var/run/utmp
/etc/passwd

> 	Total
> 	network connections
>    

/proc/net/tcp[6]
...

> 	Check
> 	hardware parts model and number

dmidecode command looking at /proc/mem

>   The kernel module will check the status of the OS every 5 minutes. What is the most efficient way to collect these data?
>    

IMHO, no need of a kernel module, an userspace application with your own 
timer or launched via cron.

   -- Daniel





More information about the kernel-team mailing list