1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168
|
<HTML><HEAD>
<TITLE>Tcl API Reference -- ns_server</TITLE>
<LINK rel=Previous href="tapi-118.htm">
<LINK rel=ToC href="toc.htm">
<LINK rel=Index href="master.htm">
<LINK rel=Next href="tapi-120.htm">
</HEAD><BODY BGCOLOR="#ffffff"><A NAME="topofpage"></A>
<TABLE WIDTH=100%>
<TR>
<TD ALIGN=LEFT>
<A NAME="topofpage"></A> <IMG SRC="as-c-sm.gif">
</TD>
<TD ALIGN=RIGHT>
<A href="tapi-118.htm"><IMG BORDER="0" src=navbprev.gif alt="[ Previous ]"></A>
<A href=toc.htm> <IMG BORDER="0" src=navbhome.gif alt="[ Contents ]"></A>
<A href=master.htm> <IMG BORDER="0" src=navbhelp.gif alt="[ Index ]"></A>
<A href="tapi-120.htm"> <IMG BORDER="0" src=navbnext.gif alt="[ Next ]"></A>
<A name="7983"> </A>
</TD>
</TR>
</TABLE>
<a name="193657">
</a><h3>ns_server</h3>
<a name="81898">
</a><h4>Overview</h4>
<p><a name="81899">
</a>Get information about the virtual server</p>
<a name="81900">
</a><h4>Syntax</h4>
<p><a name="81901">
</a><b>ns_server </b>?-server <i>servername</i>?<b> active</b> </p>
<p><a name="197343">
</a><b>ns_server </b>?-server <i>servername</i>? <b>all</b></p>
<p><a name="81902">
</a><b>ns_server </b>?-server <i>servername</i>?<b> connections</b> </p>
<p><a name="197344">
</a><b>ns_server</b> ?-server <i>servername</i>? <b>queued</b></p>
<p><a name="81903">
</a><b>ns_server </b>?-server <i>servername</i>?<b> threads</b> </p>
<p><a name="81904">
</a><b>ns_server </b>?-server <i>servername</i>?<b> verbose</b> ?on/off?</p>
<p><a name="81905">
</a><b>ns_server </b>?-server <i>servername</i>?<b> waiting</b> </p>
<a name="81906">
</a><h4>Description</h4>
<p><a name="81907">
</a><b>ns_server active</b> returns a list of lists containing information about the currently-active connections for the specified virtual server, or the current virtual server if none is specified. For each active connection, the following information is returned:<Table Border = "3">
<tr><th><p><a name="86923">
</a><b>id:</b></p>
<th><p><a name="86954">
</a>An ever-increasing number that identifies the connection.</p>
<tr><td><p><a name="86925">
</a><b>peer: </b></p>
<td><p><a name="86941">
</a>The remote address.</p>
<tr><td><p><a name="86927">
</a><b>state: </b></p>
<td><p><a name="86943">
</a>The state of the connection, one of the following:</p>
<p><a name="87014">
</a><b>queued:</b> waiting for a thread</p>
<p><a name="87015">
</a>i<b>nit:</b> thread is initializing a connection</p>
<p><a name="87016">
</a><b>request:</b> reading the request</p>
<p><a name="87017">
</a><b>authorize:</b> authorizing the request</p>
<p><a name="87018">
</a><b>running:</b> running the request</p>
<p><a name="87019">
</a><b>tcl:</b> in a Tcl script</p>
<p><a name="87023">
</a><b>traces:</b> running all trace procedures</p>
<tr><td><p><a name="86929">
</a><b>method:</b></p>
<td><p><a name="86945">
</a>The request method. If the state is before request, an asterisk "*" is shown.</p>
<tr><td><p><a name="86931">
</a><b>url:</b></p>
<td><p><a name="86947">
</a>The request URL. If the state is before request, an asterisk "*" is shown.</p>
<tr><td><p><a name="86933">
</a><b>time:</b></p>
<td><p><a name="86949">
</a>The number of seconds since the connection started.</p>
<tr><td><p><a name="197349">
</a><b>bytes:</b></p>
<td><p><a name="197351">
</a>The number of bytes sent through the connection.</p>
</Table></p>
<p><a name="197589">
</a>For example:<Table Border = "3">
<tr><th><p><a name="197562">
</a><b>id</b></p>
<th><p><a name="197564">
</a><b>peer</b></p>
<th><p><a name="197566">
</a><b>state</b></p>
<th><p><a name="197568">
</a><b>method</b></p>
<th><p><a name="197570">
</a><b>url</b></p>
<th><p><a name="197572">
</a><b>time</b></p>
<th><p><a name="197574">
</a><b>bytes</b></p>
<tr><td><p><a name="197576">
</a>3</p>
<td><p><a name="197578">
</a>128.111.100.50</p>
<td><p><a name="197580">
</a>traces</p>
<td><p><a name="197582">
</a>GET</p>
<td><p><a name="197584">
</a>/some/page.htm</p>
<td><p><a name="197586">
</a>5</p>
<td><p><a name="197588">
</a>1134</p>
</Table></p>
<p><a name="198486">
</a><b>ns_server all</b> returns the same information as <b>ns_server active</b> about both active and waiting connections for the specified virtual server, or the current virtual server if none is specified.</p>
<p><a name="198487">
</a><b>ns_server connections</b> returns the total number of connections for the specified virtual server, or the current virtual server if none is specified.</p>
<p><a name="198488">
</a><b>ns_server queued</b> returns the same information as <b>ns_server active</b> about the waiting connections for the specified virtual server, or the current virtual server if none is specified.</p>
<p><a name="198489">
</a><b>ns_server threads</b> returns a Tcl list containing the minimum number of threads, the maximum number of threads, the number of currently active threads, the number of idle threads, and the number of stopping threads for the specified virtual server, or the current virtual server if none is specified. For example:</p>
<pre> <a name="198491"></a>{min 0} {max 50} {current 2} {idle 1} {stopping 0}
</pre><p><p><a name="198492">
</a><b>ns_server verbose</b> returns 1 if the server is in verbose mode and 0 if it is not for the specified virtual server, or the current virtual server if none is specified. If "on" is specified, sets verbose mode on. If "off" is specified, sets verbose mode off.</p>
<p><a name="197595">
</a><b>ns_server waiting</b> returns the number of waiting connections for the specified virtual server, or the current virtual server if none is specified.</p>
<TABLE BORDER="2" CELLPADDING="1" width="100%">
<TR><TD COLSPAN=3><P ALIGN=Center>
<IMG SRC="bluebult.gif">
<A HREF="#topofpage">
<FONT SIZE=-1>Top of Page</FONT></A>
<IMG SRC="bluebult.gif">
</TD></TR>
<TR><TD COLSPAN=3><P ALIGN=Center>
<A href="tapi-118.htm">
<IMG BORDER="0" src=navbprev.gif alt="[ Previous ]"></A>
<A href=toc.htm>
<IMG BORDER="0" src=navbhome.gif alt="[ Contents ]"></A>
<A href=master.htm>
<IMG BORDER="0" src=navbhelp.gif alt="[ Index ]"></A>
<A href="tapi-120.htm">
<IMG BORDER="0" src=navbnext.gif alt="[ Next ]"></A>
<BR align=center>
<FONT size=-1>Copyright © 1998-99 America Online,
Inc.</FONT>
</TD></TR></TABLE></BODY></HTML>
|