How to find no of occurances Finding average time?


 
Thread Tools Search this Thread
Special Forums UNIX Desktop Questions & Answers How to find no of occurances Finding average time?
# 1  
Old 02-21-2005
How to find no of occurances Finding average time?

Hi,
I have MyLog.log file, and it contains "*** response Time 150",
I want to develop Unix script like ,
1. extract all such occurances in the MyLog.log file and
2. compute the average time taken

I am new to Unix, any one can give any idea/sample code for this?
Thanks in advance.
# 2  
Old 02-21-2005
pls post a snippet from your log file containing the "times".
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need to get average idle time using mpstat

I want to get average idle time of the server using mpstat. The problem I am having is %idle is not in same columns in all the versions of linux. example 1: example 2: I tried below command as generalized solution but as Average as one less column output is not proper. I am... (1 Reply)
Discussion started by: kumarjohn
1 Replies

2. Shell Programming and Scripting

Calculate Average time of one column

Hello dears, I have a log file with records like below and want to get a average of one column based on the search of one specific keyword. 2015-02-07 08:15:28 10.102.51.100 10.112.55.101 "kevin.c" POST ... (2 Replies)
Discussion started by: Newman
2 Replies

3. Shell Programming and Scripting

Finding an average

Basically, I need to find average of numbers which are given like: sh average file1 file (in files can be more than one number) ->10 sh average 5 7 ->6 sh average /users/file ->5 echo 5 7 | sh average 6 So basically i wrote my code but it gives me error... I am pretty sure it has to work... (10 Replies)
Discussion started by: Manu1234567
10 Replies

4. Shell Programming and Scripting

Finding minimum maximum and average

I am trying to find the minimum maximum and average from one file which has values Received message from https://www.demandmatrix.net/app/dm/xml] in milliseconds. Received message from https://www.demandmatrix.net/app/dm/xml] in milliseconds. Received message from... (5 Replies)
Discussion started by: aroragaurav.84
5 Replies

5. Shell Programming and Scripting

Calculate average time using a script

Hello, I'm hoping to get some help on calculating an average time from a list of times (hour:minute:second). Here's what my list looks like right now, it will grow (I can get the full date or change the formatting of this as well): 07:55:31 09:42:00 08:09:02 09:15:23 09:27:45 09:49:26... (4 Replies)
Discussion started by: jaredhanks
4 Replies

6. UNIX for Dummies Questions & Answers

Average in awk based on time

Hi I am looking for an awk script which can compute the average of the last column based on the date and time. The file looks: site1,"2000-01-01 00:00:00", "2000-01-01 00:59:00",0.013 site2,"2000-02-01 01:00:00", "2000-02-01 01:59:00",0.035 site1,"2000-02-01 02:00:00", "2000-02-01... (15 Replies)
Discussion started by: kathy wang
15 Replies

7. UNIX for Dummies Questions & Answers

Average Time

Hi Guys, I am using a command $ runprt_req PPGUS_ROYXN1102 Output: **************** Start Date and Time End Date and Time*** PPGUS_ROYXN1102 01/15/2008 02:20:08 01/15/2008 04:54:50 PPGUS_ROYXN1102 01/12/2008 02:03:57 01/12/2008 04:22:10... (1 Reply)
Discussion started by: sambond
1 Replies

8. Shell Programming and Scripting

average transaction time

Hi all, I have large daily log file(s) that hold the times for requests and responses on different system requests. What I want to do is work out average transaction times for the day (one log = one day). The problem I'm having is figuring out how to skip rows, i've sorted the output by uniq... (2 Replies)
Discussion started by: nhatch
2 Replies

9. Shell Programming and Scripting

Find occurances of a directory and count

I am writing my first shell script to do the following: Find all occurrences of a directory from the pwd Delete the directory (which is a hidden directory) Provide feedback w/ the number of directories deleted The problems I am having are two-fold: The user may not have the appropriate... (2 Replies)
Discussion started by: stringman
2 Replies

10. Programming

Finding Average for BST

Helo guys, this is not specifically a C programming problem for the unix platform, but a problem i came across in class: Find the average for a binary search tree: typedef Struct SNode { double value; SNode *leftChild; SNode *rightChild; } as SNode; /* * Solution 1 */ ... (2 Replies)
Discussion started by: heljy
2 Replies
Login or Register to Ask a Question