On 2/9/07, Simon Valiquette <v.simon@xxxxxxxx> wrote:
Javi Roman un jour écrivit: > On 2/9/07, Rajat Jain <rajat.noida.india@xxxxxxxxx> wrote: > >> >> Why not use a simple user space tool like sar / atsar etc? >> >> Thanks, >> >> Rajat >> > > I don't know why, but a lot of people (google) say that this types of > tools are inaccurates. It is true. The reason is that theses tools are not designed for what you want to do. People that use them only care about monitoring general ressource usage on servers and don't really care about realtime load or exact load. They just want to have the big figure of the load patterns over the day/week and be able to identify potential problems by having more informations on their servers. > Also I would like understand in depth technics > about cpu usage meassures for real time purpouses. You might be interested by OProfile. It will be able to provide you very accurate informations. The Linux Trace Toolkit (LTT) is also interesting for very precise mesurements. Then your problem will became to know what you really want to mesure.
I found out Oprofile was added for Linux 2.6.10 (non 2.4 support) and my processor MIPS 4K is not supported as "they do not have performance counters" (from http://www.linux-mips.org/wiki/Oprofile).
Another way to go is to do exactly like the command uptime, and calculate it yourself using /proc/ entries. What we call the system load is a quite artificial way of evaluating the CPU load, IO load and the number of processes that are actively waiting for some resources from the computer. And because instantaneous values don't means anything useful, people use average values over an arbitrary length of time (1, 5 and 15 minutes for the command 'uptime').
I thought uptime only took measures of the scheduler run queue so it's not a good measure for my intentions.
It would be helpful if you told us more about what you really want/need to do. My feeling is that you have an embeded system doing hard-realtime and that you want to do something when the load is too high (or to do something as soon that the load is low enough). The other possibility is that you want to mesure very precisely how much ressources you are using at each instant, but that you can analyse it afterward (in which case the LTT could be very useful; Debian Sarge have a version for kernel 2.4.27, I note it because the 2.4 kernel is not actively supported anymore).
How you say I'm working with a embedded system but it doesn't doing hard real-time, even the system doesn't has patchs for soft-realtime support. Therefore I want to set a base line of accurates measures (cpu usage, network interface usage, and so on) and to try to improve the results with kernel patches (Igno Molnar's -rt patches), to improve/change user-land utilities and so forth. Thanks for you advices, I think LTT could be a very solution. Regards Javi Roman. -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/