AIX

AIX

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


#Power
 View Only
  • 1.  Uptime Report

    Posted Fri February 26, 2010 01:06 PM

    Originally posted by: SystemAdmin


    Hi,

    Does anyone have a script which would generate a monthly uptime report?

    The details we need are in a month:

    How long the server has been up (in mins or secs)

    How long the server has been down (in mins or secs)

    Total number of reboots (shutdowns/halts normal or abnormal)

    We have been manually calculating this. Its a painful task every month.

    r/
    R
    #AIX-Forum


  • 2.  Re: Uptime Report

    Posted Sun February 28, 2010 11:27 PM

    Originally posted by: SystemAdmin


    We accomplish this by sorting a performance log which contains timestamped vmstat data for every minute, and sending a summary of the missing entries to a report server. The report server then collates all of the results and generates the weekly uptime report. The problem is that the final script generates a HTML report, and unless you have the various scripts and programs needed for HTML, it probably won't work.

    It would be easier for us to generate a monthly report than a weekly one, since we store our performance data in a monthly file and weekly reports do need to cross the monthly files; so naturally our managers want a weekly report.
    #AIX-Forum


  • 3.  Re: Uptime Report

    Posted Wed March 03, 2010 03:53 AM

    Originally posted by: SystemAdmin


    Thanks .Spook. But I was looking for something on the lines of a script running on AIX to extract this information from last/errpt etc and show me the details. I can then put it in a report.

    r/
    R
    #AIX-Forum


  • 4.  Re: Uptime Report

    Posted Wed March 03, 2010 05:51 AM

    Originally posted by: hdkutz


    Hello,
    I remember the Redbook "Managing Large AIX Server Farms".
    Maybe there is some Scripting which you might use for your Problem?
    http://www.google.de/#hl=de&source=hp&q=Managing+Large+AIX+Server+Farms&btnG=Google-Suche&meta=&aq=f&oq=Managing+Large+AIX+Server+Farms&fp=c197c8645cc215d6

    Cheers,
    ku
    #AIX-Forum


  • 5.  Re: Uptime Report

    Posted Wed March 03, 2010 11:12 AM

    Originally posted by: SystemAdmin


    The tough part is calculating the total uptime and downtime. The problem is that if a system goes down, there is not a reliable indicator built into the OS that tells when it went down... only when it came up.

    If the minutes of uptime/downtime are important, then you need to add a process that accumulates uptime data. If you have SNMP managment tools in place, I'm pretty sure uptime is available in the AIX MIB. Uptime reporting is a pretty standard feature in managment tools, so I think you might want to explore what you have available in your managment framework.

    If you don't have that available, I'd suggest writing a script that looked at the current time and compared it to a value logged in a file. If the time difference was greater than the sampling interval, you can assume that there was a period of downtime, and you can calculate the amount of that downtime, and add that to an accumulated downtime total, and increment a reboot count. Then at the end of your reporting period you can calculate the uptime downtime.
    #AIX-Forum


  • 6.  Re: Uptime Report

    Posted Wed March 03, 2010 11:12 AM

    Originally posted by: SystemAdmin


    The tough part is calculating the total uptime and downtime. The problem is that if a system goes down, there is not a reliable indicator built into the OS that tells when it went down... only when it came up.

    If the minutes of uptime/downtime are important, then you need to add a process that accumulates uptime data. If you have SNMP managment tools in place, I'm pretty sure uptime is available in the AIX MIB. Uptime reporting is a pretty standard feature in managment tools, so I think you might want to explore what you have available in your managment framework.

    If you don't have that available, I'd suggest writing a script that looked at the current time and compared it to a value logged in a file. If the time difference was greater than the sampling interval, you can assume that there was a period of downtime, and you can calculate the amount of that downtime, and add that to an accumulated downtime total, and increment a reboot count. Then at the end of your reporting period you can calculate the uptime downtime.
    #AIX-Forum


  • 7.  Re: Uptime Report

    Posted Wed March 03, 2010 11:12 AM

    Originally posted by: SystemAdmin


    The tough part is calculating the total uptime and downtime. The problem is that if a system goes down, there is not a reliable indicator built into the OS that tells when it went down... only when it came up.

    If the minutes of uptime/downtime are important, then you need to add a process that accumulates uptime data. If you have SNMP managment tools in place, I'm pretty sure uptime is available in the AIX MIB. Uptime reporting is a pretty standard feature in managment tools, so I think you might want to explore what you have available in your managment framework.

    If you don't have that available, I'd suggest writing a script that looked at the current time and compared it to a value logged in a file. If the time difference was greater than the sampling interval, you can assume that there was a period of downtime, and you can calculate the amount of that downtime, and add that to an accumulated downtime total, and increment a reboot count. Then at the end of your reporting period you can calculate the uptime downtime.
    #AIX-Forum