LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > AIX
User Name
Password
AIX This forum is for the discussion of IBM AIX.
eserver and other IBM related questions are also on topic.

Notices

Reply
 
LinkBack Search this Thread
Old 11-05-2009, 02:43 AM   #1
engee
LQ Newbie
 
Registered: Jun 2009
Posts: 4

Rep: Reputation: 0
executing db2diag remotely


Hi guys,

I've run into a bit of a problem here, I've got this script that runs db2diag on the various instances on the server, it works like a charm when I execute it locally, but when I execute it remotely via our scheduler it seems something is missing. The script runs fine without any errors (that I can see) with the only downside that db2diag doesn't generate anything, just empty logs.

Code:
function check_error
{
     if [ "$VERBOSE_LOGGING" = 'high' ]; then
          set -vx
     fi

db2diag -time $TIME1 -l Error|egrep -v -p -f db2.exclude>$f1

     if [ -s "$f1"  ]; then
          /usr/bin/mail -s "New errors in $db2inst on $HOST" $db2diagmail < $f1
     else
          echo $TIME1 > ${db2inst}/time.error
     fi
}
Result is the same if I 2>&1 to a logfile instead of egrepping.

Could it be the environment not being properly set even though .profile is executed earlier in the script?

Have any of you guys experienced the same or a similar issue, or got any clues about what might be causing this?
 
Old 11-18-2009, 06:10 PM   #2
MBybee
Member
 
Registered: Jan 2009
Location: wherever I can make a living
Distribution: PC-BSD / FreeBSD / Debian / Ubuntu / Win7 / OpenVMS
Posts: 438

Rep: Reputation: 56
How are you executing it when you call it remotely?
 
Old 11-26-2009, 09:38 AM   #3
engee
LQ Newbie
 
Registered: Jun 2009
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by MBybee View Post
How are you executing it when you call it remotely?
I get the same "result" when I'm submitting it via crontab, so I dare say it's environmental, don't suppose you've got a good checklist I can lend?
 
Old 11-30-2009, 10:27 AM   #4
MBybee
Member
 
Registered: Jan 2009
Location: wherever I can make a living
Distribution: PC-BSD / FreeBSD / Debian / Ubuntu / Win7 / OpenVMS
Posts: 438

Rep: Reputation: 56
Quote:
Originally Posted by engee View Post
I get the same "result" when I'm submitting it via crontab, so I dare say it's environmental, don't suppose you've got a good checklist I can lend?
You might want to try using 'readfile':

db2diag -l severe -H 12d -readfile $HOME/sqllib/db2dump/db2diag.log > /shared/reports/db2diag.report

That, and make sure you have the profile set, the environment set, etc etc.

<edit>Here's a pub lib link that has all the switches: http://publib.boulder.ibm.com/infoce...c/r0011728.htm </edit>

Last edited by MBybee; 11-30-2009 at 10:34 AM. Reason: added a publib link for reference
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Executing a *.bin file remotely on Linux AndrewNew Linux - Newbie 3 05-15-2008 06:38 AM
X remotely gloomz Linux - General 3 01-10-2008 04:38 PM
cron not executing yusufs Linux - Newbie 38 12-27-2007 06:01 PM
X remotely linuxnube Linux - General 3 01-26-2004 04:17 AM
Executing X-Programs remotely frankieboy Linux - General 3 10-08-2003 03:31 AM


All times are GMT -5. The time now is 10:38 AM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration