网络管理与OS X脚本实用指南
1. 网络性能分析与日志处理
在网络管理中, getstats 程序可用于构建系统网络性能的历史记录。要分析其生成的日志文件,可运行不带参数的 netperf 命令。
首先查看 .netstatlog 文件的最后三行,示例如下:
$ tail -3 /Users/taylor/.netstatlog
time=1063981801;snt=14386;re=24;rec=15700;dup=444;oo=555;creq=563;cacc=17;reto=158
time=1063982400;snt=17236;re=24;rec=20008;dup=454;oo=848;creq=570;cacc=17;reto=158
time=1063983000;snt=20364;re=24;rec=25022;dup=589;oo=1181;creq=582;cacc=17;reto=158
运行 netperf 命令后,会输出网络状态的详细信息:
$ netperf
Netstat is currently reporting the following:
52170128 packets sent, with 16927 retransmits (0%) and 2722 retransmit timeouts (0%)
20290926 pack
超级会员免费看
订阅专栏 解锁全文
1161

被折叠的 条评论
为什么被折叠?



