Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
04-20-2010, 04:45 AM
|
#1
|
|
LQ Newbie
Registered: Apr 2010
Posts: 1
Rep:
|
Unix script help
Hi
I have a big log file
:08,936 DEBUG [SoapUIMultiThreadedHttpConnectionManager] HttpConnectionManager.getConnection: config =
11:39:08,936 DEBUG [SoapUIMultiThreadedHttpConnectionManager] Getting free connection,
11:39:08,989 DEBUG [SoapUIMultiThreadedHttpConnectionManager] Freeing connection, hostConfig=HostConfiguration
11:39:08,989 DEBUG [SoapUIMultiThreadedHttpConnectionManager] Notifying no-one, there are no waiting threads
11:39:09,046 INFO [SoapUILoadTestRunner] LoadTest [LoadTest 1] progress: 3.3893334E-4, 1
11:39:09,104 DEBUG [SoapUIMultiThreadedHttpConnectionManager] HttpConnectionManager.getConnection: config = HostConfiguration[, timeout = 0
11:39:09,105 DEBUG [SoapUIMultiThreadedHttpConnectionManager] Getting free connection, hostConfig=HostConfiguration[host=
11:39:09,158 DEBUG [SoapUIMultiThreadedHttpConnectionManager] Freeing connection, hostConfig=HostConfiguration[
11:39:09,159 DEBUG [SoapUIMultiThreadedHttpConnectionManager] Notifying no-one, there are no waiting threads
11:39:09,282 DEBUG [SoapUIMultiThreadedHttpConnectionManager] HttpConnectionManager.getConnection: config =
11:39:09,282 DEBUG [SoapUIMultiThreadedHttpConnectionManager] Getting free connection, hostConfig=HostConfiguration
11:39:09,335 DEBUG [SoapUIMultiThreadedHttpConnectionManager] Freeing connection, hostConfig=HostConfiguration
11:39:09,335 DEBUG [SoapUIMultiThreadedHttpConnectionManager] Notifying no-one, there are no waiting threads
I want to grep the first occurence of string "Notifying no-one, there are no waiting threads" and last occurence and calculate the count of which this string has appeared .And calculate time diffrence.
For eg
Fiest occurence
11:39:09,335 DEBUG [SoapUIMultiThreadedHttpConnectionManager] Notifying no-one, there are no waiting threads
last occurence
12:33:09,335 DEBUG [SoapUIMultiThreadedHttpConnectionManager] Notifying no-one, there are no waiting threads
Time difference is 12:33:09-11:39:09 between first occurrence and last occurrence and also count number of occurrences.
|
|
|
|
04-20-2010, 08:40 AM
|
#2
|
|
Senior Member
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,474
|
What do you have already?
|
|
|
|
04-20-2010, 09:19 AM
|
#3
|
|
Guru
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 11,799
|
Quote:
Originally Posted by javaholics
Hi
I have a big log file
I want to grep the first occurence of string "Notifying no-one, there are no waiting threads" and last occurence and calculate the count of which this string has appeared .And calculate time diffrence.
For eg
Fiest occurence
11:39:09,335 DEBUG [SoapUIMultiThreadedHttpConnectionManager] Notifying no-one, there are no waiting threads
last occurence
12:33:09,335 DEBUG [SoapUIMultiThreadedHttpConnectionManager] Notifying no-one, there are no waiting threads
Time difference is 12:33:09-11:39:09 between first occurrence and last occurrence and also count number of occurrences.
|
Great...we now know what you WANT to do. Where are you getting stuck? What have you written so far? For what version/distro of Linux??
We'll be glad to help you, but I doubt anyone is going to write your script for you. Post what you've written and where you're having a problem.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 06:56 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|