IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Langage Perl Discussion :

extraire des infos d'un fichier log et les importer à une base oracle


Sujet :

Langage Perl

  1. #1
    Membre à l'essai
    Inscrit en
    Mars 2009
    Messages
    8
    Détails du profil
    Informations forums :
    Inscription : Mars 2009
    Messages : 8
    Points : 10
    Points
    10
    Par défaut extraire des infos d'un fichier log et les importer à une base oracle
    je voudrais extraire des données d'un fichier log et les mettres dans une BD oracle mais voila il faudrait que je filtre les lignes de mon fichier log
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    06-09-2010 00:00:01,706 [PollingThread-jc{10.0.0.1:8080,plain}] DEBUG yd - Polling for resource jc{10.0.0.1:8080,plain}
    06-09-2010 00:00:01,862 [HttpProxyServer-thread-169] DEBUG ad - Reading complete
    06-09-2010 00:00:01,862 [HttpProxyServer-thread-169] DEBUG ad - Releasing buffer
    06-09-2010 00:00:01,862 [HttpProxyServer-thread-169] DEBUG ad - Buffer released
    06-09-2010 00:00:01,862 [HttpProxyServer-thread-169] DEBUG ad - Shutting down output
    06-09-2010 00:00:01,862 [HttpProxyServer-thread-169] DEBUG ad - Output shut down
    06-09-2010 00:00:01,862 [HttpProxyServer-thread-169] DEBUG ad - Semaphore released, thread ending
    06-09-2010 00:00:01,862 [HttpProxyServer-thread-159] DEBUG ad - Threads have completed
    06-09-2010 00:00:01,862 [HttpProxyServer-thread-159] DEBUG ad - Semaphore released
    06-09-2010 00:00:01,862 [HttpProxyServer-thread-159] DEBUG ad - All closed
    06-09-2010 00:00:01,862 [HttpProxyServer-thread-159]  INFO pb - DONE: contentLength=16868
    06-09-2010 00:00:01,893 [HttpProxyServer-thread-155]  INFO pb - SETUP_CONNECTION: client=Socket[addr=/10.215.60.3,port=4457,localport=8080]
    06-09-2010 00:00:01,909 [HttpProxyServer-thread-155]  INFO pb - STORE_REQUEST_LINE (before) :CONNECT www.google.com:443 HTTP/1.0
    06-09-2010 00:00:01,909 [HttpProxyServer-thread-155]  INFO pb - STORE_REQUEST_HEADERS. Content-Length=0
    06-09-2010 00:00:01,909 [HttpProxyServer-thread-155]  INFO pb - DONE: contentLength=0
    06-09-2010 00:00:02,752 [PollingThread-jc{10.0.0.1:8080,plain}] DEBUG nc - Resource failed jc{10.0.0.1:8080,plain}
    06-09-2010 00:00:03,737 [HttpProxyServer-thread-157]  INFO pb - SETUP_CONNECTION: client=Socket[addr=/10.215.60.139,port=4084,localport=8080]
    06-09-2010 00:00:03,737 [HttpProxyServer-thread-157]  INFO pb - STORE_REQUEST_LINE (before) :CONNECT talk.google.com:443 HTTP/1.0
    06-09-2010 00:00:03,737 [HttpProxyServer-thread-157]  INFO pb - STORE_REQUEST_HEADERS. Content-Length=0
    06-09-2010 00:00:03,737 [HttpProxyServer-thread-157]  INFO pb - STORE_REQUEST_LINE (before) :CONNECT talk.google.com:443 HTTP/1.0
    06-09-2010 00:00:03,737 [HttpProxyServer-thread-157]  INFO pb - STORE_REQUEST_HEADERS. Content-Length=0
    06-09-2010 00:00:03,737 [HttpProxyServer-thread-157]  INFO pb - STORE_REQUEST_LINE (before) :CONNECT talk.google.com:443 HTTP/1.0
    06-09-2010 00:00:03,737 [HttpProxyServer-thread-157]  INFO pb - STORE_REQUEST_HEADERS. Content-Length=0
    06-09-2010 00:00:03,737 [HttpProxyServer-thread-157] DEBUG nc - Do action called
    06-09-2010 00:00:03,799 [HttpProxyServer-thread-157] DEBUG nc - Resource succeeded jc{proxy50.scansafe.net:8080,plain}
    06-09-2010 00:00:03,799 [HttpProxyServer-thread-157] DEBUG jd - 3DES Encryption took 0 ms
    06-09-2010 00:00:03,799 [HttpProxyServer-thread-157]  INFO sb - REQMOD : CONNECT talk.google.com:443 HTTP/1.0
    06-09-2010 00:00:03,799 [HttpProxyServer-thread-157] DEBUG ad - Tunnelling...
    06-09-2010 00:00:03,799 [HttpProxyServer-thread-157] DEBUG ad - Getting buffer...
    06-09-2010 00:00:03,799 [HttpProxyServer-thread-157] DEBUG ad - Acquiring semaphore...
    06-09-2010 00:00:03,799 [HttpProxyServer-thread-157] DEBUG ad - Semaphore acquired.
    06-09-2010 00:00:03,799 [HttpProxyServer-thread-157] DEBUG ad - Getting buffer...
    06-09-2010 00:00:03,799 [HttpProxyServer-thread-157] DEBUG ad - Acquiring semaphore...
    06-09-2010 00:00:03,799 [HttpProxyServer-thread-157] DEBUG ad - Semaphore acquired.
    06-09-2010 00:00:03,799 [HttpProxyServer-thread-157] DEBUG ad - Threads have been kicked off, waiting for completion
    06-09-2010 00:00:03,799 [HttpProxyServer-thread-15] DEBUG ad - Task starting
    06-09-2010 00:00:03,799 [HttpProxyServer-thread-5] DEBUG ad - Task starting
    06-09-2010 00:00:04,002 [HttpProxyServer-thread-145]  INFO pb - DONE: contentLength=0
    06-09-2010 00:00:05,752 [PollingThread-jc{10.0.0.1:8080,plain}] DEBUG yd - Polling for resource jc{10.0.0.1:8080,plain}
    06-09-2010 00:00:06,143 [HttpProxyServer-thread-42]  INFO pb - SETUP_CONNECTION: client=Socket[addr=/10.215.60.139,port=4085,localport=8080]
    06-09-2010 00:00:06,143 [HttpProxyServer-thread-42]  INFO pb - STORE_REQUEST_LINE (before) :GET http://tools.google.com/googletalk/google-talk-versioncheck.txt?auv=1&r=4&up=30&p=w&ma=5&mi=1&b=2600&sp=ServicePack3&as=googletalk&pv=1.0.0.104 HTTP/1.0
    06-09-2010 00:00:06,143 [HttpProxyServer-thread-42]  INFO pb - STORE_REQUEST_HEADERS. Content-Length=0
    06-09-2010 00:00:06,143 [HttpProxyServer-thread-39]  INFO pb - SETUP_CONNECTION: client=Socket[addr=/10.215.60.139,port=4086,localport=8080]
    06-09-2010 00:00:06,143 [HttpProxyServer-thread-39]  INFO pb - STORE_REQUEST_LINE (before) :GET http://filetransferenabled.mail.google.com/images/cleardot.gif HTTP/1.0
    06-09-2010 00:00:06,143 [HttpProxyServer-thread-39]  INFO pb - STORE_REQUEST_HEADERS. Content-Length=0
    06-09-2010 00:00:06,143 [HttpProxyServer-thread-39]  INFO pb - STORE_REQUEST_LINE (before) :GET http://filetransferenabled.mail.google.com/images/cleardot.gif HTTP/1.0
    06-09-2010 00:00:06,143 [HttpProxyServer-thread-39]  INFO pb - STORE_REQUEST_HEADERS. Content-Length=0
    06-09-2010 00:00:06,143 [HttpProxyServer-thread-42]  INFO pb - STORE_REQUEST_LINE (before) :GET http://tools.google.com/googletalk/google-talk-versioncheck.txt?auv=1&r=4&up=30&p=w&ma=5&mi=1&b=2600&sp=ServicePack3&as=googletalk&pv=1.0.0.104 HTTP/1.0
    06-09-2010 00:00:06,143 [HttpProxyServer-thread-42]  INFO pb - STORE_REQUEST_HEADERS. Content-Length=0
    06-09-2010 00:00:06,143 [HttpProxyServer-thread-39]  INFO pb - STORE_REQUEST_LINE (before) :GET http://filetransferenabled.mail.google.com/images/cleardot.gif HTTP/1.0
    06-09-2010 00:00:06,143 [HttpProxyServer-thread-39]  INFO pb - STORE_REQUEST_HEADERS. Content-Length=0
    06-09-2010 00:00:06,143 [HttpProxyServer-thread-39] DEBUG nc - Do action called
    06-09-2010 00:00:06,159 [HttpProxyServer-thread-42]  INFO pb - STORE_REQUEST_LINE (before) :GET http://tools.google.com/googletalk/google-talk-versioncheck.txt?auv=1&r=4&up=30&p=w&ma=5&mi=1&b=2600&sp=ServicePack3&as=googletalk&pv=1.0.0.104 HTTP/1.0
    06-09-2010 00:00:06,159 [HttpProxyServer-thread-42]  INFO pb - STORE_REQUEST_HEADERS. Content-Length=0
    06-09-2010 00:00:06,159 [HttpProxyServer-thread-42] DEBUG nc - Do action called
    06-09-2010 00:00:06,206 [HttpProxyServer-thread-39] DEBUG nc - Resource succeeded jc{proxy50.scansafe.net:8080,plain}
    06-09-2010 00:00:06,206 [HttpProxyServer-thread-39] DEBUG jd - 3DES Encryption took 0 ms
    06-09-2010 00:00:06,206 [HttpProxyServer-thread-39]  INFO sb - REQMOD : GET http://filetransferenabled.mail.google.com/images/cleardot.gif HTTP/1.0
    06-09-2010 00:00:06,221 [HttpProxyServer-thread-42] DEBUG nc - Resource succeeded jc{proxy50.scansafe.net:8080,plain}
    06-09-2010 00:00:06,221 [HttpProxyServer-thread-42] DEBUG jd - 3DES Encryption took 0 ms
    06-09-2010 00:00:06,221 [HttpProxyServer-thread-42]  INFO sb - REQMOD : GET http://tools.google.com/googletalk/google-talk-versioncheck.txt?auv=1&r=4&up=30&p=w&ma=5&mi=1&b=2600&sp=ServicePack3&as=googletalk&pv=1.0.0.104 HTTP/1.0
    06-09-2010 00:00:06,299 [HttpProxyServer-thread-39]  INFO pb - DONE: contentLength=43
    06-09-2010 00:00:06,331 [HttpProxyServer-thread-42]  INFO pb - DONE: contentLength=1014
    je voudrais uniquement les lignes qui comportent INFO et je voudrais aussi les informations concernant le temps (date etc..), l'url, le port , le localport, l'addr ip,et le content lenght .
    merci de votre aide .

  2. #2
    Responsable Perl et Outils

    Avatar de djibril
    Homme Profil pro
    Inscrit en
    Avril 2004
    Messages
    19 820
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Avril 2004
    Messages : 19 820
    Points : 499 184
    Points
    499 184
    Par défaut
    Bah montre nous ce que tu as fait

Discussions similaires

  1. Extraire des données d'un fichier Log (.dat)
    Par Zildijan dans le forum Scripts/Batch
    Réponses: 2
    Dernier message: 19/02/2013, 13h52
  2. extraire des infos d'un fichier xls
    Par laurentSc dans le forum Langage
    Réponses: 2
    Dernier message: 29/10/2011, 23h51
  3. Extraire des infos d'un fichier XML de manière automatique
    Par dinozo13 dans le forum XML/XSL et SOAP
    Réponses: 1
    Dernier message: 16/09/2008, 09h28
  4. Comment extraire des infos d'un fichier Word ?
    Par Raoul d'Andrésy dans le forum VBA Word
    Réponses: 4
    Dernier message: 02/12/2005, 17h20
  5. [langage] [PERL] prendre des infos dans un fichier log
    Par osiris73 dans le forum Langage
    Réponses: 2
    Dernier message: 24/05/2005, 16h42

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo