tcp.getStats
| Syntax |
tcp.getStats (listenRef=nil)
|
| Params |
listenRef, an optional parameter, refers to a specific listener -- for example, user.inetd.listens.["80"].ref.
|
| Action |
Gets information about current TCP connections.
|
| Returns |
A comma-delimited string.
|
| Examples |
tcp.getStats () //General stats » "6,6,0,0"
tcp.getStats (user.inetd.listens [1].ref) //Stats for a particular listener
|
| Notes |
It returns a string containing for numbers, separated by commas, indicating the number of endpoints total, idle, broken, and currently in use. If you call tcp.getStats without a parameter, it returns the stats for connections originating from Frontier via tcp.openStream. If you pass in the reference of a listener, e.g. user.inetd.listens.["80"].ref, it returns the stats for that listener. In that case, there are five numbers, representing connections total, idle, in use, waiting, and broken. Note that a listener will not be able to accept any new incoming connections as long as the number of idle endpoints is at zero. If you find that the Web server has gone deaf, you will find that the number of working endpoints is identical to the total number of endpoints and there are no idle endpoints. Also, the number of broken endpoints should almost always be at zero since there is a kernel thread running in the background that destroys broken endpoints and replaces them with fresh ones that are added to the list of idle endpoints. (An endpoint is considered to be broken if some kind of unrecoverable TCP error occurs.) This verb, new in 6.2, runs only on PowerPC Macs, on both classic and OS X.
|
| See Also |
thread.getStats
|