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 > scheduling db2top (batch mode) in crontab?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-27-12, 11:51
db2girl db2girl is offline
∞∞∞∞∞∞
 
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 1,816
scheduling db2top (batch mode) in crontab?

Need to do performance analysis. Scheduled snapshot/db2pd collection in crontab. Previous DBA used db2top to collect this info, so they're looking for the same this time. I'm not sure if it's possible because it doesn't run if the question is not answered. For example:


db2top -d xxxxx -C -i 30 -m 1 -f <file name>
[11:35:16] Starting DB2 snapshot data collector, collection every 30 second(s), max duration 1 minute(s), max file growth/hour 100.0M, hit <CTRL+C> to cancel...
[11:35:16] Writing to '/mksysb_fs/benchmark/scripts/bella/TEST_DB2TOP/db2top3.out', should I create a named pipe instead of a file [N/y]? N
[

Is there a way to schedule db2top (batch mode) in crontab?
Reply With Quote
  #2 (permalink)  
Old 01-27-12, 12:46
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
Something like this ???

Code:
echo N > /tmp/x ; db2top -d sample -C -i 30 -m 1 -f me1 < /tmp/x &
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
  #3 (permalink)  
Old 01-27-12, 12:47
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
If the file already exists it will not ask the question.

Andy
Reply With Quote
  #4 (permalink)  
Old 01-29-12, 09:58
db2girl db2girl is offline
∞∞∞∞∞∞
 
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 1,816
Andy's suggestion worked great. Touched a file prior to the first run and then rename it to append the timestamp after every run. Thanks.
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