Script Library: 1213 scripts
 

ora-listener.r

REBOL[ Title: "Analyze of Oracle listener logs" Date: 10-Jun-2004 Version: 1.1.0 File: %ora-listener.r Author: "Philippe Le Goff (with help of Ladislav Mecir)" Purpose: "Oracle SGBD rebtool to analyze listener log" Email: %lp--legoff--free--fr note: {- v. 1.0.0 : This script analyze Oracle listener log, and returns two files : user access stats, and listener-start stats; works with 9.x Ora SGBD - v. 1.1.0 : with a GUI for selecting log file } library: [ level: 'beginner platform: all type: 'tool domain: [database] tested-under: none support: none license: none see-also: none ] ] ;/////////////////// RULES Defs ////////////////////// digit: charset [#"0" - #"9"] alpha: charset [#"a" - #"z" #"A" - #"Z"] ; date rule date: [2 digit "-" 3 alpha "-" 4 digit] ; time rule time: [2 digit ":" 2 digit ":" 2 digit] ;sid rule sid: [thru "SID=" copy text to #")" ] ;program rule program: [thru "PROGRAM=" copy text to #")" ] ; host rule host: [thru "HOST=" copy text to #")" ] ; user rule user: [thru "USER=" copy text to #")" ] ;port rule port: [thru "PORT=" copy text to #")" ] ; date rule date-TNS: [some date] ; time rule time-TNS: [some time] ;/////////////////// HANDLERS Defs ////////////////////// ; CID Handler definition => user access CID-handler: [ copy dat date (append result-CID dat) copy tm time (append result-CID tm) sid (append result-CID text) program (append result-CID text) host (append result-CID text) user (append result-CID text) host (append result-CID text) port (append result-CID text) ] ; TNS (listener) Handler definition => listener on/off TNS-start-handler: [ ;start-TNS ( append result-TNS rejoin [ entab text tab "start" ]) thru "Production on " copy daty date-TNS (append result-TNS daty) copy tmy time-TNS ( append result-TNS tmy append result-TNS "start") ] TNS-stop-handler: [ copy dat-tns date-TNS (append result-TNS dat-tns) copy tm-tns time-TNS ( append result-TNS tm-tns append result-TNS "stop" ) ] ;/////////////////// LAYOUT Defs ////////////////////// ; Layout definition => GUI ssh: system/script/header my-ora-log: none log-analyse-file: none select-btn: false ; /////////// ; trame image de fond img-fond: load 64#{ R0lGODlhgACAAOYAAAAAAAEBAQICAgMDAwQEBAUFBQYGBgcHB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N6fVhOhpBbSicS2rBy0MIYVBAIADs= } ;//////////// aPropos: func [/local lay] [ lay: copy [ across origin 0x0 space 0x0 backtile img-fond style vtext text white bold right middle font-size 12 font-name "Courrier" with [ feel: none append init [font: make font []] ] style text text 200 white font-size 11 font-name "Courrier" font-color white with [ append init [font: make font [colors: [0.0.0 255.255.255]]] ] image logo.gif box 200x24 effect [merge gradmul 1x0 0.0.0 128.128.128] return pad 10x10 guide ] foreach [name value] third ssh [ if not none? value [ append lay reduce [ 'vtext mold :name 'tab 'text form value ] switch/default type?/word value [ string! [append lay mold [with [feel: none]]] email! [append/only lay compose/deep [ alive?: true error? try [emailer/to (value)] ]] url! [append/only lay compose/deep [ error? try [browse (value)] ]] file! [append/only lay compose/deep [ error? try [editor (value)] ]] ] [append lay [with [feel: none]]] append lay 'return ] ] append lay [ pad -10x10 box 200x24 effect [merge gradmul 1x0 128.128.128 0.0.0] button "Close" black [unview/only lay] edge [size: none] ] view/new/title center-face lay: layout lay join ssh/title ssh/version ] ; /////// main layout /////// main: layout/tight [ style bout btn gray center middle 85x20 font-size 11 font-name "Courrier" font-color white style tx-inf text ivory font-size 10 font-name "Courrier" middle center space 2 tabs [30 100] backtile img-fond text " " 0x5 return across at 0x15 tab bout "Select File" [my-ora-log: request-file f1/text: my-ora-log select-btn: true show f1 ] build-stats: bout "Build Stats" [ either all [ select-btn not none? f1/text not equal? "none" to-string f1/text ] [ info-from-log: split-path clean-path to-file my-ora-log path-to-log: info-from-log/1 name-of-log: info-from-log/2 build to-file my-ora-log ][ inform layout [ backtile img-fond text " Please, select a log file before !" white font-name "Courrier" font-size 12 at 80x50 btn-cancel 60x20 "Cancel" escape [none hide-popup] ] ; fin layout ] ; fin either ] ; fin action bout bout "View Stats" [ either log-analyse-file [ editor to-file log-analyse-file ][ inform layout [ backtile img-fond text " Please, select a log file and build stats before !" white font-name "Courrier" font-size 12 at 80x50 btn-cancel 60x20 "Cancel" escape [none hide-popup] ] ; fin layout ] ; fin either ] ; fin action bout bout "Info" 40x20 167.17.17 [apropos] bout "Quit" 40x20 124.154.220 [quit] at 0x40 across tx-inf "File:" bold ivory right middle tab f1: info 343x15 205.205.205 left middle font-name "Courrier" font-size 10 text " " 15x20 return across at 0x65 text " " at 30x65 tx1: tx-inf "Reading " 50x20 ;underline at 160x65 tx2: tx-inf "Parsing " ;underline at 295x65 tx3: tx-inf "Writing " ;underline return across at 30x85 prog1: progress 70x7 coal yellow with [ edge: none color: white ] prog2: progress 190x7 coal red with [ edge: none color: white ] prog3: progress 80x7 coal green with [ edge: none color: white ] return at 30x100 text " " 15x15 ] ;/////////// End GUI defs /////////////////// ;/////////////////// MAIN ////////////////////// build: func [ my-file [file!] ][ ; read the log-file ; if the file is very long, it can be replaced by a port access logs: read/lines to-file my-file logs-num-line: length? logs ; analysed blocks result-CID: make block! 0 result-TNS: make block! 0 compteur: make integer! 0 foreach record logs [ ; handlers need a different behaviour if all [ find record "CID" find record "SID" ] [ parse record CID-handler ] if any [find record " stop " find record "TNSLSNR" ] [ parse record TNS-stop-handler ] if all [find record "TNSLSNR" find record "Production"] [ parse record TNS-start-handler ] prog1/data: compteur / logs-num-line compteur: compteur + 1 show prog1 ] tx1/font/color: yellow show tx1 ;/////////////////// WRITING LOGS ////////////////////// ; Now write results in CID-log file log-analyse-file: rejoin [ path-to-log "analyze-ora-log.txt" ] ;print log-analyse-file info-log-header: rejoin ["DAY" tab "TIME" tab "USER" tab "HOST" tab "ADDR. IP" tab "PORT" tab "SID" tab "PROGRAM" ] write/append/lines to-file log-analyse-file info-log-header logs-res-CID: length? result-CID ; LOGS : 20380 ; result-CID : 157000 --> 19625 compteur: make integer! 0 foreach [date-log heure-log sid-log prog-log host-log user-log ip-host-log port-log] result-CID [ info-log: rejoin [date-log tab heure-log tab user-log tab host-log tab ip-host-log tab port-log tab sid-log tab prog-log ] write/append/lines to-file log-analyse-file info-log prog2/data: ( 8 * compteur ) / logs-res-CID ; le chiffre 8 vient du fait que les 157000 lignes de result-CID ; sont manipulées par blocs de 8 (date-log --> prog-log), soit 19625 compteur: compteur + 1 show prog2 ] tx2/font/color: red show tx2 ; Now write results in TNS-log file compteur: make integer! 0 logs-res-TNS: length? result-TNS log-tns-file: rejoin [ path-to-log "analyze-tns-arret.txt" ] info-tns-header: rejoin ["DAY" tab "TIME" tab "STATE"] write/append/lines to-file log-tns-file info-tns-header foreach [date-log-tns heure-log-tns state-log-tns ] result-TNS [ info-tns: rejoin [date-log-tns tab heure-log-tns tab state-log-tns ] write/append/lines to-file log-tns-file info-tns prog3/data: ( 3 * compteur ) / logs-res-TNS ; manipulation par blocs de 3 d'où le chiffre 3 compteur: compteur + 1 show prog3 ] tx3/font/color: green show tx3 ] ; end of build function view center-face main ;/////////////////// end MAIN //////////////////////
halt ;; to terminate script if DO'ne from webpage
Notes
  • email address(es) have been munged to protect them from spam harvesters. If you are a Library member, you can log on and view this script without the munging.
  • (lp:legoff:free:fr)