[FIX][GOODIE] PigWatcher-nk (also ProcessBrowser fix)

Ned Konz ned at bike-nomad.com
Thu Mar 22 18:03:18 UTC 2001


Thanks to Bob Arning, you can see the UI process if you have
a newer VM...

I should probably split out the fix for the ProcessBrowser.

from preamble:

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

22 March:

Brought back display of the UI process; this had been removed
in newer VM's by the nil-ing out of the active process suspendedContext
field.

14 March:

Added automatic starting of PigWatcher when ProcessBrowser
is started, if it's available. This will provide percentage
numbers. If the ProcessBrowser starts the PigWatcher, it
will stop it on exit.

Added PigWatcher menu items to process list menu.

Made PigWatcher update time more accurate.

Added percentage time display to ProcessBrowser. If
a PigWatcher is running, it will use its statistics.

Also greatly reduced auto-update jerkiness in ProcessBrowser
by using garbageCollectMost rather than garbageCollect.

Well, it ignores UI pigs now. You can use the interrupt key for those.

By the way, you can see the current tally using:

	PigWatcher dumpTallyOnTranscript 

Note that the PigWatcher 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: 7243 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20010322/84795b04/PigWatcher-nk.cs.obj


More information about the Squeak-dev mailing list