Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

How can I get details of the page that taking more than 10000 sec.

15:39:22,507NTP=/a/file/fname.pageTime=20559
15:40:10,811NTP=a/file/fname.pageTime=134
15:42:24,488NTP=a/file/fname.pageTime=10153
15:42:24,488NTP=a/file/fname.pageTime=10000
15:42:24,488NTP=a/file/fname.pageTime=101

I want to Out put as below as it is taking more than 10000 sec:

15:39:22,507NTP=/a/file/fname.pageTime=20559
15:42:24,488NTP=a/file/fname.pageTime=10153
share|improve this question

2 Answers 2

up vote 1 down vote accepted

I know you said "grep", but here's an awk variation anyway. Try

awk -F 'pageTime=' '{ if ($2 > 10000) print $0 }' /path/to/your/logfile
share|improve this answer

If your datas are from a file named file : egrep '=[0-9]{5}' file In this case you will have the 10000s too (as it have 5 digits)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.