a8a59b479d
Adding cache stats for port 80 requires a little refactoring to account for the lack of a port number in the 80/tcp (default port) proxy logs. This also slightly alters the output for the sake of keeping the script simple. Change-Id: I431a54445ff5bcb7f4a38bd30b73f00e4d7892f7
13 lines
374 B
Bash
13 lines
374 B
Bash
#!/bin/bash
|
|
for X in /var/log/apache2/${HOSTNAME}*_access.log ; do
|
|
HITS=$(grep ' cache hit ' ${X} | wc -l)
|
|
REFRESHES=$(grep ' conditional cache hit: entity refreshed ' ${X} | wc -l)
|
|
MISSES=$(grep ' cache miss: ' ${X} | wc -l)
|
|
|
|
echo "${X}"
|
|
echo "Cache Hits: $HITS"
|
|
echo "Cache Refresshes: $REFRESHES"
|
|
echo "Cache Misses: $MISSES"
|
|
echo ""
|
|
done
|