网络监控器 小型ruby脚本可运行ping 60秒并评估丢失百分比并记录结果。 If the loss percentage is 0 Log basic stats Sleep for 4 mins If the loss percentage is less than 10 percent Log basic stats Immediately repeat ping monitoring If the loss percentage greater than 10 percent Log all the output from ping Immediately repeat ping monitoring 用法 Rubynetwork_monitor.rb 作为一个独立的过程: ruby network_monitor.rb> / dev / null& 输