NaviServer - programmable web server

[ Main Table Of Contents | Table Of Contents | Keyword Index ]

# ns_server(n) 4.99.8 naviserver "NaviServer Built-in Commands"

## Name

ns_server - Get state of the server's connection pools and queues

## Table Of Contents

## Synopsis

- ns_server ?-server s? filters
- ns_server ?-server s? pagedir
- ns_server ?-server s? pools
- ns_server ?-server s? requestprocs
- ns_server ?-server s? serverdir
- ns_server ?-server s? tcllib
- ns_server ?-server s? traces
- ns_server ?-server s? url2file
- ns_server ?-server s? ?-pool p? active
- ns_server ?-server s? ?-pool p? all
- ns_server ?-server s? ?-pool p? queued
- ns_server ?-server s? ?-pool p? connections
- ns_server ?-server s? ?-pool p? maxthreads ?value?
- ns_server ?-server s? ?-pool p? minthreads ?value?
- ns_server ?-server s? ?-pool p? stats
- ns_server ?-server s? ?-pool p? threads
- ns_server ?-server s? ?-pool p? waiting

## Description

This command provides a way to examine the current server's connection pools and queues. The legal options (which may be abbreviated) are:

## COMMANDS

ns_server ?-server s? filters

  Returns a list of the currently defined filters.

ns_server ?-server s? pagedir

  Returns the path of the virtual server's page directory root.

ns_server ?-server s? pools

  Returns a list of the pools defined for this server.

ns_server ?-server s? requestprocs

  Returns a list of the currently defined requestprocs (the registered procs for certain request patterns).

ns_server ?-server s? serverdir

  Returns the path of the virtual server's base directory.

ns_server ?-server s? tcllib

  Returns the path of the virtual server's private Tcl library.

ns_server ?-server s? traces

  Returns a list of the currently defined traces.

ns_server ?-server s? url2file

  Returns a list of the mappings from urls to files.

ns_server ?-server s? ?-pool p? active
ns_server ?-server s? ?-pool p? all
ns_server ?-server s? ?-pool p? queued

  These three commands return information about queued or running requests. For every request the command returns a list containing connection id, the peer address, state ("running" or "queued"), the request (HTTP method and url), running time, and bytes sent. The subcommand all returns the union of the running and queued requests.

ns_server ?-server s? ?-pool p? connections

  Returns the number of connection requests processed by this pool since startup.

ns_server ?-server s? ?-pool p? maxthreads ?value?

  Query or set the maximum number of connection threads for this server and pool. The value must be large than minthreads and less than the maximum number of connections.

ns_server ?-server s? ?-pool p? minthreads ?value?

  Query or set the minimum number of connection threads for this server and pool. The value must be between 1 and maxthreads.

ns_server ?-server s? ?-pool p? stats

  Returns a list of attribute value pairs containing statistics for the server and pool, containing the number of requests, queued requests, cumulative times.

ns_server ?-server s? ?-pool p? threads

  Returns a list of attribute value pairs containg information about the number of connection threads for the server and pool.

ns_server ?-server s? ?-pool p? waiting

  Returns the number of connections waiting to be processed.

## OPTIONS

-server s

  Specifies the (virtual) server to be queried. If this option is not specified, the current server is used as a source.

-pool p

  Specifies the pool to be queried. If this option is not specified, the default pool of the server is used as a source.