DragonFly BSD
DragonFly kernel List (threaded) for 2011-03
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

IO diagnostic similar to that in FreeBSD


From: Pratyush Kshirsagar <pratyush.kshirsagar@xxxxxxxxx>
Date: Sun, 27 Mar 2011 12:48:36 -0400

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.




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