ns_info - Return information about various aspects of the running NaviServer
This command provides information about the current state of the running NaviServer.
Returns the primary IP address of the hostname of this machine, or the unspecified IP address (for IPv4 "0.0.0.0", for IPv6 "::") if unable to determine.
Returns the argument vector from the invocation of nsd (excluding the first argument) in form of a list. This is similar to Tcl's $argv, but global variables in the top level namespace are cleaned up after every request.
Returns file path to executable binary
Returns the time in epoch seconds since the current server was started
Returns the date and time at which the current server was compiled, e.g.: "Jul 20 2004 at 14:57:20"
Returns all registered startup/exit/shutdown callbacks
Returns the absolute path to the configuration file used to start the server
Returns the current working directory of the server
Returns the value of gethostname(), or "localhost" if that fails
Returns information if the binary was compiled with IPv6 support.
Lists lock information from mutexes and rwlocks with their statistics. The result is returned as a list with the following elements. For each lock, the following information is returned: name, {}, unique id, number of locks, number of busy locks, total wait time, max wait time, total lock time, number of read locks, number of write locks. Not all information is available for all types of locks.
Returns the name of the error log file. The name is specified by the "serverlog" parameter in the "ns/parameters" section.
Returns the major version number.
Returns the minor version number.
Returns the current mime-type mappings.
Returns the name of the server implementation, i.e. "NaviServer".
Returns absolute path and name of the nsd binary, which is currently executed.
Returns the full version number of the server (including patch level).
Returns the process id of the running nsd process.
Returns usage info from the memory pools (returned by Tcl_GetMemoryInfo() if configured).
Returns the list of the scheduled procedures in the current process (all virtual servers). Each list element is itself a 9-element list of {id, flags, interval, nextqueue, lastqueue, laststart, lastend, procname, arg}:
id - unique id returned by the scheduling command
flags - Bitmap of one or more of:
1 -- NS_SCHED_THREAD
2 -- NS_SCHED_ONCE
4 -- NS_SCHED_DAILY
8 -- NS_SCHED_WEEKLY
16 - NS_SCHED_PAUSED
32 - NS_SCHED_RUNNING
interval - interval specification (i.e. seconds from midnight for daily schedule)
nextqueue - Next time to queue for run
lastqueue - Last time queued for run
laststart - Last time run started
lastend - Last time run finished
procname - for tasks scheduled with ns_schedule_proc this will be ns:tclschedproc and arg will be the actual scheduled Tcl script.
arg - client data
Returns the name of the current virtual server.
Returns the names of all virtual servers in the current nsd process.
Returns 1 if shutdown is pending, 0 otherwise.
Returns returns a list of all socket callbacks such as the socket listening callback for the nscp module. Each list element is itself a 4-element list like this:
{11 {read exit} nscp {127.0.0.1 9999} 0}
Returns information if the binary was compiled with OpenSSL support.
Returns 1 if the server is fully started, 0 otherwise.
Returns the most detailed revision info, which might be shipped with the tar file or obtained from the source code management system (git or mercurial).
Returns a list of all threads in the current process (all virtual servers). Each list element is itself a 7-element list of {name, parent, id, flag, ctime, procname, arg}:
name - current name of the thread
parent - parent thread name
id - id of the thread
flag - 1 if this is a detached thread, 0 otherwise
ctime - Thread creation time
procname - for conn threads this will be ns:connthread
arg - client data - for a running conn thread arg will be a 7-element list in the format returned by ns_server all - {conn id, peeraddr, state, method, url, running time, bytes sent}, where state is either "running" or "queued": {cns25 127.0.0.1 running POST /ds/shell 0.5158 0}
Returns the number of seconds since the nsd process started.
Returns the version number of the server (major and minor version number combined with a dot).