Linux:Calculando a quantidade de acessos por hora em um servidor Apache
Script Simples para verificar a quantidade de acessos em um servidor Apache.
Pegamos esta informação do arquivo acess.log
Obs.: É necessário alterar a data
#!/bin/bash DATA="03/Dec" cat acess.log | grep $DATA | awk -F":" '{ printf $2"\n"}' > hoje.log HORARIOS="00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23" echo "Hora/Total" for h in $HORARIOS do RESULT=$(grep $h hoje.log | wc -l) echo $h";"$RESULT done