Hi, On Fri, Dec 24, 2010 at 16:41, derleader __ <derlea...@abv.bg> wrote: > Hi, > I'm developing C plugin for Debian which will be installed as kernel > module. The problem is how to collect the data about:
why a module? a user-space tool/script/deamon is not enough for your needings? > CPU Check – Utilization, Model, Number of Cores > > RAM Check – Total Memory, Free Memory, Memory Load > > HDD Check – Number of physical HDDs, Number of logical partitions, Total > space, Free space > > Running processes – Total number of processes > > Logs – system logs such as error logs > > System uptime > > Users logged in and last login – total list of users > > Total network connections > > Check hardware parts model and number > > The kernel module will check the status of the OS every 5 minutes. What is > the most efficient way to collect these data? all this information are already exposed into /proc filesystem (that's a direct interface to kernel data structures) or by several "standard" linux tools (like free, netstat, loadavg, etc etc). You can write a script to parse those info and <do what you have to> (we do it this way). Anyhow, this discussion is off-topic on debian-devel, and if you really want to write a kernel module, it's better if you try to locate a better forum for kernel development, where you will probably also find information about kernel data structures to inspect. Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/aanlkti=t-2+qo-i3javgxswdgjmo14idv4-fn3v7m...@mail.gmail.com