Sponsored Content
Top Forums Shell Programming and Scripting merging multiple lines into single line Post 302625553 by bala123 on Wednesday 18th of April 2012 01:25:18 AM
Old 04-18-2012
Question merging multiple lines into single line

Hi,

1. Each message starts with date
2. There is blank line between each message
3. Each message does not contain same number of lines.

Any help in merging multiple lines in each message to a single line is much appreciated.

AIX: Korn Shell

Error log file looks like below.

Code:
2012-04-17-14.19.13.003447 ZRC=0x800D002B=-2146631637=SQLM_RC_EVFULL "monitor full of data"
          DIA8052C The Event Monitor "" has reached its file capacity. Delete
          the files in the target directory "" or move them to another
          directory.

2012-04-17-14.19.13.003798 ADM2017C  The Event Monitor "DB2DETAILDEADLOCK" has reached its file capacity. Delete the files in the target directory       "/db/db2cct2/cct2/db2cct2/NODE0000/SQL00001/db2event/db2detaildeadloc
k" or move them to another directory.

2012-04-17-14.19.13.642294

2012-04-17-13.59.56.765915

2012-04-17-11.14.12.503246 ADM5501I  DB2 is performing lock escalation. The affected application
          is named "db.8", and is associated with the workload name
          "SYSDEFAULTUSERWORKLOAD" and application ID
          "10.207.177.21.46719.120417111411"  at member "8". The total number
          of locks currently held is "403", and the target number of locks to
          hold is "201". The current statement being executed is "DELETE FROM
          CC.DOWNLOAD where DNLD IN (select DNLD_ID from
          CC.DOWNLOAD where file_id=3325) AND upd_ts >= current
          timestamp - 1 days".

2012-04-17-11.14.12.504032 ADM5502W  The escalation of "400" locks on table "CC.DOWNLOAD" to lock intent "X" was successful.

Thanks in advance

Moderator's Comments:
Mod Comment Welcome to the UNIX and Linux Forums. Please use code tags. Video tutorial on how to use them

Last edited by Scrutinizer; 04-18-2012 at 03:07 AM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Splitting a single line into multiple lines

I have a case where, I need to look into a file. Go to each line of the file, find the length of the line, if the length of the line is more than 75 chars, I need to split the line into multiple lines of 75chars max. If the length of the line is less than 75, we need not do anything. So at the... (4 Replies)
Discussion started by: thanuman
4 Replies

2. Shell Programming and Scripting

replacing multiple lines with single line

Can any one give me the idea on replacing multiple blank lines with a single blank line? Please conside it for a file having more than 100 number of characters. Regards, Siba (3 Replies)
Discussion started by: siba.s.nayak
3 Replies

3. Shell Programming and Scripting

Getting multiple messy lines into one single line

I have a file that contains the following: :@:176:@:4:@:name:@:file:@:this is a summary:@:description can be long but who knows can even have <br> tags.:@:how to:@:type:@:18544:@:550:@:400:END: :@:177:@:9:@:name:@:file:@:summary:@:this will containg... (18 Replies)
Discussion started by: sysrenan
18 Replies

4. Shell Programming and Scripting

Multiple lines into a single line

Hi, I've some files with the following data and i need to convert the lines between the separator ---, into a single line. I've tried with the paste cmd but my main problem is that the number of lines between the separator is not fix, it can very between 1-4 lines. Input --- 2010-02-22... (4 Replies)
Discussion started by: RickyC9999
4 Replies

5. Shell Programming and Scripting

Multiple lines into a single line on Ubuntu 10.04

Hi, I've some files with the following data and i need to convert the lines between the separator ---, into a single line. I've tried with the paste cmd but my main problem is that the number of lines between the separator is not fix, it can vary between 1-4 lines. Input --- 2010-02-22... (8 Replies)
Discussion started by: RickyC9999
8 Replies

6. Shell Programming and Scripting

Combine multiple lines in single line

This is related to one of my previous post but now with a slight difference: I need the "Updated:" to be in one line as well as the "Information:" on one line as well. These are in multiple lines right now as seen below. These can have 2 or more lines that needs to be in one line. System name:... (8 Replies)
Discussion started by: The One
8 Replies

7. Shell Programming and Scripting

Multiple lines in a single column to be merged as a single line for a record

Hi, I have a requirement with, No~Dt~Notes 1~2011/08/1~"aaa bbb ccc ddd eee fff ggg hhh" Single column alone got splitted into multiple lines. I require the output as No~Dt~Notes 1~2011/08/1~"aaa<>bbb<>ccc<>ddd<>eee<>fff<>ggg<>hhh" mean to say those new lines to be... (1 Reply)
Discussion started by: Bhuvaneswari
1 Replies

8. Shell Programming and Scripting

Combine multiple lines into single line

Hi All , I have a file with below data # User@Host: xyz @ # Query_time: t1 Lock_time: t2 Rows_sent: n1 Rows_examined: n2 SET timestamp=1396852200; select count(1) from table; # Time: 140406 23:30:01 # User@Host: abc @ # Query_time: t1 Lock_time: t2 Rows_sent: n1 Rows_examined:... (6 Replies)
Discussion started by: rakesh_411
6 Replies

