Merge "Add script to grab cache stats on mirrors"

This commit is contained in:
Zuul 2018-07-05 21:46:59 +00:00 committed by Gerrit Code Review
commit 4a5bb85268
1 changed files with 11 additions and 0 deletions

View File

@ -0,0 +1,11 @@
#!/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)
echo "Port 808${X} Cache Hits: $HITS"
echo "Port 808${X} Cache Refresshes: $REFRESHES"
echo "Port 808${X} Cache Misses: $MISSES"
echo ""
done