传统部署方式:
$ awk -F '######' '/HTTP/ {++state[$5]} END {for(key in state) print state[key], key}' /path/to/access.log | sort -t ' ' -k 1 -nr | head -n 100

k8s部署方式:
$ awk -F '##' '/HTTP/ {++state[$5]} END {for(key in state) print state[key], key}' /path/to/access.log | sort -t ' ' -k 1 -nr | head -n 100

网友评论