[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.4.8 Server Statistics and Miscellaneous Information

Function: str server_version ()
Returns a string giving the version number of the running MOO server.

Function: list memory_usage ()
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:

{block-size, nused, nfree}

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

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

Function: int db_disk_size ()
Returns the total size, in bytes, of the most recent full representation of the database as one or more disk files. Raises E_QUOTA if, for some reason, no such on-disk representation is currently available.

Function: list verb_cache_stats ()
Function: none log_cache_stats ()
As of version 1.8.1, the server caches verbname-to-program lookups to improve performance. These functions respectively return or write to the server log file the current cache statistics. For verb_cache_stats the return value will be a list of the form

{hits, negative_hits, misses, table_clears, histogram},

though this may change in future server releases. The cache is invalidated by any builtin function call that may have an effect on verb lookups (e.g., delete_verb()).

This document was generated on September, 30 2008 using texi2html