Re: Collecting data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On 12/24/10 7:01 AM, derleader __ wrote:
>  Hi,
>      I'm developing C plugin for Centos which will be installed as 
> kernel module. The problem is how to collect the data about:
>
>    *
>
>       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
>
>

none of that stuff should be in a kernel module. a  simple daemon is far 
more appropriate.

you can get the CPU info out of /proc/cpuinfo
you can get the ram info out of /proc/meminfo
you can get the HDD info from /bin/df
you can get the process info from /bin/ps
the logs are all in regular files as /var/log/***
the user login info can be found by parsing /var/log/wtmp
the network connections via /bin/netstat -an
the hardware info from lspci or lshw

thats a lot of redundant and voluminuous information to be fetching 
every 5 minutes,



_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos



[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux