Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

ns_info(3aolserv) [debian man page]

ns_info(3aolserver)					    AOLserver Built-In Commands 				       ns_info(3aolserver)

__________________________________________________________________________________________________________________________________________________

NAME
ns_info, ns_server, ns_stats - commands SYNOPSIS
ns_info address ns_info argv0 ns_info boottime ns_info builddate ns_info config ns_info home ns_info hostname ns_info interp ns_info label ns_info log ns_info name ns_info pageroot ns_info platform ns_info server ns_info tcllib ns_info uptime ns_info version ns_server option ?arg arg ...? ns_stats option ?arg arg ...? _________________________________________________________________ DESCRIPTION
ns_info boottime Returns the server boot time in seconds. ns_info config Returns the configuration file name. ns_info home Returns the directory where the AOLserver was installed. ns_info hostname Returns the name of the host on which server is running (e.g., www.myhost.com). ns_info interp Returns the number of the Tcl interpreter currently being used. ns_info label Returns the source code label for the server. If no label was used, "unlabeled" is returned. ns_info log Returns the location of the server log file (e.g., /home/myserver/log/server.log). ns_info name Returns the name of the AOLserver. It's usually "AOLserver." ns_info pageroot returns the directory containing the HTML pages for this virtual server. ns_info platform Returns the name of the platform that the server is running on (e.g., Solaris). ns_info server returns the name of this virtual server. ns_info tcllib returns the directory where the AOLserver Tcl source code resides for this virtual server. ns_info uptime returns the time in seconds that the server has been up. ns_info version returns the version of the AOLserver. SEE ALSO
nsd(1), info(n) KEYWORDS
AOLserver 4.0 ns_info(3aolserver)

Check Out this Related Man Page

Ns_TclInit(3aolserver)					   AOLserver Library Procedures 				    Ns_TclInit(3aolserver)

__________________________________________________________________________________________________________________________________________________

NAME
Ns_TclInitInterps, Ns_TclInitModule, Ns_TclInterpServer, Ns_TclLibrary - library procedures SYNOPSIS
#include "ns.h" int Ns_TclInitInterps(server, initProc, arg) Ns_TclInitModule(arg, arg) char * Ns_TclInterpServer(interp) char * Ns_TclLibrary(void) ARGUMENTS
char *server (in) Name of virtual server. Ns_TclInterpInitProc *initProc (in) Procedure to call to initialize interps. void *arg (in) Callback data to pass to initProc. Tcl_Interp *interp (in) Tcl interp to get server. _________________________________________________________________ DESCRIPTION
Ns_TclInitInterps arranges for initProc to be called on the startup initialization interp. initProc should have arguments and result that match the type Ns_TclInterpInitProc: typedef int Ns_TclInterpInitProc(Tcl_Interp *interp, void *arg); The arg parameter to initProc is a copy of the arg argument given to Ns_TclInitInterps. A typical initProc will create new commands in the given interp with Tcl_CreateCommand. The following AOLserver module example results in the msg command being in all interps. The command simply sets the "hello" static string as the interp result: static Ns_TclInterpInitProc AddCmds; static Tcl_CmdProc MsgCmd; int Ns_ModuleInit(char *server, char *module) { static char *arg = "hello"; return Ns_TclInitInterps(server, AddCmds, arg); } static int AddCmds(Tcl_Interp *interp, void *arg) { Tcl_CreateCommand(interp, "msg", MsgCmd, arg, NULL); return TCL_OK; } static int MsgCmd(ClientData arg, Tcl_Interp *interp, int argc, char **argv) { Tcl_SetResult(interp, (char *) arg, TCL_STATIC); return TCL_OK; } In AOLserver 3.x, the effect of Ns_TclInitInterps is to invoke initProc immediately on the single initializaton interp of the server and the result of Ns_TclInitInterps is the return code of initProc. The state of this interp (command, procedures) will then be copied to other interps when created via the Ns_TclAllocInterp routine. This differs from the original AOLserver 2.0 where initProc was called on each interp in an interp pool, the 2.1-2.3 behavior where initProc was called once on an interp linked to the per-server shared command tables, and the upcoming 4.0 behavior where initProc is called at interp create time. In fact, the 4.0 behavior is that of the Ns_TclReg- isterAtCreate routine. In practice, if your initProc does nothing but create commands with NULL or shared client data the effect is the same in all releases. Ns_TclInterpServer returns the virtual server in which the given interp was created. Ns_TclLibrary returns the shared Tcl library of the server installation (e.g., /usr/local/aolserver/modules/tcl). SEE ALSO
Ns_TclRegisterAtCreate(3), Ns_TclAllocInterp(3) KEYWORDS
AOLserver 4.0 Ns_TclInit(3aolserver)
Man Page