If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > HowTo/WhereTo find info about following

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-13-11, 10:40
DBFinder DBFinder is offline
Registered User
 
Join Date: Sep 2008
Location: Toronto,Canada
Posts: 606
HowTo/WhereTo find info about following

Review CPU, Memory, IO, contentions
Latches, Locks, Wait Events
Database Objects Status (Invalid)
Verify Database Backups

IDS 9 - AIX 5.3

Hi all,

Actually I am from DB2 UDB. For an adhoc situation my manager wants me to write a shell script for the above.

Any help will be appreciated.


Reagards
DBFinder
Reply With Quote
  #2 (permalink)  
Old 10-15-11, 04:52
shreyas@informix shreyas@informix is offline
Registered User
 
Join Date: Oct 2011
Posts: 2
script

CPU utilization you can get from

TOP command or VMSTAT


Memory utilization for informix

do


Onstat -|awk '{print $(NF-1) }'

this will solve your memory purpose;



Backups :


online logs in informix records message about Backup started and backup ended/aborted/successful;


it depends on which backup utility you use to take backup ie either onbar or ontape;
Reply With Quote
  #3 (permalink)  
Old 10-15-11, 06:58
DBFinder DBFinder is offline
Registered User
 
Join Date: Sep 2008
Location: Toronto,Canada
Posts: 606
Thanks, good info.

Can some one help me with locks ( currently held locks ) and application owning these locks ?

Regards
Reply With Quote
  #4 (permalink)  
Old 10-31-11, 12:41
begooden-it begooden-it is offline
Registered User
 
Join Date: Sep 2011
Location: Pont l'Abbé, Brittany, France
Posts: 183
with onstat -k
it will list active locks, type of lock ( exclusive, shared, for update etc..), tcb of the owner's session, locked object

This needs a bit of practice to read, but this is fast.
Else you can pick a more human readable info with a join on sid with syslocks and syssessions from the sysmaster database.

On a larger point of view, you will monitoring a lot of things with the many options of onstat. check the doc

Why don't you install Open Admin Tool to have a graphical view of this and muuuuuch more.

It is free and can be found there

Hope this helps
Eric

Last edited by begooden-it; 10-31-11 at 12:50.
Reply With Quote
  #5 (permalink)  
Old 10-31-11, 12:50
DBFinder DBFinder is offline
Registered User
 
Join Date: Sep 2008
Location: Toronto,Canada
Posts: 606
Thanks,

Actually I still needed it. I will try this today !

Thanks again
Reply With Quote
  #6 (permalink)  
Old 10-31-11, 12:52
DBFinder DBFinder is offline
Registered User
 
Join Date: Sep 2008
Location: Toronto,Canada
Posts: 606
Yes, I will manage it with SQL joins ( and filters of course) to cook it. Especially X locks.
Reply With Quote
  #7 (permalink)  
Old 11-01-11, 10:47
DBFinder DBFinder is offline
Registered User
 
Join Date: Sep 2008
Location: Toronto,Canada
Posts: 606
Quote:
Originally Posted by begooden-it View Post

Why don't you install Open Admin Tool to have a graphical view of this and muuuuuch more.

It is free and can be found there

Hope this helps
Eric
Well I will install it in my personal lab, @ work it is not my decision.

How can we set SQL queries output to Tabular text form. Currently it is coming like a list. Like other databases , eg oracle, db2 , mssql ??

Also if I can find invalid objects in the database ??

Database Objects Status (Invalid)

Thanks for your time
DBFinder
Reply With Quote
  #8 (permalink)  
Old 11-01-11, 10:59
begooden-it begooden-it is offline
Registered User
 
Join Date: Sep 2011
Location: Pont l'Abbé, Brittany, France
Posts: 183
1) to have the flat thing:
unload to filename DELIMITER "thecharacter you want"
SELECT ...
FROM ...

2) what do you mean for invalid objects ?
Eric
Reply With Quote
  #9 (permalink)  
Old 11-01-11, 11:04
DBFinder DBFinder is offline
Registered User
 
Join Date: Sep 2008
Location: Toronto,Canada
Posts: 606
1) could not understand this : sorry ! can you write an example ??

2) Actually invalid objects means as in db2 and oracle, if we drop the table, the view on top of this table is marked INVALID.
Same with triggers.

Regards
Reply With Quote
  #10 (permalink)  
Old 11-01-11, 11:12
DBFinder DBFinder is offline
Registered User
 
Join Date: Sep 2008
Location: Toronto,Canada
Posts: 606
Quote:
Originally Posted by DBFinder View Post
1) could not understand this : sorry ! can you write an example ??
Quote:
1) to have the flat thing:
unload to filename DELIMITER "thecharacter you want"
SELECT ...
FROM ...
I figured this out. Lots thanks to you.

Is there a way to specify console instead of filename ??

Regards
Reply With Quote
  #11 (permalink)  
Old 11-02-11, 02:38
begooden-it begooden-it is offline
Registered User
 
Join Date: Sep 2011
Location: Pont l'Abbé, Brittany, France
Posts: 183
Hi,

sorry for the late response, but yesterday was holiday here in France.
1) unload will require a file handle as argument, so you can "unload to /dev/tty/pts2" for instance. Beware, you will have to filter out "database selected" "xxx rows unloaded" and other eventual error message.
2) you can also used instead
ouput to pipe " awk ' { some script } '" without headings
but if the result line is longer thant 80 character, the data will be presented as
1 row per column
3) take a look at the sqsl utility, available for free in the iiug software repository. In addition to find bunches of useful utilities, I think sqsl is what you want because it allows you to format the data.
you'll find what it is here and dowload it here


4) I need to figure out. At my knowlege there is no way to dected in a direct manner such invalid objects. But I may be wrong. If someone has ideas, welcome :-)

regards
Eric

Best
Eric

Last edited by begooden-it; 11-02-11 at 17:41.
Reply With Quote
  #12 (permalink)  
Old 11-02-11, 17:39
DBFinder DBFinder is offline
Registered User
 
Join Date: Sep 2008
Location: Toronto,Canada
Posts: 606
Thanks Eric,

Your effort appreciated. Not a rush, I will be helping informix dba complete his assignment given by his manager in next two weeks.
Invalid objects are usually searched for as a part of monitoring jobs. I am originally DB2 DBA.

Regards
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On