9. UNIX for Beginners Questions & Answers

Merging multiple lines into single line based on one column

I Want to merge multiple lines based on the 1st field and keep into single record. SRC File: AAA_POC_DB.TAB1 AAA_POC_DB.TAB2 AAA_POC_DB.TAB3 AAA_POC_DB.TAB4 BBB_POC_DB.TAB1 BBB_POC_DB.TAB2 CCC_POC_DB.TAB6 OUTPUT ----------------- 'AAA_POC_DB','TAB1','TAB2','TAB3','TAB4'... (10 Replies)
Discussion started by: raju2016
10 Replies

10. UNIX for Beginners Questions & Answers

Multiple lines to single line

I have code as below # create temporary table `temp4277`(key(waybill_no)) select waybill_no,concat_ws('',card_type,card_series_no) cardinfo from rfid_temp_ticket where waybill_no='4277' group by... (4 Replies)
Discussion started by: kaushik02018
4 Replies
LOCK_PROFILING(9)					   BSD Kernel Developer's Manual					 LOCK_PROFILING(9)

NAME
LOCK_PROFILING -- kernel lock profiling support SYNOPSIS
options LOCK_PROFILING DESCRIPTION
The LOCK_PROFILING kernel option adds support for measuring and reporting lock use and contention statistics. These statistics are collated by ``acquisition point''. Acquisition points are distinct places in the kernel source code (identified by source file name and line number) where a lock is acquired. For each acquisition point, the following statistics are accumulated: o The longest time the lock was ever continuously held after being acquired at this point. o The total time the lock was held after being acquired at this point. o The total time that threads have spent waiting to acquire the lock. o The total number of non-recursive acquisitions. o The total number of times the lock was already held by another thread when this point was reached, requiring a spin or a sleep. o The total number of times another thread tried to acquire the lock while it was held after having been acquired at this point. In addition, the average hold time and average wait time are derived from the total hold time and total wait time respectively and the number of acquisitions. The LOCK_PROFILING kernel option also adds the following sysctl(8) variables to control and monitor the profiling code: debug.lock.prof.enable Enable or disable the lock profiling code. This defaults to 0 (off). debug.lock.prof.reset Reset the current lock profiling buffers. debug.lock.prof.stats The actual profiling statistics in plain text. The columns are as follows, from left to right: max The longest continuous hold time in microseconds. wait_max The longest continuous wait time in microseconds. total The total (accumulated) hold time in microseconds. wait_total The total (accumulated) wait time in microseconds. count The total number of acquisitions. avg The average hold time in microseconds, derived from the total hold time and the number of acquisitions. wait_avg The average wait time in microseconds, derived from the total wait time and the number of acquisitions. cnt_hold The number of times the lock was held and another thread attempted to acquire the lock. cnt_lock The number of times the lock was already held when this point was reached. name The name of the acquisition point, derived from the source file name and line number, followed by the name of the lock in parentheses. debug.lock.prof.rejected The number of acquisition points that were ignored after the table filled up. debug.lock.prof.skipspin Disable or enable the lock profiling code for the spin locks. This defaults to 0 (do profiling for the spin locks). debug.lock.prof.skipcount Do sampling approximately every N lock acquisitions. SEE ALSO
sysctl(8), mutex(9) HISTORY
Mutex profiling support appeared in FreeBSD 5.0. Generalized lock profiling support appeared in FreeBSD 7.0. AUTHORS
The MUTEX_PROFILING code was written by Eivind Eklund <eivind@FreeBSD.org>, Dag-Erling Smorgrav <des@FreeBSD.org> and Robert Watson <rwatson@FreeBSD.org>. The LOCK_PROFILING code was written by Kip Macy <kmacy@FreeBSD.org>. This manual page was written by Dag-Erling Smorgrav <des@FreeBSD.org>. NOTES
The LOCK_PROFILING option increases the size of struct lock_object, so a kernel built with that option will not work with modules built with- out it. The LOCK_PROFILING option also prevents inlining of the mutex code, which can result in a fairly severe performance penalty. This is, how- ever, not always the case. LOCK_PROFILING can introduce a substantial performance overhead that is easily monitorable using other profiling tools, so combining profiling tools with LOCK_PROFILING is not recommended. Measurements are made and stored in nanoseconds using nanotime(9), (on architectures without a synchronized TSC) but are presented in microseconds. This should still be sufficient for the locks one would be most interested in profiling (those that are held long and/or acquired often). LOCK_PROFILING should generally not be used in combination with other debugging options, as the results may be strongly affected by interac- tions between the features. In particular, LOCK_PROFILING will report higher than normal uma(9) lock contention when run with INVARIANTS due to extra locking that occurs when INVARIANTS is present; likewise, using it in combination with WITNESS will lead to much higher lock hold times and contention in profiling output. BSD
March 7, 2012 BSD
All times are GMT -4. The time now is 11:19 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy