Welcome to the new platform of Programmers Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use it's exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
I'm trying to write a script that will fping several hundred hosts at a time to get packet loss statistics. I'm using the -q argument to run the command in quiet mode and only get the overall packet loss on 100 packets sent to each host.
The problem I'm running into is that I'm piping to output to a file, and the summary information doesn't get sent. Even running the following produces only an empty file: fping -e -c 5 -q www.yahoo.com www.lycos.com www.google.com > test.txt. Omitting the -q tag does output the individual packet information to the text file, but not the summary information.
Anyone have any ideas on how I can capture the summary data in a file? This was attempted with a shell script. I also tried writing a perl script with
`fping -e -c 5 -q www.yahoo.com`;
print `fping -e -c 5 -q www.yahoo.com`;
and piped the output of the perl script to a file, to no avail.