LUMS Linux Question
Question Description
I’m working on a linux question and need guidance to help me learn.
The below are the entries of a log file (sample.log), where the last column (login, payment`is the service name and the last but one column (90721, 84721 `is the response time.
168.1.1.2 – – [13/Feb/2022 19:46:43] “post /xyz/abin/login HTTP/1.1” 200 604 90721 “login”
168.1.1.2 – – [13/Feb/2022 19:47:45] “post /xyz/abin/payment HTTP/1.1” 200 604 84721 “payment”
168.1.1.2 – – [13/Feb/2022 19:48:12] “post /xyz/abin/createAccount HTTP/1.1” 200 604 86721 “createAccount”
168.1.1.2 – – [13/Feb/2022 19:49:03] “post /xyz/abin/createAccount HTTP/1.1” 501 604 86420 “createAccount”
168.1.1.2 – – [13/Feb/2022 19:51:13] “post /xyz/abin/balanceCheck HTTP/1.1” 200 604 34721 “balanceCheck”
168.1.1.2 – – [13/Feb/2022 19:52:12] “post /xyz/abin/login HTTP/1.1” 404 604 90721 “login”
168.1.1.2 – – [13/Feb/2022 19:52:43] “post /xyz/abin/payment HTTP/1.1” 500 604 84602 “payment”
168.1.1.2 – – [13/Feb/2022 20:06:40] “post /xyz/abin/login HTTP/1.1” 200 604 90671 “login”
168.1.1.2 – – [13/Feb/2022 20:36:33] “post /xyz/abin/payment HTTP/1.1” 200 604 84701 “payment”
168.1.1.2 – – [13/Feb/2022 20:18:19] “post /xyz/abin/createAccount HTTP/1.1” 200 604 86521 “createAccount”
We need unix script to print following output as a table:
1) Find Average response time per each service for every minute.
2) Find number of requests per each service for every minute.
Have a similar assignment? "Place an order for your assignment and have exceptional work written by our team of experts, guaranteeing you A results."