summaryrefslogtreecommitdiff
path: root/stats/calc.sh
diff options
context:
space:
mode:
authorBill <bill@billserver.senders.io>2021-04-17 10:30:46 -0400
committerBill <bill@billserver.senders.io>2021-04-17 10:30:46 -0400
commitb3bb29fb13bf40b8bf6e5eefdbc214609b8f6042 (patch)
tree08a1b0c67cf64802fe669f360dd93a36314dbc51 /stats/calc.sh
parent9b5c18c0736fd30dc13050d8e99808e016aed757 (diff)
Retention gemlog update
Diffstat (limited to 'stats/calc.sh')
-rwxr-xr-xstats/calc.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/stats/calc.sh b/stats/calc.sh
index 8734a18..4fe921c 100755
--- a/stats/calc.sh
+++ b/stats/calc.sh
@@ -16,17 +16,17 @@ echo -e " Total Reqs:\t"$(grep 'OUT' ${LOGFILE} | grep "${TODAY}" | wc -l) >>
echo -e " Gemlog Reads:\t"$(grep 'IN' ${LOGFILE} | grep "${TODAY}" | grep "gemlog" | grep "gmi" | wc -l) >> $OUTFILE
echo "Top 5 Gemlogs" >> $OUTFILE
echo "--------------" >> $OUTFILE
-grep "IN" ${LOGFILE} | grep "${TODAY}" | cut -f4 | grep "gemlog" | grep ".gmi" | sort | uniq -c | sort -rn | head -n5 >> $OUTFILE
+grep "IN" ${LOGFILE} | grep "${TODAY}" | grep -v '172.105.81.166' | cut -f4 | grep "gemlog" | grep ".gmi" | sort | uniq -c | sort -rn | head -n5 >> $OUTFILE
# Stats total
EARLIEST=$(head -n1 $LOGFILE | cut -f1)
echo "" >> $OUTFILE
-echo -e " Stats since:\t$EARLIEST" >> $OUTFILE
+echo -e " Stats since:\t$EARLIEST" >> $OUTFILE
echo -e " Total Reqs:\t"$(grep 'OUT' ${LOGFILE} | wc -l) >> $OUTFILE
echo -e " Gemlog Reads:\t"$(grep 'IN' ${LOGFILE} | grep "gemlog" | grep "gmi" | wc -l) >> $OUTFILE
echo "Top 5 Gemlogs" >> $OUTFILE
echo "--------------" >> $OUTFILE
-grep "IN" ${LOGFILE} | cut -f4 | grep "gemlog" | grep ".gmi" | sort | uniq -c | sort -rn | head -n5 >> $OUTFILE
+grep "IN" ${LOGFILE} | grep -v '172.105.81.166' | cut -f4 | grep "gemlog" | grep ".gmi" | sort | uniq -c | sort -rn | head -n5 >> $OUTFILE
# print generating timestamp
echo -e "\n// generated $(date -u -Is)" >> $OUTFILE