I am trying to develop a system statistics tool for Ubuntu that will store data about resource utilization of processes/users. I am storing these data in my own log files like /var/log/<process>.log. I want to know if there is any API (like procfs for collecting data about processes) for parsing my own log files using C programming language. These log files will contain simply username, process id, CPU%, MEM%, I/O etc.
Tell me more
×
Unix & Linux Stack Exchange is a question and answer site for
users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.
|
|
|||||||
|
|
What API would you want or need? Log files are text, use any text parsing utility, script or language that you might find useful. Personally my language of choice tends to be But really it is all up to what you want to do with your logs. Possibilities are endless. |
|||
|
|
|
When you are creating your own log files, I think you should create your own API too. |
|||
|
|
|
You might consider integrating rrdtool ) into your workflow, since it seems to be doing a good deal of the things your looking for by itself already. There are a number of well documented examples on the net, so getting started shouldn't be too hard. |
|||
|
|