# new builtin request

Ben Jackson (bjj@sequent.com)
Sat, 9 Sep 1995 18:51:13 PDT

- Messages sorted by:[ date ][ thread ][ subject ][ author ]

    	50"
    To: "Seth I. Rich" <sir@po.cwru.edu>
    cc: MOO-Cows.PARC@Xerox.com
    Message-ID: <199509100151.SAA16779@crg8.sequent.com>

    In message <199509080239.WAA06973@hunny.INS.CWRU.Edu> , you wrote:
    >   sys_info()
    >     => {hostname, port, database, checkpoint-database}
    >   If called with nonwizardly permissions, raises E_PERM.

    How about sys_info("key", ...) => {"value", ...}, so when you decide
    you want some other random piece of information it can be added easily.
    The BSD4.4 sysconf() is a good example (though it has integer keys).
    getkerninfo() seems to be deprecated, but had a similar model.  sysctl()
    is a read/set interface that replaced getkerninfo().  An unknown key
    would raise EINVARG.

    > Is this feasable?  Is this dumb?

    Other things that might be useful are output from things like getrusage(),
    getdtablesize(), uname(), etc.  Though uname() is probably a bad example
    of how to implement your sys_info().  :-)

    It would probably be wise to consider how the various pieces of information
    could be used against the site/machine/server and make it possible for
    "dangerous" keys to be disabled at compile time.

    --Ben