Ns server

From AOLserver Wiki
Revision as of 03:45, 4 October 2009 by Akhassin (talk | contribs)
Jump to navigation Jump to search

Man page: http://aolserver.com/docs/tcl/ns_server.html


NAME

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

SYNOPSIS

ns_server option ?pool?

DESCRIPTION

This command provides a way to examine the current server's connection pools and queues. The legal options (which may be abbreviated) are:
  • ns_server active ?pool?
  • ns_server all ?pool?
  • ns_server queued ?pool?
The above three options return a list of just active (i.e. running), all or just queued conn threads with each running thread a 7-element list of {conn id, peeraddr, "running", method, url, running time, bytes sent}
  • ns_server connections ?pool?
  • ns_server keepalive ?pool?
  • ns_server pools ?pool?
  • ns_server threads ?pool?
Returns a list of key-value pairs identifying the number of connection threads and what state they are currently in.
  • ns_server waiting ?pool?

NOTES

See Bug #745784 -- ns_server is not safe under load because: "The problem is either the connPtr or some of the data buried in the conn can be changing in the running connection thread. I wouldn't suggest this be fixed because it could complicate the code and introduce a performance problem."
In AOLserver 4.5, a thread race condition which could lead to a crash when using "ns_server threads" has been fixed.


EXAMPLES

   % ns_server threads
   {min 0} {max 10} {current 0} {idle 0} {stopping 0}
   % ns_server all
   {3536 192.168.0.1 running GET /_stats 0.15624 0}

SEE ALSO


-