473,657 Members | 2,576 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 5676

"aj" <ro****@mcdonal ds.com> wrote in message
news:11******** *****@news.supe rnews.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****@mcdonal ds.com> wrote in message
news:11******** *****@news.supe rnews.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
9453
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 element. That did not parse. Here is my question: How can I get attribute values to not get converted from &apos; to '
10
26096
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 null references another, FK_LASTLYOID bigint not null references lastly, unique (FK_OTHEROID,FK_ANOTHEROID))
2
309
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 below (which I copied out of a book). I get the following error. The hickup comes in the "dim db as database" line. However if I comment this out. It doesn't like the next line either. I appreciate any help you can give me. Also is this a problem...
3
2073
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 received: Microsoft Visual Basic Compile error: Type declaration character does not match declared data type Private Sub Form_Load() 1 Dim db As Database
2
6838
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 as a value. Check out the following problem. I want to convert the value in <WpDatesXml> node to have a valid "<" and ">" instead of &lt or &gt format so that I can use this xml for another use. Please help! <NewDataSet> <Table1>
2
4835
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
1838
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 'name' in the 'temptable' table: insert into temptable (name) values (test) But I don't know the correct syntax for writing the field on the form into the test table. I tried (with no luck) to use this code:
12
2433
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 a Static Object. In this object is a generic List<String>. For every page request this list is looped over only reading not writing each value.
1
3281
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 tool) and do a SELECT SUM(<<field name>>) from <<table name>>, the results from these two servers are slightly different. I don't understand the reason because these databases are static and they should be exactly the same. Then when I tried...
0
8392
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8305
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8732
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8503
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7324
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6163
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4151
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
1953
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1611
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.