I'm reading a stream with curl and grep some highlights.
curl url | grep desired_key_word
I've noticed that curl is providing me some nice download statistics such as:
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 10.9M 0 10.9M 0 0 1008k 0 --:--:-- 0:00:11 --:--:-- 1092k
How can I save those statistics e.g. every second in a file?
I found this: http://curl.haxx.se/mail/archive-2002-11/0115.html however it was not able to abstract it to my problem.
curl -n agent.mtconnect.org/sample\?interval=0 -o xml_stream.log 2>> dl.log
The dl.log should have the statistics included, however is does not work.
Here is the unabstracted version.
curl -s -S -n http://speedtest.fremont.linode.com/100MB-fremont.bin -o /dev/null -w "%{time_total},%{size_download},%{speed_download}\n" >> stats.log
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With