How to find free memory of Server and other OS Metrics in Oracle

In this post we will see some of the important OS metrics in oracle. At the start of AWR report you will find Host Name, Platform, CPUs, Cores, Sockets, Memory. Do you know where you can find these details in oracle ? This post will give answers to these questions. Also this post will tell you how to find the available free memory of host.

  • Host Name:

This is known to every DBA that host name is present in V$INSTANCE view. This tells us that on which host our database resides.

SQL> select HOST_NAME from v$instance;

  • Platform Name:

This metric tells us that on which platform our database resides. It may be Windows, Linux, Solaris, Unix etc. You can find this metric using V$DATABASE view.

SQL> select platform_name from v$database;

Microsoft Windows x86 64-bit
  • CPUs, Cores, Sockets, Load, Physical Memory and Free Memory:

We can get the information of CPUs, Cores, Sockets, Load, Physical Memory and Free Memory using Oracle. V$OSSTAT view contains these statistics. Also these statistics are not cumulative. These are the real time statistics. Below table shows us the description of these statistics from V$OSSTAT view.

Stat Name Description
LOAD Number of processes running or waiting on the run queue
NUM_CPUS Number of active CPUs
NUM_CPU_CORES Number of CPU cores
NUM_CPU_SOCKETS Number of physical CPU sockets
PHYSICAL_MEMORY_BYTES Physical memory size in bytes
FREE_MEMORY_BYTES Physical free memory in bytes

Below query gives you these metrics.

  2    STAT_NAME,
  4    || ' GB','FREE_MEMORY_BYTES',(ROUND(VALUE            /1024/1024/1024,2))
  5    || ' GB',VALUE ) VALUE
  6  FROM
  7    v$osstat
  8  WHERE
  9    stat_name IN ( 'FREE_MEMORY_BYTES', 'LOAD', 'NUM_CPUS', 'NUM_CPU_CORES',

STAT_NAME                      VALUE
------------------------------ --------------------
NUM_CPUS                       2
LOAD                           .2548828125
NUM_CPU_CORES                  2
NUM_CPU_SOCKETS                1
FREE_MEMORY_BYTES              .85 GB

6 rows selected.


If you like the post, don’t forget to share it with friends. If you don’t want to miss any blog update then subscribe to E-Mail alerts or hit like on Facebook page.

How to find free memory of Server and other OS Metrics in Oracle

Leave a Reply