Consider the following scenario where the last filed of each line is basically the time taken to server a request by the app server – in our case it is ( say time=400ms). Now I want to see those lines which takes more than 400ms to server the request – here is the trick
cat prod_debug.log | grep ‘PROFILER’ | awk ‘{ sub(/time=/,”");print}’ | awk ‘{sub(/ms/,”");print}’ | awk ‘$NF>400′
Advertisement