[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Indlæsning af data fra log til SQL ?



Hej.

 Jeg har en logfil (med en del linier), som er formatteret i stil med:

Sep 27 16:03:11 127.0.0.1 [ 16:03:11 ] ( info ) Data ID DE56 from port 12 
(text) target yy

Det, som jeg skal bruge i min database, er dato, tids-stempel, det 
hex-decimale tal efter ID (omregnet til decimalt, hvis muligt), en 
konvertering af "(text)" til en anden konstant - samt "yy" værdien.

Jeg har forsøgt at lave lidt i bash med at hive de forskellige ting ind i 
variabler ved hjælp af awk - men det virker utroligt langsomt ...

Data skal ind i en MySQL database - men så langt er jeg ikke nået endnu, da 
jeg først skal have data-parsing'en til at fungere - og der vil MySQL 
åbenbart have dato'en i formatet YYYY-MM-DD

Skal man i gang med den store omgang perl for at få det til at lykkedes ?

/Brian




 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2006-10-01, 02:01 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *