--- a/ProcMonitor.st Thu Nov 17 15:44:34 1994 +0100
+++ b/ProcMonitor.st Thu Nov 17 15:47:59 1994 +0100
@@ -1,3 +1,15 @@
+"
+ COPYRIGHT (c) 1993 by Claus Gittinger
+ All Rights Reserved
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice. This software may not
+ be provided or otherwise made available to, or used by, any
+ other person. No title to or ownership of the software is
+ hereby transferred.
+"
+
StandardSystemView subclass:#ProcessMonitor
instanceVariableNames:'listView processes listUpdateDelay updateDelay
updateBlock listUpdateBlock updateProcess hideDead
@@ -7,6 +19,54 @@
category:'Interface-Tools'
!
+!ProcessMonitor class methodsFor:'documentation'!
+
+copyright
+"
+ COPYRIGHT (c) 1993 by Claus Gittinger
+ All Rights Reserved
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice. This software may not
+ be provided or otherwise made available to, or used by, any
+ other person. No title to or ownership of the software is
+ hereby transferred.
+"
+!
+
+version
+"
+$Header: /cvs/stx/stx/libtool/Attic/ProcMonitor.st,v 1.4 1994-11-17 14:46:59 claus Exp $
+"
+!
+
+documentation
+"
+ This view shows smalltalks (light-weight) processes, and also offers
+ a popup menu for various useful operations on them.
+ Especially 'debug' is useful, to see what a process is currently
+ doing.
+ The information shown is:
+ id - the numeric id of the process
+ name - the name (if any) of the process
+ (the name has no semantic meaning; its for the processMonitor)
+ state - what is it doing;
+ wait - waiting on a semaphore
+ eventWait - waiting on a view-event semaphore
+ ioWait - waiting on an io-semaphore
+ timeWait - waiting for a time-semaphore
+ run - run, but currently not scheduled
+ active - really running
+ suspended - suspended; not waiting on a semaphore
+ light - not yet started (i.e. has no stack yet)
+
+ prio - the processes priority (1..30)
+ usedStack - the current stack use
+ totalStack - the stack currently allocated
+"
+! !
+
!ProcessMonitor class methodsFor:'startup'!
open
@@ -184,6 +244,8 @@
]
]
].
+ self updateStatus.
+ self updateList.
! !
!ProcessMonitor methodsFor:'menu actions'!
@@ -292,8 +354,8 @@
oldList := listView list.
processes notNil ifTrue:[
list := OrderedCollection new.
- list add:'id name state prio usedStack totalStack'.
- list add:'-------------------------------------------------------------------'.
+ list add:'id name state prio usedStack totalStack'.
+ list add:'------------------------------------------------------------------------'.
interrupted := Processor interruptedProcess.
@@ -310,10 +372,10 @@
] ifTrue:[
nm := ' '
].
- nm size >= 24 ifTrue:[
- nm := (nm copyTo:23) , ' '
+ nm size >= 29 ifTrue:[
+ nm := (nm contractTo:28) , ' '
] ifFalse:[
- nm := (nm printStringPaddedTo:24).
+ nm := (nm printStringPaddedTo:29).
].
line := line , nm.
st := aProcess state.