[squeak-dev] Filein mechanics

David T. Lewis lewis at mail.msen.com
Fri Feb 8 01:34:21 UTC 2013


On Thu, Feb 07, 2013 at 12:09:27PM -0800, Eliot Miranda wrote:
> On Thu, Feb 7, 2013 at 11:18 AM, Jeff Gonis <jeff.gonis at gmail.com> wrote:
> 
> > That is awesome.  Getting visibility into the image is exactly what I have
> > been grappling with, so this is a big help.
> >
> >
> > On Thu, Feb 7, 2013 at 12:05 PM, Bob Arning <arning315 at comcast.net> wrote:
> >
> >>  If you can't see what's going on inside the headless image, getting
> >> some sort of picture would be a start. Try doing this in the image and save
> >> it:
> >>
> >> [
> >>     [
> >>         f _ FileDirectory default fileNamed: 'allMyProcesses'.
> >>         f nextPutAll: Time now asString; cr.
> >>         Process allInstances do: [ :p |
> >>             p suspendedContext ifNotNilDo: [ :ctxt | f nextPutAll:
> >> 'priority: ',p priority asString; cr;
> >>                 nextPutAll: ctxt longStack; cr; cr]
> >>         ].
> >>         f close.
> >>         (Delay forSeconds: 30) wait
> >>     ] repeat
> >> ] forkAt: 60
> >>
> >> the output might point you to where things stand.
> >>
> >
> and with the Cog VMs on Mac and Linux sending SIGUSR1 to the VM will get it
> to print out the same to the console (provided you start the VM from a
> console).
> 

Or if you are using an interpreter VM and you have OSProcess installed,
this turns on a similar feature:

  "OSProcess accessor setPrintAllStacksOnSigUsr1"

Although I have to say that I like Bob Arning's suggestion, since it will
produce a log file with something possibly useful at the end of the file
after the image hangs.

Dave



More information about the Squeak-dev mailing list