Merge "Update cache-stats.sh to include the port 80 proxy"

This commit is contained in:
Zuul 2018-09-25 19:43:41 +00:00 committed by Gerrit Code Review
commit 45c427838a
1 changed files with 8 additions and 7 deletions

View File

@ -1,11 +1,12 @@
#!/bin/bash
for X in 0 1 2 ; do
HITS=$(grep ' cache hit ' /var/log/apache2/${HOSTNAME}*_808${X}_access.log | wc -l)
REFRESHES=$(grep ' conditional cache hit: entity refreshed ' /var/log/apache2/${HOSTNAME}*_808${X}_access.log | wc -l)
MISSES=$(grep ' cache miss: ' /var/log/apache2/${HOSTNAME}*_808${X}_access.log | wc -l)
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 "Port 808${X} Cache Hits: $HITS"
echo "Port 808${X} Cache Refresshes: $REFRESHES"
echo "Port 808${X} Cache Misses: $MISSES"
echo "${X}"
echo "Cache Hits: $HITS"
echo "Cache Refresshes: $REFRESHES"
echo "Cache Misses: $MISSES"
echo ""
done