网络管理与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脚本分析.netstatlog文件的结果如下:
$ netperf Netstat is currently reporting the following: 52170128 packets sent, with 16927 retransmits (0%) and 2