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 > DB2 > PHP and db2diag command

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-05-08, 11:18
db2rocks db2rocks is offline
Registered User
 
Join Date: Jan 2008
Posts: 45
PHP and db2diag command

Hi friends,

I am writing a PHP script to monitor db..Does any one know if we can call db2diag command or list history command inside php??

I know there is ADMIN_CMD proc but it does not allow for db2diag command or list history

Thanks in advance
Reply With Quote
  #2 (permalink)  
Old 03-05-08, 15:47
azs0309 azs0309 is offline
Registered User
 
Join Date: Jan 2008
Posts: 88
check out in application development guide...
Reply With Quote
  #3 (permalink)  
Old 03-06-08, 04:55
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
db2diag is not a DB2 command but rather a program. Thus, you cannot invoke it through ADMIN_CMD.
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
Reply With Quote
  #4 (permalink)  
Old 03-11-08, 16:29
db2rocks db2rocks is offline
Registered User
 
Join Date: Jan 2008
Posts: 45
Can we invoke using C code??If so can you provide me some inputs as to how can i do that

thanks a lot
Reply With Quote
  #5 (permalink)  
Old 03-11-08, 17:26
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
You could write a UDF or stored procedure with LANGUAGE C. Inside the routine, I would open a simple pipe (see "man popen") to invoke "db2diag" with the desired options and get its output.
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
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