Home Curl script for site load time monitoring
Reply: 0

Curl script for site load time monitoring

user1074
1#
user1074 Published in May 25, 2018, 11:12 am

I am pretty new to Curl and Linux and I'm having some troubles with my script. Basically what I want to do is the following:

  1. Go to a specific website and Authenticate with AD credentials.
  2. Monitor load time (how long it takes to go to the website, authenticate and load the page)
  3. Report result in text file with the date and time at the top of the request. It would be nice if a new log file could be created every day with the date as a name.
  4. Run script every 1 or 2 minutes

When testing, the date and time is showing in the bottom om the request. Also, I have noticed that the request runs very fast sometimes. I guess that is because the login has been cached or something. Could someone help me out?

Here is the script that I have been using: echo $(date) $(curl -w "@curl-format.txt" -u username:password http://website.com >> log.txt) >> log.txt

And here is the guide for the curl-format.txt file: https://blog.josephscott.org/2011/10/14/timing-details-with-curl/

Thanks

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.298958 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO