Test adding a new domain name to the squid Node

Source: Internet
Author: User

The squid node adds a new domain name to test whether the cache is successful.

1 #! /Bin/bash 2 #2014-8-1 3 4 clear # Clear the screen to view the results 5 6 url = * # the URL to be tested 7 8 array_node [0] = "*" # Make it a node IP Address an associated array 9 array_node [1] = "*" 10 array_node [2] = "*" 11 array_node [3] = "*" 12 array_node [4] = "*" 13 array_node [5] = "*" 14 array_node [6] = "*" 15 array_node [7] = "*" 16 array_node [8] = "*" 17 array_node [9] = "*" 18 array_node [10] = "*" 19 array_node [11] = "*" 20 array_node [12] = "*" 21 array_node [13] = "*" 22 array_node [14] = "*" 23 array_node [15] = "*" 24 array_node [16] = "*" 25 array_node [17] = "*" 26 27 for I in $ {array_node [*]} 28 do29 printf "$ (++ n )): % s \ n "$ (curl-s-I-h" Host: $ URL "$ I | grep X-Cache | cut-C 10 -) "# curl-I only outputs the header information-H specifies that the host-s quiet mode outputs the type progress bar information after the-s pipeline is not available. The output is messy. 30 done

 

 

1 output result 2 3 1: Miss from * 4 2: Miss from * 5 3: Miss from * 6 4: Miss from * 7 5: Miss from * 8 6: miss from * 9 7: Miss from * 10 8: Miss from * 11 9: Miss from * 12 10: Miss from * 13 11: Miss from * 14 12: miss from * 15 13: Miss from * 16 14: Miss from * 17 15: Miss from * 18 16: Miss from * 19 17: Miss from * 20 18: Miss from *

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.