/
html/
<HTML>
<HEAD>
<!-- This HTML file has been created by texi2html 1.51
     from ProgrammersManual.texinfo on 4 March 1997 -->

<TITLE>LambdaMOO Programmer's Manual - Administrative</TITLE>
</HEAD>
<BODY>
Go to the <A HREF="ProgrammersManual_1.html">first</A>, <A HREF="ProgrammersManual_54.html">previous</A>, <A HREF="ProgrammersManual_56.html">next</A>, <A HREF="ProgrammersManual_77.html">last</A> section, <A HREF="ProgrammersManual_toc.html">table of contents</A>.
<P><HR><P>


<H3><A NAME="SEC55" HREF="ProgrammersManual_toc.html#TOC55">Administrative Operations</A></H3>

<P>
<DL>
<DT><U>Function:</U> str <B>server_version</B> <I>()</I>
<DD><A NAME="IDX119"></A>
Returns a string giving the version number of the running MOO server.
</DL>

</P>
<P>
<DL>
<DT><U>Function:</U> none <B>server_log</B> <I>(str <VAR>message</VAR> [, <VAR>is-error</VAR>])</I>
<DD><A NAME="IDX120"></A>
The text in <VAR>message</VAR> is sent to the server log with a distinctive prefix
(so that it can be distinguished from server-generated messages).  If the
programmer is not a wizard, then <CODE>E_PERM</CODE> is raised.  If <VAR>is-error</VAR>
is provided and true, then <VAR>message</VAR> is marked in the server log as an
error.
</DL>

</P>
<P>
<DL>
<DT><U>Function:</U> obj <B>renumber</B> <I>(obj <VAR>object</VAR>)</I>
<DD><A NAME="IDX121"></A>
The object number of the object currently numbered <VAR>object</VAR> is changed to
be the least nonnegative object number not currently in use and the new object
number is returned.  If <VAR>object</VAR> is not valid, then <CODE>E_INVARG</CODE> is
raised.  If the programmer is not a wizard, then <CODE>E_PERM</CODE> is raised.
If there are no unused nonnegative object numbers less than <VAR>object</VAR>, then
<VAR>object</VAR> is returned and no changes take place.

</P>
<P>
The references to <VAR>object</VAR> in the parent/children and location/contents
hierarchies are updated to use the new object number, and any verbs, properties
and/or objects owned by <VAR>object</VAR> are also changed to be owned by the new
object number.  The latter operation can be quite time consuming if the
database is large.  No other changes to the database are performed; in
particular, no object references in property values or verb code are updated.

</P>
<P>
This operation is intended for use in making new versions of the LambdaCore
database from the then-current LambdaMOO database, and other similar
situations.  Its use requires great care.
</DL>

</P>
<P>
<DL>
<DT><U>Function:</U> none <B>reset_max_object</B> <I>()</I>
<DD><A NAME="IDX122"></A>
The server's idea of the highest object number ever used is changed to be the
highest object number of a currently-existing object, thus allowing reuse of
any higher numbers that refer to now-recycled objects.  If the programmer is
not a wizard, then <CODE>E_PERM</CODE> is raised.

</P>
<P>
This operation is intended for use in making new versions of the LambdaCore
database from the then-current LambdaMOO database, and other similar
situations.  Its use requires great care.
</DL>

</P>
<P>
<DL>
<DT><U>Function:</U> list <B>memory_usage</B> <I>()</I>
<DD><A NAME="IDX123"></A>
On some versions of the server, this returns statistics concerning the server
consumption of system memory.  The result is a list of lists, each in the
following format:

</P>

<PRE>
{<VAR>block-size</VAR>, <VAR>nused</VAR>, <VAR>nfree</VAR>}
</PRE>

<P>
where <VAR>block-size</VAR> is the size in bytes of a particular class of memory
fragments, <VAR>nused</VAR> is the number of such fragments currently in use in the
server, and <VAR>nfree</VAR> is the number of such fragments that have been reserved
for use but are currently free.

</P>
<P>
On servers for which such statistics are not available, <CODE>memory_usage()</CODE>
returns <CODE>{}</CODE>.  The compilation option <CODE>USE_GNU_MALLOC</CODE> controls
whether or not statistics are available; if the option is not provided,
statistics are not available.
</DL>

</P>
<P>
<DL>
<DT><U>Function:</U> none <B>dump_database</B> <I>()</I>
<DD><A NAME="IDX124"></A>
Requests that the server checkpoint the database at its next opportunity.  It
is not normally necessary to call this function; the server automatically
checkpoints the database at regular intervals; see the chapter on server
assumptions about the database for details.  If the programmer is not a wizard,
then <CODE>E_PERM</CODE> is raised.
</DL>

</P>
<P>
<DL>
<DT><U>Function:</U> int <B>db_disk_size</B> <I>()</I>
<DD><A NAME="IDX125"></A>
Returns the total size, in bytes, of the most recent full representation of the
database as one or more disk files.  Raises <CODE>E_QUOTA</CODE> if, for some reason,
no such on-disk representation is currently available.
</DL>

</P>
<P>
<DL>
<DT><U>Function:</U> none <B>shutdown</B> <I>([str <VAR>message</VAR>])</I>
<DD><A NAME="IDX126"></A>
Requests that the server shut itself down at its next opportunity.  Before
doing so, a notice (incorporating <VAR>message</VAR>, if provided) is printed to all
connected players.  If the programmer is not a wizard, then <CODE>E_PERM</CODE> is
raised.
</DL>

</P>
<P><HR><P>
Go to the <A HREF="ProgrammersManual_1.html">first</A>, <A HREF="ProgrammersManual_54.html">previous</A>, <A HREF="ProgrammersManual_56.html">next</A>, <A HREF="ProgrammersManual_77.html">last</A> section, <A HREF="ProgrammersManual_toc.html">table of contents</A>.
</BODY>
</HTML>