Get cpu memory info of db server - oracle database script

Get cpu memory info of db server - Oracle Database Script.

SET pagesize 200
SET lines 200 col name
FOR a21 col stat_name
FOR a25 col value
FOR a13 col comments
FOR a56
SELECT STAT_NAME,
       to_char(VALUE) AS VALUE,
       COMMENTS
FROM v$osstat
WHERE stat_name IN ('NUM_CPUS',
                    'NUM_CPU_CORES',
                    'NUM_CPU_SOCKETS')
UNION
SELECT STAT_NAME,
       VALUE/1024/1024/1024 || ' GB',
       COMMENTS
FROM v$osstat
WHERE stat_name IN ('PHYSICAL_MEMORY_BYTES');