Mailing List Archive

problem with pfcount and cron
I cant get pfcount to output to a file when running from cron. Why is this. Below is what I am running:


Bytes=$(Pfcount -I ens33 -N 500000 2>&1 |grep Actual |awk '{print $7}' |awk -F '[\/\[]' '{print $2}' 2> /dev/null)
Avg=$(Awk '{for (i=1; i<NF; i++) sum+=$i}END{print sum/NF}' <<< ${bytes})
Echo $avg > mylogfile



This runs perfectly by hand. It does not work as a cron job. Suggestions?




This email is UNCLASSIFIED.