Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: freebie. Summarize Oracle Listener logs
Steve,
I have an awk script which does something similar - see code and example below
However I can put your file on my site where I have already stored your Perl script for getting the DDL out of an export file ( www.hcresources.co.uk) if you wish.
Cheers
John
Service :Host :User :tcp:ip address
WMBT_DEV:CHALK :PARKR :tcp:10.33.33.215 13
WMBT_DEV:__jdbc__ :oracle :tcp:10.33.15.38 11
WMBT_DEV:__jdbc__ :oracle :tcp:10.33.15.43 1734
echo "Service :Host :User :tcp:ip address"
echo "======================================================="
grep CONNECT b2tperf.log |\
awk -F= '{print $3 ":1:" $6 ":2:" $7 ":3:" $9 ":4:" $10 ":5:" $11}' |\
sed 's/).*:1:/:/' | \
sed 's/).*:2:/:/' | \
sed 's/).*:3:/:/' | \
sed 's/).*:4:/:/' | \
sed 's/).*:5:/:/' | \
sed 's/).*$//' | \
awk -F: '{printf("%-8.8s:%-16.16s:%-16.16s:%-3.3s:%-10.15s\n", \
$1,$2,$3,$4,$5)}' | sort > /tmp/j.lis
grep -v PROGRAM /tmp/j.lis > /tmp/j1.lis
cat /tmp/j1.lis | awk '{if (data[$0]++ == 0)lines[++count] = $0}\
END{for (i = 1; i <= count; i++)print lines[i],"\t"data[lines[i]]}'\
|sort -n +4
rm /tmp/j.lis
rm /tmp/j1.lis
-----Original Message-----
Sent: 05 January 2004 03:29
To: Multiple recipients of list ORACLE-L
I wanted to summarize our listener logs to see who's connecting with what tools. I checked google and didn't see anything, so I decided to write one. It may be useful to somebody else.
It summarizes the lines of a listener log. the output is similar to
Ora Listener Log Summary V0.5
Oracle SID: ODP Log File: TSOORDDB.listener.log
Listener Started at: 06-DEC-2003 07:53:26
User Host Program Total ================ ================ ==================== ================ PA1DBO TSOORA49 DMSERVER_V4.EXE 6,594 PW1DBO TSOORA50 DLLHOST.EXE 1,514 IWAM_TSOORA50 TSOORA50 DLLHOST.EXE 600 PW2DBO TSOORA56 DLLHOST.EXE 362 ITMDBO TSOORA52 SQLPLUS.EXE 166 SYSTEM TSOORA56 MAPS_BIZ 88 PW3DBO TSOORA57 TD2000.EXE 72 ASPNET TSOORA56 ASPNET_WP.EXE 57 ORACLE __JDBC__ 41 ARCDBO SATSAP09 SQLPLUS.EXE 12 2KNUPPS SKNUPP-1 TOAD.EXE 7 PERRYSM SAIT02547 SQLPLUSW.EXE 6 2RILEYJ GLEFIO01210 TOAD.EXE 4 2MASHUA GLEFIO01262 TOAD.EXE 3 PA1DBO TSOORA49 DMFILESCAN.EXE 3 PA1DBO TSOORA49 DMCLEAN.EXE 3 LDQDBO TSOORA24 JREW.EXE 2 2SHURTN GLEFIO01261 TOAD.EXE 1 PW3DBO TSOORA57 DBDBOIN.EXE 1 PA1DBO TSOORA49 SQLPLUSW.EXE 1 ODDDBO TSOORD08 EXP.EXE 1 2KNUPPS SKNUPP-1 SQLPLUSW.EXE 1 PW2DBO TSOORA56 SQLPLUSW.EXE 1
notes:
It sorts in descending order by the connect attempts.
all connect lines are counted. It doesn't take into account if the connection was made - only that it was attempted. seperating the failed connections may be a future enhancement.
I just wrote it (and some cutting/pasting from the net), so it hasn't been burned in yet.
It will process 100 meg of logs in few minutes.
It was written for windows only. sorry, I work in a MicroSlop env...
I have a cmd file that I use to run it so it can process our current logs or older stuff. Rather than pasting both of them inline, email me and I'll send them out. if you want it bad :), email me at work <mailto:sperry_at_tesoropetroleum.com> sperry_at_tesoropetroleum.com otherwise use sperry_at_sprynet.com and I'll get to it when I get home.
if somebody optimizes it, cleans it up,finds a flaw..., let me know so I can update it.
Steve
--
Please see the official ORACLE-L FAQ: http://www.orafaq.net
--
Author: Hallas, John, Tech Dev
INET: John.Hallas_at_gb.vodafone.co.uk
Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services ---------------------------------------------------------------------To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Mon Jan 05 2004 - 05:19:27 CST
![]() |
![]() |