[GOODIE] PigWatcher-nk

Ned Konz ned at bike-nomad.com
Fri Mar 9 04:19:42 UTC 2001


(I'm so used to pushing the interrupt key that I forgot that
the UI process could also be a pig. So if the UI is being a pig,
PigWatcher will bring up a pre-debug window on it.)

Also, for some reason, this won't catch processes at priority 6
(or 7 or 8, but I know why that is). Perhaps it's because that's the 
priority of the IO process.

from preamble:

"Change Set:		PigWatcher-nk
Date:			8 March 2001
Author:			Ned Konz

Late changes: now catches UI pigs as well.

Note that this may not catch processes with priorities at or above 6
(the priority of the IO process).

(note: this also includes a couple of ProcessBrowser fixes:
* suspended processes can now be debugged
* suspended processes can have their priority changed)

PigWatcher implements a simple runaway process monitoring tool
that will suspend a process that is taking up too much of Squeak's
time and allow user interaction. By default it watches for a Process
that
is taking more than 80% of the time; this threshold can be changed.

	PigWatcher startMonitoring.	'process period 20 seconds, sample rate 100
msec'
	PigWatcher current monitorProcessPeriod: 10 sampleRate: 20.
	PigWatcher current threshold: 0.5.	'change from 80% to 50%'
	PigWatcher stopMonitoring.

Also (earlier named CPUUsageTally-nk):

Compute CPU usage using a 10-msec sample for (at least) the given number
of seconds, then dump the usage statistics on the Transcript. The UI is
free to continue, meanwhile.

	ProcessBrowser tallyCPUUsageFor: 10
"!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PigWatcher-nk.cs.gz
Type: application/octet-stream
Size: 3972 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20010308/66bc7398/PigWatcher-nk.cs.obj


More information about the Squeak-dev mailing list