Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2003
    Posts
    21

    Unanswered: Monitoring Log switch

    Hi all,

    Is there a way to monitor the Log switch (using circular or archived logs)?
    I need to evaluate how much GB/day logs my database is generating.

    thanks,
    Vincent

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    With archival logging, all you have to do is look at the the file sizes for the log files for a particular date. With circular logging, the only way to tell is if the circle is big enough to encompass more than a day.

    Andy

  3. #3
    Join Date
    Jan 2003
    Posts
    21
    Do you mean, there is no way to query for log consumption (no select in a dictionary object or message in the db2diag.log)?

    Tx

  4. #4
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    If you do a db snapshot, there are several things that might help you. You would have to do a snapshot at the start of the day, and another at the end of the day and do the subtraction to get the daily net totals.

    db2 get snapshot for db on <db-name>

    Things to look at are:

    • Log pages written (you would multiply this by 4K to get the bytes)
    • File number of current active log (if you know the number of log files used per day, multiply the number of pages in the log files by 4K by the number of logs used that day. This will not be an exact number of bytes since it only tells you the number of full or partial logs used and if your log file size is large it could not very percise).


    I would do both of these since the number of log pages written may be a lot more than the log file sizes (not sure).
    Last edited by Marcus_A; 05-29-08 at 02:56.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  5. #5
    Join Date
    Jan 2003
    Posts
    21
    Thanks MArcus_A,
    I will look that way.

    Vincent

Posting Permissions

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