0

Does anybody know of any way to mix something like tail up with something like wc and get a scrolling "new lines per second" number? Or maybe there's a util that specifically does this?

2
Contributors
2
Replies
3
Views
12 Years
Discussion Span
Last Post by nwc
0

what do you mean new lines per second? are you looking for a rate? Example
20 newlines/second

0

what do you mean new lines per second? are you looking for a rate? Example
20 newlines/second

Exactly. So, for example, say I have a http request log, using this "whatever" tool, I can type something like this:

tail -f request.log | whatever -n 1

where -n 1 means to count the new lines every 1 second, and the output over the next 5 seconds continuing to eternity is, e.g., like this:

43
46
134
67
34
...

This output would mean that in the 1st second after I typed the command, 43 newlines were added to the request.log, in the 2nd second 46 newlines were added, in the 3rd second there was a spike of 134 newlines, etc.

Wouldn't this be cool? There's got to be a way to do this...

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.