Calculating Transactions Per Minute from log file entries

Here’s a linux command I found useful in extracting simple transactions per minute from log file entries

grep -h 'Unique text per transaction' requests.log.* | cut -c1-16 | uniq -c | sed s/./,/8 > transactions_per_minute.csv

This produces a file with the number of transactions/requests for each minute over time: e.g.

34,2017-03-29 11:45
83,2017-03-29 11:46
114,2017-03-29 11:47
84,2017-03-29 11:48
70,2017-03-29 11:49
64,2017-03-29 11:50
76,2017-03-29 11:51

You can now convert this into a visually revealing graph, using for example Google Sheets e.g.

Leave a Reply

Your email address will not be published. Required fields are marked *