On Fri, 2010-12-24 at 09:18 -0700, Stefan Nuxoll wrote: > Why would you check any of this in kernel. You have access to all the > information to do this wthout. > > On Fri, Dec 24, 2010 at 08:23, derleader __ <[email protected]> wrote: > Hi, > I'm developing C plugin for Edubuntu which will be > installed as kernel module. The problem is how to collect the > data about: > * CPU Check – Utilization, Model, Number of Cores
ps aux / uptime / /proc/cpuinfo > > * RAM Check – Total Memory, Free Memory, Memory Load free / /proc/meminfo > * HDD Check – Number of physical HDDs, Number of logical > partitions, Total space, Free space cat /proc/partitions / df > * Running processes – Total number of processes ps aux | wc -l > * Logs – system logs such as error logs /var/log/syslog > * System uptime uptime / /proc/loadavg > * Users logged in and last login – total list of users w / who/ ck-list-sessions > * Total network connections netstat > * Check hardware parts model and number Check the DMI, example: dmidecode > The kernel module will check the status of the OS every 5 > minutes. What is the most efficient way to collect these data? > > Regards > Peter I'd strongly suggest to look for an existing tool that does that, like the log viewer + system monitor of gnome. There's probably a lot of CLI tools doing something similar already and it might be interesting contributing to those instead of writing one more. Writing it as a kernel module seems to me like a very bad idea as you'll need a userspace tool to read whatever the kernel module will be probing anyway. All the information you need is available in userspace, so it'll be easier and safer to run your tool as a userspace tool. Hope it helps -- Stéphane Graber Ubuntu developer http://www.ubuntu.com
signature.asc
Description: This is a digitally signed message part
-- edubuntu-devel mailing list [email protected] Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/edubuntu-devel
