Automating a Crontjob to tell me when my Database files exeed 1GB ??Help ?? - Aix

This is a discussion on Automating a Crontjob to tell me when my Database files exeed 1GB ??Help ?? - Aix ; HI, our database replication stopped the other week... the cause was found to be if the transaction log files grow over 1GB the replication stops, thus eventually the live database ground to a halt due to no replication happening. GOD ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Automating a Crontjob to tell me when my Database files exeed 1GB ??Help ??

  1. Automating a Crontjob to tell me when my Database files exeed 1GB ??Help ??

    HI,

    our database replication stopped the other week... the cause was found
    to be if the transaction log files grow over 1GB the replication
    stops, thus eventually the live database ground to a halt due to no
    replication happening. GOD KNOWS how ASK THE DBA'S .

    Well my job now is to automate something script wise or cronjob wise
    to alert me on the size of these file in a mail I thought would be
    nice.

    You're assistance is much appreciated.

    And I dont know Y Nagios can monitor these files for me, but am still
    getting my head around that issue.

    So a Temp Cronjob in themeantime would be the quickest solution.

    Again
    You're assistance is much appreciated.

  2. Re: Automating a Crontjob to tell me when my Database files exeed 1GB?? Help ??

    On Sep 1, 4:10 am, cozcorp wrote:
    > HI,
    >
    > our database replication stopped the other week... the cause was found
    > to be if the transaction log files grow over 1GB the replication
    > stops, thus eventually the live database ground to a halt due to no
    > replication happening. GOD KNOWS how ASK THE DBA'S .
    >
    > Well my job now is to automate something script wise or cronjob wise
    > to alert me on the size of these file in a mail I thought would be
    > nice.
    >
    > You're assistance is much appreciated.
    >
    > And I dont know Y Nagios can monitor these files for me, but am still
    > getting my head around that issue.
    >
    > So a Temp Cronjob in themeantime would be the quickest solution.
    >
    > Again
    > You're assistance is much appreciated.


    Not an answer to your original question but you should check whether
    or not the dba user has a file size limit set to 1GB.
    $ lssec -f /etc/security/limits -s MyDBAuser -a fsize

    To answer your question - The cron entry could look like:
    # If the Filesize exceeds 990 MB send root an email.
    /usr/bin/du -m MyReplicationFile | /usr/bin/awk '{ if ( $1 > 990 )
    { system ( "echo ALERT | mail root ") }}'

    hth
    Hajo

+ Reply to Thread