The Oracle view V$OSSTAT holds a few operating statistics, including:
- IDLE_TICKS Number of hundredths of a second that a processor has been idle, totalled over all processors
- BUSY_TICKS Number of hundredths of a second that a processor has been busy executing user or kernel code, totalled over all processors
The documentation I've read has not been clear as to whether these are ever reset. Does anyone know?
Another question I have is that I'd like to work out the average CPU load the system is experiencing. To do so I expect I have to go:
busy_ticks / (idle_ticks + busy_ticks)
Is this correct?
Update Nov 08
Oracle 10g r2 includes a stat called LOAD in this table. It provides the current load of the machine as at the time the value is read. This is much better than using the other information as the *_ticks data is "since instance start" not as of the current point in time.