Help generate report from log files


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Help generate report from log files
# 1  
Old 08-23-2007
Question Help generate report from log files

Hi Expert,

I have some confusing to generate report from the log file as shown below:

filename :test1.log
start_time date end_time number code
P 000029.621 20070823 000029 12134567890 111111111111 00 0 000 003 0 0 0
P 000050.860 20070823 000050 12134567890 11111111111 00 1 000 003 0 0 0
P 000058.670 20070823 000058 12134567890 111111111111 00 0 000 003 0 0 0
P 000205.551 20070823 000205 12134567890 111111111111 00 1 000 003 0 0 0
P 000243.891 20070823 000243 12134567890 111111111111 00 0 000 003 0 0 0
P 000353.980 20070823 000353 12134567890 11111111111 00 0 000 003 0 0 0
P 000656.921 20070823 000656 12134567890 111111111111 00 0 000 003 0 0 0
P 001037.851 20070823 001037 12134567890 111111111111 00 1 000 003 0 0 0
P 001133.450 20070823 001133 12134567890 11111111111 00 0 000 003 0 0 0
P 001311.921 20070823 001311 12134567890 11111111111 00 0 000 004 0 0 0
P 001544.941 20070823 001544 12134567890 111111111111 00 0 000 003 0 0 0
P 001701.560 20070823 001701 12134567890 111111111111 00 1 000 003 0 0 0
P 001717.791 20070823 001717 12134567890 11111111111 00 0 000 003 0 0 0
P 001820.211 20070823 001820 12134567890 111111111111 00 0 000 003 0 0 0
P 001920.540 20070823 001920 12134567890 11111111111 00 1 000 003 0 0 0

output like this:
time success failed total
00:00 - 00:59 2 5 7
01:00 - 01:59 3 5 8
....
....
....
23:00 - 23:59
total : 5 10 15


count based on start_time(column 2) and end_time(column 4) and code(column 8) (if code "1" means success and code "0" means failed)

please help and advice

Thank you so much

Regards,

bucci

Last edited by bucci; 08-23-2007 at 07:30 AM..
# 2  
Old 08-24-2007
give more detail explaination

hi

where is your 00:00 - 00:59 and 01:00 - 01:59 come ffom?

It seems there is no relationship between them and the column2 and column4.

Pls give more detail infomation or rectify your type error.
# 3  
Old 08-24-2007
Hi summer,

00:00 - 00:59 from please see bold area (start_time and end_time for each row)

P 000029.621 20070823 000029 12134567890 111111111111 00 0 000 003 0 0 0
P 000050.860 20070823 000050 12134567890 11111111111 00 1 000 003 0 0 0
P 000058.670 20070823 000058 12134567890 111111111111 00 0 000 003 0 0 0
P 000205.551 20070823 000205 12134567890 111111111111 00 1 000 003 0 0 0
P 000243.891 20070823 000243 12134567890 111111111111 00 0 000 003 0 0 0
P 000353.980 20070823 000353 12134567890 11111111111 00 0 000 003 0 0 0
P 000656.921 20070823 000656 12134567890 111111111111 00 0 000 003 0 0 0

please advice

Thank you

Quote:
Originally Posted by summer_cherry
hi

where is your 00:00 - 00:59 and 01:00 - 01:59 come ffom?

It seems there is no relationship between them and the column2 and column4.

Pls give more detail infomation or rectify your type error.
# 4  
Old 08-24-2007
bucci, what is exactly the format of the strings start_time and end_time?

For example, what does "000029.621" mean? How can we extract the hour/minutes from this? Could you please explain the details, your request is difficult to understand Smilie
# 5  
Old 08-24-2007
Hi robotronic,

the exactly format is hhmmss --> 000029, don't care about .621

Please advice

Thank you

Quote:
Originally Posted by robotronic
bucci, what is exactly the format of the strings start_time and end_time?

For example, what does "000029.621" mean? How can we extract the hour/minutes from this? Could you please explain the details, your request is difficult to understand Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

awk use to generate report

Hi , In a directory list of ddl files are stored in the given format above. Above is the sample ddl file. The ddl file name is same as that of table name ie email_notifications.ddl I want to generate below report using awk utility reading all the ddl files stored in /ddl path Desired output:... (1 Reply)
Discussion started by: vedanta
1 Replies

2. Shell Programming and Scripting

Shell script to generate report for each user ?

I have 3 user in my linux machine let's say a,b,c .By Using last command I am able to identify list of last logged in user and by w command who is logged in and what they are doing and by history command all command used by particular user all will be shown. Now I want to write shell script... (1 Reply)
Discussion started by: beingswarupmall
1 Replies

3. Shell Programming and Scripting

Generate a Summary report

Hi All, Script to meet my requirement might be simpler for UINIX experts.. :) I need to generate an summary report in .txt file using shell script I have Reject directory in Unix server which contains all reject files for three diff categories- Presentation, Chapter and Scene Following... (3 Replies)
Discussion started by: Sakthikalluri
3 Replies

4. Shell Programming and Scripting

Generate a Execution time reports using log files.

Hi Experts, I am having a requirement, where i need to generate a report of the execution time of all the processes. All the processes generate the log files in a log directory and I can get the execution time from the log files. like below is the log file. /home/vikas/log >ls -l... (2 Replies)
Discussion started by: k_vikash
2 Replies

5. Shell Programming and Scripting

Need a script that generate a report from a combined sudoers

Hello Gurus Is anyone aware of a script/utility that can be used to generate a report from a combined "sudoers" file for more than 100 servers in one go please? Basic query: Which particular user or an user group can execute root equivalent commands or has the ability for e.g. to do a... (1 Reply)
Discussion started by: kapil514
1 Replies

6. Shell Programming and Scripting

generate report based on data in files.

Hi All, I need to develop a shell script which does sanity check of a data file, as below. 1. For DATE columns, it should check if date is given in proper format or not? For example, if format of date is expected as DD-MON-YYYY HH24:MI:SS and we received the date in formation like DDMMYYYY HH24,... (1 Reply)
Discussion started by: ace_friends22
1 Replies

7. Shell Programming and Scripting

generate a report

I am trying to generate a report for a file called phone_book awk -f {phone_book} why does this not work? Nothing happens at all. (2 Replies)
Discussion started by: gustave
2 Replies

8. AIX

Re-Generate error report

Hi Is there a way to re-generate AIX error report after clearing it? I mean if I did errclear 0, Does the error log get erased? Is there a command that will get entries back in errpt? I hope that made sense. (5 Replies)
Discussion started by: Dardeer
5 Replies

9. Shell Programming and Scripting

generate a report

Hi Please help me to resolve the below query. My shell script has generated a file output.file like below ******************************** DROP TABLE GPS_CONTACT_DETAILS DB20000I The SQL command completed successfully. CREATE TABLE GPS_CONTACT_DETAILS ( CONTACT_ID ... (8 Replies)
Discussion started by: sailaja_80
8 Replies

10. Shell Programming and Scripting

Generate report in HTML file from Oracle DB

Hi Team, I need a suggestion/comments for my below requirement. I have a procedure which performs some DDL operations & loads data into a Oracle table. This status contains Audit data. What i wanted to do is, once the procedure is completed (daily), shell script should retrive the data from the... (4 Replies)
Discussion started by: Amit.Sagpariya
4 Replies
Login or Register to Ask a Question