3. NCP 统计
会上可以看出,已有若干站点出于好奇对各自的 NCP 做了检测埋点。其中,林肯实验室(360/67)的 Joel Winett 对本地 TELNET 用户发起的所有连接都做了检测,按连接收集如下统计信息:
a) Network connect time
b) NCP CPU time
c) Number of reads or writes on connection
d) Time stamps on:
first RFC, last RFC, first close, last close.
e) Number of messages and bits transmitted
f) Log of errors sent or received
MULTICS 则汇总统计收发的常规(类型 0)报文数量,以及收发的非常规(非类型 0)报文数量。
NWG 同意实现一套最小化的 NCP 检测流程,在某个标准的 24 小时周期(例如本地午夜到次日本地午夜)内,按 HOST 收集以下数据:
a. Total bits sent to HOST
b. Total bits received from HOST
c. Total messages sent to HOST
d. Total messages received from HOST and optionally
e. Average Round Trip delay on send connections to HOST
上述信息只应针对标准的已打开连接(即使用标准 NCP 协议的连接)收集,不包括测量链路或实验性 NCP 链路,尤其不包括链路 0 上的流量。
另一项可选测量是收集链路 0 上所有 HOST 的报文类型分布(即不按 HOST 细分)。这将揭示控制报文的相对使用情况(ALLOC 应当非常普遍)。
最近一个 24 小时采样周期所收集的数据,应能从某个进程获取;该进程的知名套接字号(待定)支持 ICP,并将生成如下格式的报文:
16 16
+----------+------------+
word 0 | Day # | Time |
+----------+------------+
| |
1 - 365 (6 on leap year) |______
|
Time in minutes at which sample was
started. Ranges from 0 (midnight) to 1439.
8 8
+--------+------+-------+----------+
word 1 | Source | Byte | N | Format |
| Host | Size | | |
+--------+------+-------+----------+
| | | |_____________
___________| | | |
| | | |
Network | | +-----+-----+--+--+--+--+
Host number | | | | |C |R |B |M |
| | +-----+-----+--+--+--+--+
| | | | | |
| | | | | message
| number of HOST | | | statistics
| related entries | | |
| in message | | |__byte
| | | statistics
| | |
number of bits per | |__average
byte in byte statistics | round-trip
| time
|
|__control
message
distribution
报文其余各字的内容取决于 Format 字节的设置:
<-------32--------->
+---------------------+
| Foreign HOST # | always present
/ +---------------------+
| | messages received | if FORMAT bit M set
| +---------------------+
| | Bytes received | if FORMAT bit B set
N of these | +---------------------+
entries | | message sent | if FORMAT bit M set
| +---------------------+
| | Bytes sent | if FORMAT bit B set
| +---------------------+
\ | Average delay | if FORMAT bit R set
+---------------------+
This is average RFNM
delay in milliseconds
8 24
+-------+---------------+
| type | Count | if FORMAT bit C set these
+-------+---------------+ are link 0 control message
| | | distributions for the
+-------+---------------+ sample period, cumulative
| | | over all HOSTs. If a type is
+-------+---------------+ not present, its count is
| | | assumed to be 0.
+-------+---------------+
| | |
+-------+---------------+
| . | . |
. .
. .
+-------+---------------+
|type | Count |
+-------+---------------+
发送这些统计数据的进程将持续发送,直到整个统计样本传完,然后关闭两条连接。发起初始连接的进程应在有空间时持续分配空间,直到收到针对这些已打开连接的关闭请求,然后以相应的关闭作答。发送进程在收到其所要发送的最后一条报文的 RFNM 之前不应关闭连接。