Collecting data
Fabio T. Leitao
fabio.tleitao at gmail.com
Fri Dec 24 16:58:54 UTC 2010
Hello Peter,
I believe most of the information you intend to collect are in the
filesystem /proc (CPU, RAM, HDD, Processes, Uptime, Network, etc.) or the
the /var/log/messages and maybe even the /etc/syslog.conf
Most applications (such as w and ipconntrac) probably read from there to
show in the console what is stored there.
I am not sure if that is exactly what you were looking for, but if you are
trying to read straight from the kernel variables, then when you read the
source code I believe it would not be that difficult to figure out how the
information get written there now that you have the actual destination in
the filesystem.
You should also have a look ate the munin project, specially the plugins to
collect data (every 5 minutes) which might help a lot teaching about where
the gather these info.
2010/12/24 derleader __ <derleader at abv.bg>
> Hi,
> I'm developing C plugin for Ubuntu Server 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
>
> 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
>
>
> --
> ubuntu-server mailing list
> ubuntu-server at lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-server
> More info: https://wiki.ubuntu.com/ServerTeam
>
--
Fábio Leitão
..-. .- -... .. --- .-.. . .. - .- --- ...-.-
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-server/attachments/20101224/ff53d0c3/attachment.html>
More information about the ubuntu-server
mailing list