Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,367

    Unanswered: 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?

  2. #2
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    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.

  3. #3
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    If the file already exists it will not ask the question.

    Andy

  4. #4
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,367
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •