Squeak in Emergency mode

David T. Lewis lewis at mail.msen.com
Tue Dec 14 14:55:59 UTC 2004


On Tue, Dec 14, 2004 at 12:22:59PM +0100, Jan B. Krej?? wrote:
> Hi all,
> 
> I've got few stupid questions. I would like to create a .st script,
> which, given to Squeak as a command line parameter, will revitalize my
> image which is accidentaly messed up with number of CPU consuming
> threads running, preventing me to interact with Squeak furthermore.
> 
> 1) how do I determine what threads are vital for running squeak?
> 2) how do I kill ALL the threads running (except the one executing my
> command line script, of course)?
> 3) how and in what order do I start the needed ones again?

Jan,

>From your message, I am assuming that there is probably one process
that is causing you a problem, and that you want to find that process
and terminate it.

Here is a simple script to show the processes running in your damaged
image. This might be enough to get you started. When you figure out
what process is causing a problem, add some code to the script to
terminate that process. When you think you have it working, comment
out the last line of the script and let Squeak come up normally.
(also don't use the "headless" parameter of course).

This is for Squeak running on Linux. If you are on Windows, you can
adapt the script to write its output to a file.

Dave

--- cut here ----
"A simple Squeak startup script to display active process in the Squeak image."
"This is for Unix. On other platforms, just replace '/dev/tty' with a file name,"
"and maybe write <cr><lf> instead of just <lf>."

"Once you figure out which processes you want to terminated, you can add"
"something to this script to do the deed."

"Run it like this:"

" $ squeak -headless squeak.image rescue.st"

| fs |
fs := FileStream fileNamed: '/dev/tty'.
Process allInstances do:
 [:proc | proc printOn: fs.
 fs nextPut: Character lf].

"Quit without saving. Comment this out to allow Squeak to come up normally."
Smalltalk snapshot: false andQuit: true !




More information about the Squeak-dev mailing list