cat access_log | awk '{sum += $10} END {print int(sum/1024/1024),"MB"}' zcat access_log.something.gz | awk '{sum += $10} END {print int(sum/1024/1024),"MB"}'
Never been to CodeSnippets before?
Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)
Web bandwidth determination with awk (See related posts)
You need to create an account or log in to post comments to this site.
Related Posts
» showbandwidth (for TxD) in textdrive access_log bandwidth
» rsrcmeter for TxD in ruby http textdrive disk usage access_log bandwidth quota
» rsrcmeter v2 in ruby http textdrive disk usage access_log bandwidth quota
» Clearing out a bunch of spam... in find awk xargs postfix email spam spool
» View processes, grep out by ... in awk ps sysadmin grep kill
» killing your own dispatch.fcgis in awk lighttpd ruby rails
Snippets (source code soon to be available) developed by Peter Cooper and powered by Ruby On Rails