Apache

Port 80 check

netstat -tn 2>/dev/null|grep ':80[[:space:]]'|awk '{print $5}'|cut -f1 -d:|sort|uniq -c|sort -rn|head

Errors in a provided window

/usr/local/apache/logs/error_log

 (echo; read -p "Start time (Jan 01 00:00): " stime; read -p "End time (Jan 01 00:00): " etime; echo -e "\n\n"; awk -v s="$stime" -v e="$etime" '$0 ~ s{found=1;next} $0 ~ e{found=0}found' /usr/local/apache/logs/error_log)

Most requests in last 60 minutes

/home/*/access-logs/

(for d in `find /home/*/access-logs/ -type f`; do echo -e "$(awk -v minTime=$(date -d '60 min ago' '+%Y%m%d%H%M%S') '{split($4,t,/[[ :\/]/); mthNr = sprintf("%02d",(index("JanFebMarAprMayJunJulAugSepOctNovDec",t[3])+2)/3); curTime = t[4] mthNr t[2] t[5] t[6] t[7]} curTime >= minTime ' $d | wc -l) \t$d" ; done;) | sort -nr | egrep -v "^0 "