Difference between revisions of "Ns driver"

From AOLserver Wiki
Jump to navigation Jump to search
(Created page with ''''NAME''' : ns_driver - Enumerate socket drivers, open waiting sockets and get some socket driver stats '''SYNOPSIS''' : '''ns_driver list''' : '''ns_driver query''' ''driver…')
 
Line 18: Line 18:
 
: Returns a map with two keys - stats and socks.
 
: Returns a map with two keys - stats and socks.
  
: The value of stats is itself a map like this:
+
: The value of stats is itself a map of stats for the driver instance since server startup like this:
 
     time 1276409140:562735 spins 4078 accepts 192 queued 1251 reads 18034 dropped 0 overflow 0 timeout 0
 
     time 1276409140:562735 spins 4078 accepts 192 queued 1251 reads 18034 dropped 0 overflow 0 timeout 0
 +
: where time is the current time in [[ns_time]] get format, spins is the number of poll()s performed, accepts is the number of accepted NEW sockets, queued is the number of connections handed off the connection processing pool
  
: The value of socks is a list, where each element is a map but with an additional subelement (without a key) at the end, which is the 7-element list in [[ns_server]] all format.
+
: The value of socks is a list of open waiting sockets, where each element is a map but with an additional subelement (without a key) at the end, which is a 7-element list in [[ns_server]] all format, except the state will always be "i/o", url and method will "?" and what is supposed to be the running time in seconds.microseconds is instead the accept timestamp.
 
     id 55370218 sock 8432 state readwait idx 22 events 768 revents 768 accept 1276407692:663325 timeout 1276407992:663325 {55370221 124.217.238.150 i/o ? ? 1276407692.663325 0}
 
     id 55370218 sock 8432 state readwait idx 22 events 768 revents 768 accept 1276407692:663325 timeout 1276407992:663325 {55370221 124.217.238.150 i/o ? ? 1276407692.663325 0}
  
 
+
: Most of the socks information is only useful for driver debugging purposes with various internal ids and pollfd flags which are platform specific. For administering a server, the overall number of sockets in readwait (prior to connection processing) and closewait (after connection processing) states is useful. Note that only sockets that have not yet been handed over to the connection pool or sockets that have come back from a connection thread show up in this list.
 
----
 
----
  
 
[[Category:Documentation]] - [[Category:Core Tcl API]]
 
[[Category:Documentation]] - [[Category:Core Tcl API]]

Revision as of 06:47, 13 June 2010

NAME

ns_driver - Enumerate socket drivers, open waiting sockets and get some socket driver stats

SYNOPSIS

ns_driver list
ns_driver query driverInstance

DESCRIPTION

This command provides a way to examine the current socket driver stats and open waiting sockets.
  • ns_driver list
Returns a list of socket driver instances in this process which are names of the form virtualservername/module (i.e. myserver/nssock, myserver/nssock2, anotherserver/nsopenssl, etc.)
  • ns_driver query driverInstance
Returns a map with two keys - stats and socks.
The value of stats is itself a map of stats for the driver instance since server startup like this:
   time 1276409140:562735 spins 4078 accepts 192 queued 1251 reads 18034 dropped 0 overflow 0 timeout 0
where time is the current time in ns_time get format, spins is the number of poll()s performed, accepts is the number of accepted NEW sockets, queued is the number of connections handed off the connection processing pool
The value of socks is a list of open waiting sockets, where each element is a map but with an additional subelement (without a key) at the end, which is a 7-element list in ns_server all format, except the state will always be "i/o", url and method will "?" and what is supposed to be the running time in seconds.microseconds is instead the accept timestamp.
   id 55370218 sock 8432 state readwait idx 22 events 768 revents 768 accept 1276407692:663325 timeout 1276407992:663325 {55370221 124.217.238.150 i/o ? ? 1276407692.663325 0}
Most of the socks information is only useful for driver debugging purposes with various internal ids and pollfd flags which are platform specific. For administering a server, the overall number of sockets in readwait (prior to connection processing) and closewait (after connection processing) states is useful. Note that only sockets that have not yet been handed over to the connection pool or sockets that have come back from a connection thread show up in this list.

-