CONTRIB: halog: sort URLs by avg bytes_read or total bytes_read
The patch attached to this mail brings ability to sort URLs by
averaged bytes read and total bytes read in HALog tool.
In most cases, bytes read is also the object size.
The purpose of this patch is to know which URL consume the most
bandwith, in average or in total.
It may be interesting as well to know the standard deviation (ecart
type in french) for some counters (like bytes_read).
The results:
- Sorting by average bytes read per URL:
./halog -uba <~/tmp/haproxy.log | column -t | head
2246 lines in, 302 lines out, 194 parsing errors
18 0 5101 283 5101 283 126573 2278327 /lib/exe/js.php
1 0 1 1 1 1 106734 106734 /wp-admin/images/screenshots/theme-customizer.png
2 0 2 1 2 1 106511 213022 /wp-admin/css/wp-admin.css
1 0 1 1 1 1 96698 96698 /wp-admin/images/screenshots/captions-1.png
1 0 1 1 1 1 73165 73165 /wp-admin/images/screenshots/flex-header-1.png
4 0 0 0 0 0 64832 259328 /cuisine/wp-content/plugins/stats/open-flash-chart.swf
1 0 0 0 0 0 48647 48647 /wp-admin/images/screenshots/flex-header-3.png
1 0 0 0 0 0 44046 44046 /wp-admin/images/screenshots/captions-2.png
1 0 1 1 1 1 38830 38830 /wp-admin/images/screenshots/flex-header-2.png
- Sorting by total bytes read per URL:
./halog -ubt <~/tmp/haproxy.log | column -t | head
2246 lines in, 302 lines out, 194 parsing errors
18 0 5101 283 5101 283 126573 2278327 /lib/exe/js.php
60 0 14387 239 14387 239 10081 604865 /lib/exe/css.php
64 2 8820 137 8819 142 7742 495524 /doku.php
14 0 250 17 250 17 24045 336632 /wp-admin/load-scripts.php
71 0 6422 90 6422 90 4048 287419 /wp-admin/
4 0 0 0 0 0 64832 259328 /cuisine/wp-content/plugins/stats/open-flash-chart.swf
2 0 2 1 2 1 106511 213022 /wp-admin/css/wp-admin.css
31 3 5423 174 5040 180 6804 210931 /index
10 0 429 42 429 42 18009 180093 /cuisine/files/2011/10/tarte_figue_amande-e1318281546905-225x300.jpg
1 file changed