HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- get a line
Operating System - Linux
1825810
Members
2467
Online
109688
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2007 03:44 AM
08-06-2007 03:44 AM
Hi,
I have a file that logs all sql statements in an informix DB.
I would like to print out certain information between each stanza:
=============================== 06:05:00 =======================================
The server did not respond within 5 seconds. Timing out.
The server did not respond within 5 seconds. Timing out.
Informix Dynamic Server 2000 Version 9.21.UC5 -- On-Line (Prim) -- Up 3 days 05:59:03 -- 2027776 Kbytes
session #RSAM total used
id user tty pid hostname threads memory memory
163348 informix - 0 - 0 12288 7840
Memory pools count 1
name class addr totalsize freesize #allocfrag #freefrag
163348 V 942e7020 12288 4448 13 2
name free used name free used
overhead 0 1648 scb 0 96
filetable 0 40 ostcb 0 40
sqscb 0 5928 sql 0 40
fragman 0 48
------------------------------------------------------------------------
session #RSAM total used
id user tty pid hostname threads memory memory
163621 p4uread HOD01702 876 HOD01702 1 118784 115888
tid name rstcb flags curstk status
180109 sqlexec ae75f508 B--PR-- 4696 ae75f508 sleeping(Forever)
Memory pools count 1
name class addr totalsize freesize #allocfrag #freefrag
163621 V 946b6020 118784 2896 349 5
name free used name free used
overhead 0 1648 scb 0 96
opentable 0 19864 filetable 0 2664
misc 0 136 log 0 4200
temprec 0 3144 keys 0 208
ralloc 0 46024 gentcb 0 1328
ostcb 0 2728 sqscb 0 12416
sql 0 40 rdahead 0 832
hashfiletab 0 280 osenv 0 688
buft_buffer 0 4184 sqtcb 0 3584
fragman 0 11744 sapi 0 40
Sess SQL Current Iso Lock SQL ISAM F.E.
Id Stmt type Database Lvl Mode ERR ERR Vers
163621 SELECT data CR Not Wait 0 0 9.03
Current statement name : sql_cur7
Current SQL statement :
SELECT informix.opheadm.order_no ,informix.opheadm.customer
,informix.opheadm.address1 ,informix.opheadm.address2
,informix.opheadm.address3 ,informix.opheadm.address4
,informix.opheadm.address5 ,informix.opheadm.date_entered
,informix.opheadm.transaction_anals2 ,informix.opdetm.product
,informix.opdetm.long_description ,informix.opdetm.nominal_category
,informix.opdetm.value ,informix.opdetm.vat_amount
,informix.quotes.quo_salutation ,informix.quotes.quo_forename
,informix.quotes.quo_surname ,informix.quotes.quo_old_address1
,informix.quotes.quo_bank_account ,informix.quotes.quo_sort_code
,informix.quotes.quo_bank_name FROM
informix.quotes,informix.opheadm,informix.opdetm WHERE
((((informix.opheadm.order_no = informix.quotes.quo_order_no ) AND
(informix.opheadm.date_entered BETWEEN ? AND ? ) ) AND
(informix.opheadm.order_no = informix.opdetm.order_no ) ) AND
(NOT((informix.opdetm.value = 0 ) ) AND (informix.opdetm.line_type IN ('P'
,'S' ) ) ) )
Last parsed SQL statement :
SELECT informix.opheadm.order_no ,informix.opheadm.customer
,informix.opheadm.address1 ,informix.opheadm.address2
,informix.opheadm.address3 ,informix.opheadm.address4
,informix.opheadm.address5 ,informix.opheadm.date_entered
,informix.opheadm.transaction_anals2 ,informix.opdetm.product
,informix.opdetm.long_description ,informix.opdetm.nominal_category
,informix.opdetm.value ,informix.opdetm.vat_amount
,informix.quotes.quo_salutation ,informix.quotes.quo_forename
,informix.quotes.quo_surname ,informix.quotes.quo_old_address1
,informix.quotes.quo_bank_account ,informix.quotes.quo_sort_code
,informix.quotes.quo_bank_name FROM
informix.quotes,informix.opheadm,informix.opdetm WHERE
((((informix.opheadm.order_no = informix.quotes.quo_order_no ) AND
(informix.opheadm.date_entered BETWEEN ? AND ? ) ) AND
(informix.opheadm.order_no = informix.opdetm.order_no ) ) AND
(NOT((informix.opdetm.value = 0 ) ) AND (informix.opdetm.line_type IN ('P'
,'S' ) ) ) )
------------------------------------------------------------------------
=============================== 06:10:00 =======================================
etc etc
I am looking to print the time the information was collected and then information from between the below stanza for each occurrance of p4uread and the sql statement being run, not to bothered about the print format:
time user sql:
once again any help is greatly appreciated.
Cheers
Chris
I have a file that logs all sql statements in an informix DB.
I would like to print out certain information between each stanza:
=============================== 06:05:00 =======================================
The server did not respond within 5 seconds. Timing out.
The server did not respond within 5 seconds. Timing out.
Informix Dynamic Server 2000 Version 9.21.UC5 -- On-Line (Prim) -- Up 3 days 05:59:03 -- 2027776 Kbytes
session #RSAM total used
id user tty pid hostname threads memory memory
163348 informix - 0 - 0 12288 7840
Memory pools count 1
name class addr totalsize freesize #allocfrag #freefrag
163348 V 942e7020 12288 4448 13 2
name free used name free used
overhead 0 1648 scb 0 96
filetable 0 40 ostcb 0 40
sqscb 0 5928 sql 0 40
fragman 0 48
------------------------------------------------------------------------
session #RSAM total used
id user tty pid hostname threads memory memory
163621 p4uread HOD01702 876 HOD01702 1 118784 115888
tid name rstcb flags curstk status
180109 sqlexec ae75f508 B--PR-- 4696 ae75f508 sleeping(Forever)
Memory pools count 1
name class addr totalsize freesize #allocfrag #freefrag
163621 V 946b6020 118784 2896 349 5
name free used name free used
overhead 0 1648 scb 0 96
opentable 0 19864 filetable 0 2664
misc 0 136 log 0 4200
temprec 0 3144 keys 0 208
ralloc 0 46024 gentcb 0 1328
ostcb 0 2728 sqscb 0 12416
sql 0 40 rdahead 0 832
hashfiletab 0 280 osenv 0 688
buft_buffer 0 4184 sqtcb 0 3584
fragman 0 11744 sapi 0 40
Sess SQL Current Iso Lock SQL ISAM F.E.
Id Stmt type Database Lvl Mode ERR ERR Vers
163621 SELECT data CR Not Wait 0 0 9.03
Current statement name : sql_cur7
Current SQL statement :
SELECT informix.opheadm.order_no ,informix.opheadm.customer
,informix.opheadm.address1 ,informix.opheadm.address2
,informix.opheadm.address3 ,informix.opheadm.address4
,informix.opheadm.address5 ,informix.opheadm.date_entered
,informix.opheadm.transaction_anals2 ,informix.opdetm.product
,informix.opdetm.long_description ,informix.opdetm.nominal_category
,informix.opdetm.value ,informix.opdetm.vat_amount
,informix.quotes.quo_salutation ,informix.quotes.quo_forename
,informix.quotes.quo_surname ,informix.quotes.quo_old_address1
,informix.quotes.quo_bank_account ,informix.quotes.quo_sort_code
,informix.quotes.quo_bank_name FROM
informix.quotes,informix.opheadm,informix.opdetm WHERE
((((informix.opheadm.order_no = informix.quotes.quo_order_no ) AND
(informix.opheadm.date_entered BETWEEN ? AND ? ) ) AND
(informix.opheadm.order_no = informix.opdetm.order_no ) ) AND
(NOT((informix.opdetm.value = 0 ) ) AND (informix.opdetm.line_type IN ('P'
,'S' ) ) ) )
Last parsed SQL statement :
SELECT informix.opheadm.order_no ,informix.opheadm.customer
,informix.opheadm.address1 ,informix.opheadm.address2
,informix.opheadm.address3 ,informix.opheadm.address4
,informix.opheadm.address5 ,informix.opheadm.date_entered
,informix.opheadm.transaction_anals2 ,informix.opdetm.product
,informix.opdetm.long_description ,informix.opdetm.nominal_category
,informix.opdetm.value ,informix.opdetm.vat_amount
,informix.quotes.quo_salutation ,informix.quotes.quo_forename
,informix.quotes.quo_surname ,informix.quotes.quo_old_address1
,informix.quotes.quo_bank_account ,informix.quotes.quo_sort_code
,informix.quotes.quo_bank_name FROM
informix.quotes,informix.opheadm,informix.opdetm WHERE
((((informix.opheadm.order_no = informix.quotes.quo_order_no ) AND
(informix.opheadm.date_entered BETWEEN ? AND ? ) ) AND
(informix.opheadm.order_no = informix.opdetm.order_no ) ) AND
(NOT((informix.opdetm.value = 0 ) ) AND (informix.opdetm.line_type IN ('P'
,'S' ) ) ) )
------------------------------------------------------------------------
=============================== 06:10:00 =======================================
etc etc
I am looking to print the time the information was collected and then information from between the below stanza for each occurrance of p4uread and the sql statement being run, not to bothered about the print format:
time user sql:
once again any help is greatly appreciated.
Cheers
Chris
hello
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2007 04:16 AM
- Tags:
- sed
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2007 09:38 AM
08-06-2007 09:38 AM
Re: get a line
Please clarify your requirements because your post is somewhat confusing.
~thanks
~thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2007 07:55 PM
08-06-2007 07:55 PM
Re: get a line
Thanks for the code,
I have adapted and used with awk.
I have adapted and used with awk.
hello
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Support
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP