Squid Proxy Statistics Monitoring Script for Bash Console

Install Instructions

Step 1

Save the following into a file named “squidstats” in the /usr/sbin/ directory

#Start of Script

#!/bin/bash
while :
do
squidclient -h 127.0.0.1 -p 8080 mgr:info|grep its
squidclient -h 127.0.0.1 -p 8080 mgr:info|grep ‘Storage Mem’
squidclient -h 127.0.0.1 -p 8080 mgr:info|grep StoreEntries

# echo “Press [CTRL+C] to stop..”
sleep 15
clear
done

# End of Script

Step 2

Chmod +x /usr/sbin/squidstats

Step 3

Install and Enable squid cachemanager

http://wiki.squid-cache.org/Features/CacheManager

http://www.comfsm.fm/computing/squid/FAQ-9.html




Facebooktwittergoogle_plusredditpinterestlinkedinmail