473,396 Members | 1,898 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

looping on db2 get snapshot for locks on <db>

aj
DB2 WSE 8.1 FP5
Red Hat AS 2.1

I'm trying to monitor locks in my DB by running the following
shell script:

while true
do
db2 get snapshot for locks on <db> | head -9
sleep 3
done

When I run this, I get *lots* of the following in db2diag.log
as the shell script loops:

2005-03-18-13.20.44.197579 Instance:oltp Node:000
PID:23453(db2) TID:8192 Appid:none
oper system services sqloclose Probe:110

errno:
0xBFFEA8F4 : 0x00000009 ....

Why is this? How can I avoid filling up db2diag.log? Is there
an alternative?

TIA

allen
Nov 12 '05 #1
2 5662

"aj" <ro****@mcdonalds.com> wrote in message
news:11*************@news.supernews.com...
DB2 WSE 8.1 FP5
Red Hat AS 2.1

I'm trying to monitor locks in my DB by running the following
shell script:

while true
do
db2 get snapshot for locks on <db> | head -9
sleep 3
done

When I run this, I get *lots* of the following in db2diag.log
as the shell script loops:

2005-03-18-13.20.44.197579 Instance:oltp Node:000
PID:23453(db2) TID:8192 Appid:none
oper system services sqloclose Probe:110

errno:
0xBFFEA8F4 : 0x00000009 ....

Why is this? How can I avoid filling up db2diag.log? Is there
an alternative?


errno 0x00000009 = EBADF (bad file descriptor).

My guess is that once 'head' outputs out first 9 lines of the snapshot
output, it closes it's end of the pipe, and that causes DB2 to get an error
while attempting to output more information to the pipe since the pipe has
been closed.

Try the following instead and see if it makes the error messages go away:

while true
do
db2 get snapshot for locks on <db> > snap.lock
head -9 snap.lock
sleep 3
done

--
Matt Emmerton
Nov 12 '05 #2
aj
Worked perfectly. Thanks Matt.

aj

Matt Emmerton wrote:
"aj" <ro****@mcdonalds.com> wrote in message
news:11*************@news.supernews.com...
DB2 WSE 8.1 FP5
Red Hat AS 2.1

I'm trying to monitor locks in my DB by running the following
shell script:

while true
do
db2 get snapshot for locks on <db> | head -9
sleep 3
done

When I run this, I get *lots* of the following in db2diag.log
as the shell script loops:

2005-03-18-13.20.44.197579 Instance:oltp Node:000
PID:23453(db2) TID:8192 Appid:none
oper system services sqloclose Probe:110

errno:
0xBFFEA8F4 : 0x00000009 ....

Why is this? How can I avoid filling up db2diag.log? Is there
an alternative?

errno 0x00000009 = EBADF (bad file descriptor).

My guess is that once 'head' outputs out first 9 lines of the snapshot
output, it closes it's end of the pipe, and that causes DB2 to get an error
while attempting to output more information to the pipe since the pipe has
been closed.

Try the following instead and see if it makes the error messages go away:

while true
do
db2 get snapshot for locks on <db> > snap.lock
head -9 snap.lock
sleep 3
done

--
Matt Emmerton

Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Sammy | last post by:
Hi, my mind is going crazy. I have tried everything I can think of to no avail. I have tried Disable Output Escaping. I tried to think of a way of enclosing the attribute data in a CDATA...
10
by: BuddhaBuddy | last post by:
Platform is DB2/NT 7.2.9 The table was created like this: CREATE TABLE MYTEST ( MYTESTOID bigint not null primary key, FK_OTHEROID bigint not null references other, FK_ANOTHEROID bigint not...
2
by: Chuck | last post by:
I am trying to retrive one field from the "company info" table that contains several fields but I want the "company name" field. There is only one record in this table. When I entered the code...
3
by: WØCBF | last post by:
I know this code has worked before but now appears to get a compile error. The code it seems to choke on line 12. I receive the following message and it highlights the "rst!" statement. Error...
2
by: andrew007 | last post by:
I do xml / xslt transformation using asp.net but I found any value (w/xml format) in xml node html-encoded to &lt and &gt format if it's > or < tag. Since I have sub xml data in a parent xml node...
2
by: Frank van Vugt | last post by:
Hi, Not exactly a showstopper, but I noticed this behaviour: db=# create table f1 (id int, value int); CREATE TABLE db=# insert into f1 select 1 as id, null; INSERT 25456306 1
2
by: WØCBF | last post by:
I am trying to copy the information from a form into a table. I have tried running the sql code from a macro by using the command : This works and writes the work 'test' into the field name...
12
by: Mark S. | last post by:
Hello, The app in question is lives on a Windows 2003 server with .NET 2.0 running IIS 6. The page of the app in question processes 2000 get requests a second during peak loads. The app uses...
1
by: rnhuch | last post by:
My platform is SQL Server 2005. One of the tables of my db has 28589928 rows and one of the fields is real. When I backup and restore this database to another server (using the SQL Server internal...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.