On Friday 27 of August 2004 23:54, Rick Lindsley wrote:
[- snip -]
> You can also pick up the program "latency.c" at
>
> http://eaglet.rain.com/rick/linux/schedstat/v9/latency.c
>
> With these two things in hand, you should be able to measure the latency
> on 2.6.8.1 of a particular process.
>
> A patch is not necessary for 2.6.9-rc1-mm1 (schedstats is already in there)
> but you will need to config the kernel to use it. Then retrieve a slightly
> different latency.c:
>
> http://eaglet.rain.com/rick/linux/schedstat/v10/latency.c
>
> since 2.6.9-rc1-mm1 output format is different (as you noted, it's a
> different scheduler.) Then you should be able to see if the latency of
> a particular process (updatedb, for instance) changes.
I've fiddled a bit with both the latency.c programs. I've added some options
to them etc. In particular, now you can specify a program to run and monitor
instead of a pid, which is handy if you need to monitor processes that exit
quickly. Everything is documented in the sources (attached). I thought you
might find this useful. :-)
Regards,
RJW
--
For a successful technology, reality must take precedence over public
relations, for nature cannot be fooled.
-- Richard P. Feynman
I've fiddled a bit with both the latency.c programs. I've added some
options to them etc. In particular, now you can specify a program
to run and monitor instead of a pid, which is handy if you need to
monitor processes that exit quickly. Everything is documented in
the sources (attached). I thought you might find this useful. :-)
Thank you much! yes, that will make it more useful. I'll add it to my
backlog and see if I can't get it out to the web page this week.
Rick
On Wednesday 08 of September 2004 10:12, Rick Lindsley wrote:
> I've fiddled a bit with both the latency.c programs. I've added some
> options to them etc. In particular, now you can specify a program
> to run and monitor instead of a pid, which is handy if you need to
> monitor processes that exit quickly. Everything is documented in
> the sources (attached). I thought you might find this useful. :-)
>
> Thank you much! yes, that will make it more useful. I'll add it to my
> backlog and see if I can't get it out to the web page this week.
Great! There is a missing #include in my sources which produces a misleading
warning. Also, I think that the hint about latency.c working only with
versions 4 and 5 of schedstat is no longer valid. :-)
Please, apply:
--- old/latency-v10.c 2004-09-08 13:48:37.176519744 +0200
+++ latency-v10.c 2004-09-08 13:55:01.956024368 +0200
@@ -7,9 +7,6 @@
* it on a kernel that does not have the schedstat patch compiled in
* will cause it to happily produce bizarre results.
*
- * Note too that this is known to work only with versions 4 and 5
- * of the schedstat patch, for similar reasons.
- *
* This currently monitors only one pid at a time but could easily
* be modified to do more.
*/
@@ -28,6 +25,7 @@
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
+#include <stdlib.h>
#include <stdio.h>
#include <getopt.h>
#include <string.h>
Greets,
RJW
--
- Would you tell me, please, which way I ought to go from here?
- That depends a good deal on where you want to get to.
-- Lewis Carroll "Alice's Adventures in Wonderland"