Creating calculate GB in one days of logs for MLM

From cpwiki.net
Jump to: navigation, search
Check Point Profressional Services

to get log quantity for the last 24 hours(in GB on R77)...

mcd customers
# for CLM in *; do mdsenv $CLM; find $CLM/CPsuite-R77/fw1/log/*.log -mtime -1 | xargs ls -l | awk '{s+=$5} END {printf "%.0f", s; print "/1024/1024/1024"}' | bc -l; done | awk '{s+=$1} END {print s}'

get logs in GB per day for the last 7 days(R77)...

for CLM in *; do mdsenv $CLM; echo $CLM; for DAY in 1 2 3 4 5 6 7; do find $CLM/CPsuite-R77/fw1/log/*.log -mtime +`echo $DAY` -a -mtime -`expr $DAY + 2` | xargs ls -l | awk '{s+=$5} END {printf "%.0f", s; print "/1024/1024/1024"}' | bc -l; done; done