All pastes #972738 Raw Edit

Miscellany

public text v1 · immutable
·published 2008-04-05 18:05 UTC
rendered paste body
date "+%a %b %d %T %Y" > /glftpd/tmp/prebw.txt
ifstat 2 30 >> /glftpd/tmp/prebw.txt
cat /glftpd//tmp/prebw.txt|grep -v eth|grep -v KB/s|awk 'BEGIN {getline;printf $0 " PRE-BW: ";NR=0} { total += $2;if ($2 > max) max = $2;if (NR == 1 || NR == 3 || NR == 5 || NR == 10 || NR == 15 || NR ==  20 || NR == 25 || NR == 30) printf "\"%.1f\" ",$2/1024;} END { avg=total / NR; printf "\"%.1f\" \"%.1f\"\n",avg/1024,max/1024;}' >> /glftpd/ftp-data/logs/glftpd.log