This is a configuration for squid for using it with a non-squid parent proxy, i.e. without ICP. This makes especially sense if you want to save bandwidth.
cache_peer proxy.example.com parent 8080 0 no-query no-digest default
#cache_peer proxy.example.com parent 82 0 no-query no-digest login=user:pw
never_direct allow all
If direct fetching is not allowed due to the network structure, without never_direct allow all squid fails with “(110) Connection refused” errors. Using this line denies squid to try to fetch directly.
Other nice things:
Printing out often visited pages:
awk '{print $7}' < /var/log/squid/access.log |sort |uniq -c|sort -n|grep -vE '^ *[0-9] '
(the last grep strips off the entries with only one digit).
I found this very old command for listing the biggest cache objects at http://www.unix.org.ua/squid/FAQ-7.html:
sort -r -n +4 -5 /var/log/squid/access.log | awk '{print $5, $7}' | head -25
Here we have the first command, but for hostnames:
awk '{print $7}' < /var/log/squid/access.log |sed 's/^[a-z]*:\/\///g'|sed 's/\/.*//g'|sort |uniq -c|sort -n
Recent Comments