Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

dbilogstrip(1p) [linux man page]

DBILOGSTRIP(1p) 					User Contributed Perl Documentation					   DBILOGSTRIP(1p)

NAME
dbilogstrip - filter to normalize DBI trace logs for diff'ing SYNOPSIS
Read DBI trace file "dbitrace.log" and write out a stripped version to "dbitrace_stripped.log" dbilogstrip dbitrace.log > dbitrace_stripped.log Run "yourscript.pl" twice, each with different sets of arguments, with DBI_TRACE enabled. Filter the output and trace through "dbilogstrip" into a separate file for each run. Then compare using diff. (This example assumes you're using a standard shell.) DBI_TRACE=2 perl yourscript.pl ...args1... 2>&1 | dbilogstrip > dbitrace1.log DBI_TRACE=2 perl yourscript.pl ...args2... 2>&1 | dbilogstrip > dbitrace2.log diff -u dbitrace1.log dbitrace2.log DESCRIPTION
Replaces any hex addresses, e.g, 0x128f72ce with "0xN". Replaces any references to process id or thread id, like "pid#6254" with "pidN". So a DBI trace line like this: -> STORE for DBD::DBM::st (DBI::st=HASH(0x19162a0)~0x191f9c8 'f_params' ARRAY(0x1922018)) thr#1800400 will look like this: -> STORE for DBD::DBM::st (DBI::st=HASH(0xN)~0xN 'f_params' ARRAY(0xN)) thrN perl v5.12.3 2011-05-06 DBILOGSTRIP(1p)

Check Out this Related Man Page

DBILOGSTRIP(1)						User Contributed Perl Documentation					    DBILOGSTRIP(1)

NAME
dbilogstrip - filter to normalize DBI trace logs for diff'ing SYNOPSIS
Read DBI trace file "dbitrace.log" and write out a stripped version to "dbitrace_stripped.log" dbilogstrip dbitrace.log > dbitrace_stripped.log Run "yourscript.pl" twice, each with different sets of arguments, with DBI_TRACE enabled. Filter the output and trace through "dbilogstrip" into a separate file for each run. Then compare using diff. (This example assumes you're using a standard shell.) DBI_TRACE=2 perl yourscript.pl ...args1... 2>&1 | dbilogstrip > dbitrace1.log DBI_TRACE=2 perl yourscript.pl ...args2... 2>&1 | dbilogstrip > dbitrace2.log diff -u dbitrace1.log dbitrace2.log DESCRIPTION
Replaces any hex addresses, e.g, 0x128f72ce with "0xN". Replaces any references to process id or thread id, like "pid#6254" with "pidN". So a DBI trace line like this: -> STORE for DBD::DBM::st (DBI::st=HASH(0x19162a0)~0x191f9c8 'f_params' ARRAY(0x1922018)) thr#1800400 will look like this: -> STORE for DBD::DBM::st (DBI::st=HASH(0xN)~0xN 'f_params' ARRAY(0xN)) thrN perl v5.16.2 2013-08-25 DBILOGSTRIP(1)
Man Page

15 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Date and time log file

Hi, I wrote a small perl script in unix that searches in a file and saves some information in a separate file. Since this is a log file, I would like to have the date added to file name. I have no idea where to start. output: log_010907.txt thanks ken (8 Replies)
Discussion started by: captoro
8 Replies

2. Shell Programming and Scripting

perl DBI/DBD Module -in cygwin

Hi all, I am trying to install the DBI module in perl using perl -MCPAN -e shell install 'DBI' --It is installing into the nuild directory properly but when it try to make it is saying NOT OK -I tried to copy the module manually to the /lib/perl5/vendor_perl ... (3 Replies)
Discussion started by: jambesh
3 Replies

3. HP-UX

how to trace the logs

Hi, Last day, In one of our unix boxes there was an issue wherein few of the directory structures were missing / got deleted. Is there any way by which we can find how it happened, I mean by going through syslog / which user had run what command? Thanks for your help (3 Replies)
Discussion started by: vivek_damodaran
3 Replies

4. Shell Programming and Scripting

Previous log and diff

Logs are created on a daily basis, the format of the log file is: servername_yymmdd. I need to check if there is a difference in the log created today with the previous one. I would appreciate help on how I can step back to the previous log and how can I test if there is a diff in the logs. ... (4 Replies)
Discussion started by: gugs
4 Replies

5. Shell Programming and Scripting

error in the script

#!/bin/sh diff C:\Janotech\bin\sample_file.log C:\Janotech\bin\sample_file.log.1 > C:\Janotech\bin\DIFFERENCE.log cp C:\Janotech\bin\sample_file.log C:\Janotech\bin\sample_file.log.1 grep "ERROR" C:\Janotech\bin\DIFFERENCE.log if ; then ... (6 Replies)
Discussion started by: himvat
6 Replies

6. Shell Programming and Scripting

Extra output in the script

Hi , I am trying to execute the following script. #!/bin/sh find . -name "common.log.diff" if ; then cp common.log common.log.diff diff common.log common.log.diff > DIFFERENCE.log cp common.log common.log.diff grep "ERROR" DIFFERENCE.log if ; then echo "1" else echo "0" fi... (5 Replies)
Discussion started by: himvat
5 Replies

7. Shell Programming and Scripting

Script not executing in CRONTAB

Hi, I have written a script for file scan : #!/bin/sh find . -name "common.log.diff" > /dev/null 2>&1 if ; then cp common.log common.log.diff diff common.log common.log.diff > DIFFERENCE.log cp common.log common.log.diff grep "ERROR" DIFFERENCE.log if ; then echo "1" >... (6 Replies)
Discussion started by: himvat
6 Replies

8. Shell Programming and Scripting

Hashes help in Perl

Hi, I am stuck at this problem where part of my code would store all the websites that has been accessed by a user. I pull these values from a log file. I want to create a HASH of HASHES ? (Please correct me if this is not the right approach) where I would store all the hits to website with... (4 Replies)
Discussion started by: Dabheeruz
4 Replies

9. Shell Programming and Scripting

compare 2 arrays in perl

Hi Im supposed to compare lines in a file : KB0005 1019 T IFVATVPVI 0.691 PKC YES KB0005 1036 T YFLQTSQQL 0.785 PKC YES KB0005 1037 S FLQTSQQLK 0.585 DNAPK YES KB0005 1045 S KQLESEGRS 0.669 PKC YES KB0005 1045 S KQLESEGRS 0.880 unsp YES KB204320 1019 T IFVATVPVI 0.699 PKC YES ... (7 Replies)
Discussion started by: karla
7 Replies

10. Shell Programming and Scripting

Modify log files to get uniq data

Hello, I have a log file that has following output as below. LAP.sun5 CC LAP.sun5 CQ perl.sun5 CC perl.sun5 CQ TSLogger.sun5 CC TSLogger.sun5 CQ TSLogger.sun5 KR WAS.sun5 CC WAS.sun5 MT WAS.sun5 CQ I want to output to be in the way below, i tried using awk but could not do it. ... (12 Replies)
Discussion started by: asirohi
12 Replies

11. Shell Programming and Scripting

variable getting results from a log file; compare it in an IF cycle

Hi All I am going crazy trying to resolve this easy task.... I have a log file that is created by xcode; and it contains the results of a build (either success or fail); what i am trying to achieve here is to get the result from the log, and check if is a pass or fail in an IF statement, so... (3 Replies)
Discussion started by: newbiez
3 Replies

12. Shell Programming and Scripting

Array in Perl - Detect several file to be in one array

Hi everyone I have one question about using array in perl. let say I have several log file in one folder.. example test1.log test2.log test3.log and the list goes on.. how to make an array for this file? It suppose to detect log file in the current directory and all the log file will... (3 Replies)
Discussion started by: sayachop
3 Replies

13. Shell Programming and Scripting

perl code

Perl code to get the diff of the two baselines in clearcase ? (2 Replies)
Discussion started by: saku
2 Replies

14. Shell Programming and Scripting

sed string with any order

Hi, i have a strange prob. log file contains ip, protocol, user name, agent . these can be in any order. If log contains the above order able to fetch all details but if details are in diff order not able to fetch all details. using below command. grep -A50 "Entry " "/logs/file.log" \ |grep... (6 Replies)
Discussion started by: Satyak
6 Replies

15. Shell Programming and Scripting

How to read file line by line and compare subset of 1st line with 2nd?

Hi all, I have a log file say Test.log that gets updated continuously and it has data in pipe separated format. A sample log file would look like: <date1>|<data1>|<url1>|<result1> <date2>|<data2>|<url2>|<result2> <date3>|<data3>|<url3>|<result3> <date4>|<data4>|<url4>|<result4> What I... (3 Replies)
Discussion started by: pat_pramod
3 Replies