Crates.io | stream_stats |
lib.rs | stream_stats |
version | 0.1.1 |
source | src |
created_at | 2018-03-09 11:24:18.858581 |
updated_at | 2018-03-12 12:51:25.637656 |
description | Display realtime statistics from stdin. `gunzip -c foo.gz | stream_stats > foo` |
homepage | https://github.com/ddrscott/stream_stats |
repository | https://github.com/ddrscott/stream_stats |
max_upload_size | |
id | 54670 |
size | 8,886 |
Output statistics about data from stdin while redirecting the data to stdout. The statistics are bytes read, bytes read per second, lines read, lines read per second and total seconds.
# Throughput of random generator:
stream_stats < /dev/random | stream_stats > /dev/null
# => 8.0 sec | 106496 kb [ 13305.2/s ] | 426873 lines [ 53332/s ]
# Throughput of inflating a zip file:
gunzip -c /path/to/file.gz | stream_stats > /path/to/unzipped
# => 8.0 sec | 106496 kb [ 13305.2/s ] | 426873 lines [ 53332/s ]
# How many logs lines are generated:
tail -f /var/log/*.log | stream_stats
# => Thu Mar 8 07:55:49.516 SC: <airportd[179]> airportdProcessSystemConfigurationEvent: ...
# => Fri Mar 9 04:46:32.738 <kernel> GTK:
# => Fri Mar 9 04:46:32.738 [00000000] 76 32 D2 8B 48 91 05 73 67 E2 35 1C 02 EE D0 BF
# => Fri Mar 9 04:46:32.738 <kernel> installGTK: GTK installed
# 26.0 sec | 16 kb [ 0.6/s ] | 194 lines [ 7/s ]
# with log output
/var/log/httpd/access.log | stream_stats
# without log output
/var/log/httpd/access.log | stream_stats > /dev/null
# with log output
tail -f /var/log/*.log | stream_stats
Let us know how you're using this tool!
Install to local system
$ cargo install stream_stats
Bug reports and pull requests are welcome on GitHub at https://github.com/ddrscott/stream_stats.
The crate is available as open source under the terms of the MIT License.