Re: Artificially starving a process for CPU/Disk/etc?

Alan Cox (alan@lxorguk.ukuu.org.uk)
Fri, 1 Feb 2002 23:51:59 +0000 (GMT)


> I've got a situation where I want to simulate a server process getting
> starved for cpu/paging to death/etc. I realize I could renice the process(s)
> and then create artificial loading on the machine, but is there any way to
> do this more effectively?

There are a couple of approaches. One is to use ptrace the other
just signals and keep stopping/starting the process. Neither will give
accurate paging to death behaviour. To get that you would have to do some
simulated fault and pauses every new page access.

Alan
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/