0.9b (c) 1995 Peter Childs
The function retrieves operating statistics for a service.
Syntax
MyRc = NetGetInfo(NETSTATISTICS, 'statisticsInfo', ComputerName) MyRc = NetGetInfo(NETSTATISTICS, 'statisticsInfo', ComputerName, StatType) MyRc = NetGetInfo(NETSTATISTICS, 'statisticsInfo', ComputerName, StatType, ClearIt)
Parameters
The parameters specified are
'statisticsInfo' The REXX variable receiving the result. The variable is divided into two ways depending of the StatType parameter. If StatType = 0 then the requester statistics are provided. If StatType = 1 then the server statistics are provided. The returned values for requester statistics are:
o statisticsInfo.start
The time that statistics collection started or the date or time that the statistics were last cleared
o statisticsInfo.numNCB_r
The number of NCBs issued (redirector)
o statisticsInfo.numNCB_s
The number of NCBs issued (server)
o statisticsInfo.numNCB_a
The number of NCBs issued (application)
o statisticsInfo.fiNCB_r
The number of NCBs that failed issue (redirector)
o statisticsInfo.fiNCB_s
The number of NCBs that failed issue (server)
o statisticsInfo.fiNCB_a
The number of NCBs that failed issue (application)
o statisticsInfo.fcNCB_r
The number of NCBs that failed completion (redirector)
o statisticsInfo.fcNCB_s
The number of NCBs that failed completion (server)
o statisticsInfo.fcNCB_a
The number of NCBs that failed completion (application)
o statisticsInfo.sesstart
The number of requester sessions started
o statisticsInfo.sessfailcon
The number of requester session failures to connect
o statisticsInfo.sessbroke
The number of failures of requester sessions
o statisticsInfo.uses
The number of requester uses
o statisticsInfo.usefail
The number of requester use failures
o statisticsInfo.autorec
The number of requester autoconnects
o statisticsInfo.bytessent_r
The number of requester bytes sent to the network. The representation will be floating point if the bytes send exceeds 0xFFFFFFFF
o statisticsInfo.bytesrcvd_r
The number of requester bytes received from the network. The representation will be floating point if the bytes received exceeds 0xFFFFFFFF
o statisticsInfo.bytessent_s
The number of server bytes sent to the network. The representation will be floating point if the bytes send exceeds 0xFFFFFFFF
o statisticsInfo.bytesrcvd_s
The number of server bytes received from the network. The representation will be floating point if the bytes received exceeds 0xFFFFFFFF
o statisticsInfo.bytessent_a
The number of application bytes sent to the network. The representation will be floating point if the bytes send exceeds 0xFFFFFFFF
o statisticsInfo.bytesrcvd_a
The number of application bytes received from the network. The representation will be floating point if the bytes received exceeds 0xFFFFFFFF
o statisticsInfo.reqbufneed
The number of times the requester required a request buffer but failed
o statisticsInfo.bigbufneed
The number of times the requester required a big buffer but failed
The returned values for server statistics are:
o statisticsInfo.start
The time that statistics collection started or the date or time that the statistics were last cleared
o statisticsInfo.fopens
The number of server file opens. This includes opens of named pipes
o statisticsInfo.devopens
The number of server device opens
o statisticsInfo.jobsqueued
The number of server print jobs spooled
o statisticsInfo.sopens
The number of server session starts
o statisticsInfo.stimedout
The number of server session autodisconnects
o statisticsInfo.serrorout
The number of server sessions errored out
o statisticsInfo.pwerrors
The number of server password violations
o statisticsInfo.permerrors
The number of server access permission errors
o statisticsInfo.syserrors
The number of server system errors
o statisticsInfo.bytessent
The number of server bytes sent to the network. The representation will be floating point if the bytes send exceeds 0xFFFFFFFF
o statisticsInfo.bytesrcvd
The number of server bytes received from the network. The representation will be floating point if the bytes received exceeds 0xFFFFFFFF
o statisticsInfo.avresponse
The average server response time in milliseconds
o statisticsInfo.reqbufneed
The number of times the server required a request buffer but failed
o statisticsInfo.bigbufneed
The number of times the server required a big buffer but failed
ComputerName The server computer name
StatType Using value 0 gives requester statistics. A value 1 gives server statistics
ClearIt Using value 1 clears the statistics, otherwise no clear is done. A call to NetGetInfo(NETSTATISTICS) with 4 parameters, no clear will be done
A call to NetGetInfo(NETSTATISTICS) with 3 parameters, no clear and a call to retrieve requester information will be done
Note
The server computer name can be specified as '' for a local server or computer.
Example
/* Get statistics information */ call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs' call LoadLsRxutFuncs SrvName = '\\FSC30DCR' NETSTATISTICS = 195 REQ_STAT = 0 SRV_STAT = 1 /* Get the requester statistics */ myRc = NetGetInfo(NETSTATISTICS, 'statisticsInfo', SrvName, REQ_STAT, 10) if myRc <> '0' then do say 'Got error from NetGetInfo() ' myRc call DropLsRxutFuncs exit 9 end say say "Statistics req start: " statisticsInfo.start say "Statistics req numNCB_r: " statisticsInfo.numNCB_r say "Net Statistics numNCB_s: " statisticsInfo.numNCB_s say "Net Statistics numNCB_a: " statisticsInfo.numNCB_a say "Net Statistics fiNCB_r: " statisticsInfo.fiNCB_r say "Net Statistics fiNCB_s: " statisticsInfo.fiNCB_s say "Net Statistics fiNCB_a: " statisticsInfo.fiNCB_a say "Net Statistics fcNCB_r: " statisticsInfo.fcNCB_r say "Net Statistics fcNCB_s: " statisticsInfo.fcNCB_s say "Net Statistics fcNCB_a: " statisticsInfo.fcNCB_a say "Net Statistics sesstart: " statisticsInfo.sesstart say "Net Statistics sessfailcon: " statisticsInfo.sessfailcon say "Net Statistics sessbroke: " statisticsInfo.sessbroke say "Net Statistics uses: " statisticsInfo.uses say "Net Statistics usefail: " statisticsInfo.usefail say "Net Statistics autorec: " statisticsInfo.autorec say "Net Statistics bytessent_r: " statisticsInfo.bytessent_r say "Net Statistics bytesrcvd_r: " statisticsInfo.bytesrcvd_r say "Net Statistics bytessent_s: " statisticsInfo.bytessent_s say "Net Statistics bytesrcvd_s: " statisticsInfo.bytesrcvd_s say "Net Statistics bytessent_a: " statisticsInfo.bytessent_a say "Net Statistics bytesrcvd_a: " statisticsInfo.bytesrcvd_a say "Net Statistics reqbufneed: " statisticsInfo.reqbufneed say "Net Statistics bigbufneed: " statisticsInfo.bigbufneed /* The server statistics */ myRc = NetGetInfo(NETSTATISTICS, 'statisticsInfo', SrvName, SRV_STAT, 10) if myRc <> '0' then do say 'Got error from NetGetInfo() ' myRc call DropLsRxutFuncs exit 9 end say say "Statistics srv start: " statisticsInfo.start say "Statistics srv fopens: " statisticsInfo.fopens say "Statistics srv devopens: " statisticsInfo.devopens say "Statistics srv jobsqueued: " statisticsInfo.jobsqueued say "Statistics srv sopens: " statisticsInfo.sopens say "Statistics srv stimedout: " statisticsInfo.stimedout say "Statistics srv serrorout: " statisticsInfo.serrorout say "Statistics srv pwerrors: " statisticsInfo.pwerrors say "Statistics srv permerrors: " statisticsInfo.permerrors say "Statistics srv syserrors: " statisticsInfo.syserrors say "Statistics srv bytessent: " statisticsInfo.bytessent say "Statistics srv bytesrcvd: " statisticsInfo.bytesrcvd say "Statistics srv avresponse: " statisticsInfo.avresponse say "Statistics srv reqbufneed: " statisticsInfo.reqbufneed say "Statistics srv bigbufneed: " statisticsInfo.bigbufneed call DropLsRxutFuncs call RxFuncDrop 'LoadLsRxutFuncs' exit 0
Example Output
Statistics req start: Thu May 6 18:19:15 1993 Statistics req numNCB_r: 2213 Net Statistics numNCB_s: 31 Net Statistics numNCB_a: 1410 Net Statistics fiNCB_r: 0 Net Statistics fiNCB_s: 0 Net Statistics fiNCB_a: 0 Net Statistics fcNCB_r: 0 Net Statistics fcNCB_s: 0 Net Statistics fcNCB_a: 0 Net Statistics sesstart: 7 Net Statistics sessfailcon: 0 Net Statistics sessbroke: 3 Net Statistics uses: 23 Net Statistics usefail: 0 Net Statistics autorec: 0 Net Statistics bytessent_r: 2430724 Net Statistics bytesrcvd_r: 263720 Net Statistics bytessent_s: 320 Net Statistics bytesrcvd_s: 1019 Net Statistics bytessent_a: 73113 Net Statistics bytesrcvd_a: 90194 Net Statistics reqbufneed: 0 Net Statistics bigbufneed: 0 Statistics srv start: Thu May 6 20:19:21 1993 Statistics srv fopens: 0 Statistics srv devopens: 0 Statistics srv jobsqueued: 0 Statistics srv sopens: 2 Statistics srv stimedout: 0 Statistics srv serrorout: 0 Statistics srv pwerrors: 0 Statistics srv permerrors: 0 Statistics srv syserrors: 0 Statistics srv bytessent: 160 Statistics srv bytesrcvd: 5121 Statistics srv avresponse: 157 Statistics srv reqbufneed: 0 Statistics srv bigbufneed: 0
Inf-HTML End Run - Successful