The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
add lines automatically based on a field on another file melanie_pfefer Shell Programming and Scripting 0 07-24-2008 02:59 AM
ps command - time field nhatch UNIX for Dummies Questions & Answers 1 05-12-2008 11:15 AM
generating data for 1 hour aajan Shell Programming and Scripting 0 03-17-2008 05:59 AM
Generating files with time interval of fifteen minutes aajan Shell Programming and Scripting 0 09-25-2007 01:54 AM
How To Provide Time Sync Using Nts-150 Time Server On Unix Network? pesty UNIX for Advanced & Expert Users 2 03-22-2007 02:20 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 08-20-2008
renukaprasadb renukaprasadb is offline
Registered User
  
 

Join Date: Aug 2008
Posts: 2
generating reports based on time field of network data

hi i have data extracted in the following format ranging around 300000 to 800000 records in a text file , the format is of network data .
No. Time Source Destination Protocol
1 1998-06-05 17:20:23.569905 HP_61:aa:c9 HP_61:aa:c9 LLC
2 1998-06-05 17:20:24.569709 HP_61:aa:c9 HP_61:aa:c9 LLC
3 1998-06-05 17:20:25.547310 Cisco_04:41:bc Cisco_04:41:bc LOOP
4 1998-06-05 17:20:26.068756 HP_61:aa:c9 HP_61:aa:c9 TCP
5 1998-06-05 17:20:27.068809 HP_61:aa:c9 HP_61:aa:c9 UDP
6 1998-06-05 17:20:28.069107 HP_61:aa:c9 HP_61:aa:c9 FTP
7 1998-06-05 17:20:29.068810 HP_61:aa:c9 HP_61:aa:c9 FTP
8 1998-06-05 17:20:30.069417 HP_61:aa:c9 HP_61:aa:c9 TELNET
9 1998-06-05 17:20:31.071067 HP_61:aa:c9 HP_61:aa:c9 SMTP
10 1998-06-05 17:20:32.068868 HP_61:aa:c9 HP_61:aa:c9 SMTP
11 1998-06-05 17:20:33.069603 HP_61:aa:c9 HP_61:aa:c9 TELNET
12 1998-06-05 17:20:34.070245 HP_61:aa:c9 HP_61:aa:c9 LLC
13 1998-06-05 17:20:35.069411 HP_61:aa:c9 HP_61:aa:c9 LLC
14 1998-06-05 17:20:35.547414 Cisco_04:41:bc Cisco_04:41:bc LOOP
15 1998-06-05 17:20:36.572394 HP_61:aa:c9 HP_61:aa:c9 LLC
16 1998-06-05 17:20:37.570132 HP_61:aa:c9 HP_61:aa:c9 LLC

so on ......................

i want the output in following format -- for a day --- in a fixed interval of time
i should be prompt for start date and end date , then start time and end time and duration which is HH ( hours) or MM (minutes ) or SS ( seconds) --- this is offline analysis i am making ,
what is below displayed is what i have extracted from a awk script seperately for a 10 mins duration on a certain date.... but the problem i faced is inserting columns correspondingly -- like some time in a certain duration of time there might not be any count of a certain protocol packet then that entry will not be there in that duration then i will be having trouble in using either join or paste----

so which is better ( what kind of scripting ) can any one help me to do this

also since here the missing ones are left blank -- i want to replace that with 0
since i willl be using that for further analysis ( to add or to generate graph)

ofcourse if we have fixed number of protocols with the first field then join will be easy -- but extracting that count from the initial file is what i am finding a bit tricky

could any one please help me


17:20-7:30 17:30-17:40 17:40-17:50 17:50-18:00 18:00-18:10





ARP 6 20 22 42 20 DNS
204 212 92 50 FTP
593 303 183
FTP-DATA
487 1691 131
HTTP
354 596 528 297 ICMP 2 2 2 2 2 LLC 542 456 441 489 528 LOOP 58 60 60 60 60 NTP 18 20 18 18 20 SMTP
760 1600 409 303 TCP
3333 4939 3640 2622 TELNET

55 77 36 SSL




IP




ICAP





626 6289 9939 5671 3938
  #2 (permalink)  
Old 08-20-2008
renukaprasadb renukaprasadb is offline
Registered User
  
 

Join Date: Aug 2008
Posts: 2
there is some problem while i copied the output from spreadsheet -- this looks like below

1st row is 10 seconds duration
protocol 17:20-7:30 17:30-17:40 17:40-17:50 17:50-18:00 18:00-18:10
ARP 10 20 30 15 20
UDP 7 3 50 60 44
TELNET 1000 333 333 333 333
ICMP
SMTP
DNS
NetBIOS

etc .....
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate 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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 10:48 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0