RSS Forums RSS
Please support our Shell Scripting advertiser: Programming Forums
Views: 1650 | Replies: 2
Reply
Join Date: Jul 2005
Posts: 4
Reputation: nwc is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
nwc nwc is offline Offline
Newbie Poster

how to get appended lines per second?

  #1  
Jul 21st, 2005
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?
AddThis Social Bookmark Button
Reply With Quote  
Join Date: May 2005
Posts: 215
Reputation: shanenin is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
shanenin shanenin is offline Offline
Posting Whiz in Training

Re: how to get appended lines per second?

  #2  
Jul 22nd, 2005
what do you mean new lines per second? are you looking for a rate? Example
20 newlines/second
Reply With Quote  
Join Date: Jul 2005
Posts: 4
Reputation: nwc is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
nwc nwc is offline Offline
Newbie Poster

Re: how to get appended lines per second?

  #3  
Jul 22nd, 2005
Originally Posted by shanenin
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...
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 12:17 am.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC