// IfsTelnetServStat.bcpl -- IFS system statistics commands
// Copyright Xerox Corporation 1980, 1981
// Last modified November 14, 1981  10:52 AM by Taft

get "Ifs.decl"
get "IfsRs.decl"

external
[
// outgoing procedures
ServStatistics

// incoming procedures
Ws; PutTemplate; LeafServStat

// incoming statics
dsp; rsQ; leafEnabled
]

//----------------------------------------------------------------------------
let ServStatistics() be
//----------------------------------------------------------------------------
[
Ws("*n*nServer connection requests:*n        Accepted  Rejected")
let rs = rsQ!0
while rs ne 0 do
   [
   PutTemplate(dsp, "*n$S$10ED$10ED",
    selecton rs>>RS.type into
      [
      case jobTypeFTP:      "FTP   "
      case jobTypeMTP:      "MTP   "
      case jobTypeTelnet:   "Telnet"
      case jobTypeCopyDisk: "CpyDsk"
      ],
    lv rs>>RS.numAccepted, lv rs>>RS.numRefused)
   rs = rs!0
   ]
if leafEnabled then LeafServStat()
]