Are you allowed to use anything other than command prompt ? That will make parsing of the output easier.
Here is a possible script.
# Script ping15sec.txt
var str output, lost
while (true)
do
# Ping. Collect output into variable $output.
system "ping 132.21.21.2" > $output
# Get the lost packect count. It is after "Lost =" in $output.
stex -c -r "^Lost;=;^[" $output > $lost
stex -c -r "[^,^" $lost > null
# $lost must be "0". If not, something went wrong.
if ($lost <> "0")
do
# Do something to report error here. For now, we will just shout.
echo "LOST " $lost " PACKETS AT TIME " gettime()
done
endif
# Sleep for 60 seconds
sleep 60
done
Save the script in file C:/Scripts/ping15sec.txt, start biterscripting (
http://www.biterscripting.com ), enter the following command.
script "C:/Scripts/ping15sec.txt"