listener.log extract
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 8 of 8

Thread: listener.log extract

  1. #1
    Join Date
    Jul 2003
    Posts
    323

    listener.log extract

    Hi,

    Does any1 have a script to extract ip's (HOST=) and (PORT=)
    values from a listener.log file?

    We need to extract IP's and Port. nos from listener.logs.


    TIA


  2. #2
    Join Date
    Jul 2002
    Location
    Lake Worth, FL
    Posts
    1,471

    Cool


    Check out this article.
    "The person who says it cannot be done should not interrupt the person doing it." --Chinese Proverb

  3. #3
    Join Date
    Oct 2005
    Location
    Indianapolis
    Posts
    100
    Awesome article...
    "False data can act only as a distraction. Therefore. I shall refuse to perceive you." - Bomb #20

  4. #4
    Join Date
    Jul 2003
    Posts
    323
    Hi,
    Tx. - did my due diligence and got this article but was looking for a
    shell script/unix utility - maybe based on sed or awk that can write what we need to a text file.

    Rgds


  5. #5
    Join Date
    Jul 2002
    Location
    Lake Worth, FL
    Posts
    1,471

    Cool


    Try this:
    Code:
    #!/bin/ksh
    awk '/HOST=/ && /PORT=/ {
    i=match($0,"HOST="); i=i+RLENGTH; h0=substr($0,i); 
    i=match(h0,")"); host=substr(h0,1,(i-1));
    i=match($0,"PORT="); i=i+RLENGTH; h0=substr($0,i); 
    i=match(h0,")"); port=substr(h0,1,(i-1));
    print "Host="host", Port="port;
    }' listener.log| \
    sort -u

    "The person who says it cannot be done should not interrupt the person doing it." --Chinese Proverb

  6. #6
    Join Date
    May 2005
    Location
    Boracay
    Posts
    681
    Hi all, i also want to capture all IP's that access my database(as a security audit). Is it available in listener.log? I thought it will reflect the client-server connections only...and not the web based using
    apache http connect
    Behind The Success And Failure Of A Man Is A Woman

  7. #7
    Join Date
    Nov 2006
    Location
    Sofia
    Posts
    630
    Sure you can't see the browser's accessing the Apache via the database logs, since all the connections come to the database from the Apache and all you can see there is the IP of the apache machine.
    Take a look into the Apache's access.log file

  8. #8
    Join Date
    May 2005
    Location
    Boracay
    Posts
    681
    Thanks dear do u have similiar monitoring script like the one given by LnkBrwn_DBA used for apache logs. What others logs can
    i monitor database access?
    Behind The Success And Failure Of A Man Is A Woman

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width