IO diagnostic similar to that in FreeBSD
pratyush.kshirsagar at gmail.com
Sun Mar 27 09:52:17 PDT 2011
Hello,I was trying to include the io stats display in the top command as being done in freebsd.We are using the values stored in the struct rusage, traversed through the processes kinfo_proc.The freebsd guys are storing the last process id in the kinfo_proc i.e. they are stashing it and then they are subtracting the current process rusage from the old one.
But, we can directly put the rusage values, I am confused why they are subtracting the values from the old process.What difference does this make? We need to display the values of the resource usage as we print the stats for the process.
The rusage has elements, nvcsw, nivcsw, inblock, oublock, majflt, etc. So I am just trying to use this information and print it.I am not trying to refine the results as it may bring down the performance of the top with io usage.
I have made changes so that the top displays io and cpu stats using the option -m.- Pratyush.
More information about the Kernel