'\"macro stdmacro
.if n .pH g1.objectwat @(#)objectwat	40.2 of 12/29/89
.ig
Revised: D. Bodnar 9/7/89
format -dqm4 -man6 -rs1 objectwatcher.1
..
.\" @(#)objectwatcher.1	1.9 7/21/89
.ds Sd \s-2X11/Ne\h'-0.2n'WS\s+2
.ds Xn \s-2X11/N\s+2e\h'-0.2n'\s-2WS\s+2
.ds Ps P\s-2OST\s+2S\s-2CRIPT\s+2
.nr X
.if \nX=0 .ds x} OBJECTWATCHER 1 "15 June 1989" "\&"
.if \nX=1 .ds x} OBJECTWATCHER 1 "15 June 1989"
.if \nX=2 .ds x} OBJECTWATCHER 1 "" "\&"
.if \nX=3 .ds x} OBJECTWATCHER "" "" "\&"
.TH \*(x}
.\" .IX objectwatcher#(1) "" "\fIobjectwatcher\fP(1) \(em \*(Sd tool"
.IX objectwatcher#(1) "" "\fLobjectwatcher\fP(1)"
.SH NAME
objectwatcher \- list data objects allocated/deallocated in \*(Sd 
since this command was last run.
.SH SYNOPSIS
.B objectwatcher
.SH DESCRIPTION
.LP
.B objectwatcher 
is a UNIX Bourne shell script that 
prints a formatted summary of data objects allocated and deallocated in
\*(Sd since the command was last run.
.LP
This tool uses the \*(Sd operator 
\f3objectdump\f1
and the 
.B objectdiff
command.  Each time 
\fBobjectwatcher\fR is run, the current snapshot of 
the server obtained from
.B objectdump
is left in the file
\fB/tmp/objects.latest\fP for future comparisons.
.LP
The first time \f3objectwatcher\f1 is run, there is usually no 
\fBobjects.latest\fR file in \fB/tmp\fR.
This results in no output.  If an 
\fBobjects.latest\fR file exists in
\fB/tmp\fR from a run of \fBobjectwatcher\fR on a previous server, the
output should be ignored as it is comparing different servers.
.LP
The output from \fBobjectwatcher\fR is in the following format:
.sp
.in +.5i
   \fInnnnn\fP \fBbytes for\fP  \fImmm object_type\fP \fBobjects\f1
.in -.5i
.sp
The output is sorted from the largest memory size allocated at the top to the
smallest size allocated or the largest size freed at the bottom.
There is a total-line at the end:
.sp
.in +.5i
   \fInnnnn\fP \fBbytes for\fP  \fImmm TOTAL\fP \fBobjects\fP
.in -.5i
.LP
The \fIobject_type\fPs are the same as those used for the output from
\fBobjectdump\fR.
.\"
.SH EXAMPLES
.LP
To find the number of objects allocated/deallocated during some
operation, set up the environment to test
the operation in question.  Execute \fBobjectwatcher\fR to flush 
information about data objects allocated so far.  Execute the operation
in question.  Execute \fBobjectwatcher\fR again.  The output indicates
what allocations and deallocations of data objects occurred during
processing of the operation:
.sp
.RS
.ft B
.nf
example% objectwatcher
    % empty output or difference from last run
example% psh
.sp .25
executive
/Var 1 def
.\" /new MyClass send		% or, for instance, bring up a menu...
quit
.sp .25
example% objectwatcher
    % report of objects created or destroyed during the operation
.RE
.fi
.SH "SEE ALSO"
\fBobjectdiff\fP(1)
