Thursday, July 28, 2011

View Hardware & OS Statistics Using V$OSSTAT View

While I was checking the audit logs for a database I found a log tracking EM activities, I take a look inside and found it gathers some information on HW & OS using a view called v$osstat, I look at that view and found it will be helpful if  I include it in the database health check script.

In this view you can see the main server hardware info + Operating System statistics:

SQL> select stat_name,value from v$osstat;

STAT_NAME VALUE
----------- ------
NUM_CPUS 8 ->Available CPUs in the machine.
IDLE_TIME 1708663701 ->Idle time for ALL CPUs combined [Since the instance startup].
BUSY_TIME 11490541 ->Busy time for the CPUs combined [Since the instance startup].
USER_TIME 10565287 ->Time spent in User activities [Since the instance startup].
SYS_TIME 733707 ->Time spent in kernel activities [Since the instance startup].
IOWAIT_TIME 8517935 ->Time spent waiting for I/O to complete [Since the instance startup].
NICE_TIME 20455 ->Time spent in "low priority users"activities [Since the instance startup].
RSRC_MGR_CPU_WAIT_TIME 0 ->I don't know! -For the time being-
LOAD .009765625 ->Processes number waiting on the "run queue" = uptime command in Linux [Getting updated instantly]
NUM_CPU_CORES 8 ->Number of CPU cores.
NUM_CPU_SOCKETS 2 ->Number of Physical CPUs.
PHYSICAL_MEMORY_BYTES 8372563968 ->Physical memory size -in Bytes-.
TCP_SEND_SIZE_MIN 4096 ->>The rest are NICs related activities...
TCP_SEND_SIZE_DEFAULT 16384
TCP_SEND_SIZE_MAX 4194304
TCP_RECEIVE_SIZE_MIN 4096
TCP_RECEIVE_SIZE_DEFAULT 87380
TCP_RECEIVE_SIZE_MAX 4194304
GLOBAL_SEND_SIZE_MAX 1048576
GLOBAL_RECEIVE_SIZE_MAX 4194304


1 comment: