AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.


#Power
 View Only
  • 1.  help with script to check errpt

    Posted Mon March 09, 2009 07:26 AM

    Originally posted by: new2aix


    I have a script that runs hourly, it checks for entries in the errpt that have occured in the previous hour, this works perfectly unless the error occurs between 23:00 and 23:59 as the script runs on the hour i need to put in a clause that will look for the error in the previous day from 23:00
    Please can someone assist.
    Thanks
    #AIX-Forum


  • 2.  Re: help with script to check errpt

    Posted Mon March 09, 2009 12:05 PM

    Originally posted by: hdkutz


    Hello,
    look into this
    http://www.ibm.com/developerworks/forums/thread.jspa?messageID=14023159&#14023159
    thread.

    HTH,
    Cheers,
    ku
    #AIX-Forum


  • 3.  Re: help with script to check errpt

    Posted Mon March 09, 2009 03:25 PM

    Originally posted by: j.gann


    aix has a mechanism named "errnotify" which allows you to specify a command (a script e.g.) to be executed as soon as an errorlog entry occurs. thats what I'd use for event monitoring.
    #AIX-Forum


  • 4.  Re: help with script to check errpt

    Posted Thu March 19, 2009 12:51 AM

    Originally posted by: SystemAdmin


    One possibility is to have two entries in crontabs: one for hours 1-23 and another for hour 0. The hour 0 program always runs at a particular time, so it will always run with the check for hour 23 of the previous day.

    You may wish to play with the TZ variable, as this can be used to set the date to the previous day; e.g.

    (TZ=aaa-11; date) # In Sydney, Australia this displays the current time & date

    (TZ=aaa+13; date) # This displays the date and time for 24 hours ago

    You will have to play with the offset, but this can be made to make out the shell script is running at a particular time. Leave out the brackets; you only need these when testing.
    #AIX-Forum