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.
0 · ·