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