Learning notes-Squid Basics

Source: Internet
Author: User
Server Proxy Cache Technology: SquidSquid uses a separate, non-module, io driver to process customer requests. The supported protocols include HTTP. FTP. SSL. WAIS simple principle: 1. structure: several disks, Several partitions, and several directories 2. query: hashtable in request Hashtable Digesttable: similar to Digest

Server Proxy Cache Technology: Squid uses a separate, non-module, I/o driver to process customer requests. The supported protocols include HTTP. FTP. SSL. WAIS simple principle: 1. structure: several disks = Several partitions = several directories 2. query: Request = hash table = Digest table = file Hash table: similar to Digest

Server Proxy Cache Technology: Squid

Squid uses a separate, non-module, I/o driver to process customer requests. The supported protocols include HTTP. FTP. SSL. WAIS.

Simple principle:

1. Structure: several disks = Several partitions = several directories

2. Query: Request = hash table = Digest table = File

Hash table: similar to outline Digest table: similar directory

3. Working Relationship: child-parent and sibling

Sibling: Neighbor Relationship

 
 
  1. Common commands:
  2. #/Usr/local/squid/sbin/squid-z // initialize the cache space
  3. Ps: there is a problem. The common problem is the directory permission problem chown-R squid: squid/cacheX
  4. #/Usr/local/squid/sbin/squid-k parse // check squid. conf syntax Configuration
  5. #/Usr/local/squid/sbin/squid-N-d1 // frontend output
  6. #/Usr/local/squid/sbin/squid-s // run in the background
  7. #/Usr/local/squid/sbin/squid-k shutdown // close the service
  8. #/Usr/local/squid/sbin/squid-k reconfigure // load the new configuration file
  9. #/Usr/local/squid/sbin/squid-k rotate round-robin logs
  10. Add squid to system startup Item
  11. Edit/etc/rc. d/rc. local
  12. Add the following lines:/usr/local/squid/sbin/squid-s
  13. # More/usr/local/squid/var/logs/access. log | grep TCP_MEM_HIT
  14. This command shows which files are cached to the memory during squid operation,
  15. And return it to the access user.
  16. # More/usr/local/squid/var/logs/access. log | grep TCP_HIT
  17. This command shows which files are cached by squid to the cache during squid operation.
  18. Directory and return it to the access user.
  19. # More/usr/local/squid/var/logs/access. log | grep TCP_MISS
  20. This command shows that some files are not cached by squid while squid is running.
  21. Is to obtain data from the original server and return it to the access user.
  22. Squid hit rate analysis
  23. Squid/bin/squidclient-p 80 mgr: info // some running status information
  24. Squid/bin/squidclient-p 80 mgr: 5 min // 5 min Information
  25. Obtain squid memory usage:
  26. Squidclient-p 80 mgr: mem
  27. # Retrieve the cached squid list:
  28. # Squidclient-p 80 mgr: objects
  29. Obtain the disk usage of squid:
  30. Squidclient-p 80 mgr: diskd
  31. Force update a url:
  32. Squidclient-p 80-mb purge http://www.xxxx.com/static. php
  33. For more information, see:
  34. Squidclient-h or squidclient-p 80 mgr:
  35. Hit rate:
  36. /Usr/local/squid/bin/squidclient-h 1.1.1.1-p80 mgr: info
  37. /Usr/local/squid/bin/squidclient-h specific IP address-p80 mgr: info

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.