SELECT 'SYS::' || METRIC_NAME AS METRIC, ROUND(VALUE,3) AS VALUE
 FROM V$SYSMETRIC WHERE GROUP_ID = 2
UNION
  SELECT 'SYSPARAM::' || INITCAP(NAME), to_number(VALUE)
  FROM V$SYSTEM_PARAMETER WHERE NAME IN ('sessions', 'processes', 'db_files')
UNION
 SELECT 'SESSION::Long time locked' ,count(*) FROM V$SESSION s WHERE s.BLOCKING_SESSION IS NOT NULL AND s.BLOCKING_SESSION_STATUS='VALID' AND s.SECONDS_IN_WAIT > {$ORACLE.SESSION.LOCK.MAX.TIME}
UNION
SELECT 'SESSION::Lock rate' ,(cnt_block / cnt_all)* 100 pct
FROM ( SELECT COUNT(*) cnt_block FROM v$session WHERE blocking_session IS NOT NULL), ( SELECT COUNT(*) cnt_all FROM v$session)
UNION
 SELECT 'SESSION::Total', COUNT(*) FROM V$SESSION
UNION
SELECT 'SESSION::' || INITCAP(STATUS)|| ' ' || INITCAP(TYPE), COUNT(*) FROM V$SESSION GROUP BY STATUS, TYPE
UNION
SELECT 'SESSION::Concurrency rate', NVL(ROUND(SUM(duty_act.cnt*100 / num_cores.val)), 0)
FROM
( SELECT DECODE(session_state, 'ON CPU', 'CPU', wait_class) wait_class, ROUND(COUNT(*)/(60 * 15), 1) cnt
FROM v$active_session_history sh
WHERE sh.sample_time >= SYSDATE - 15 / 1440 AND DECODE(session_state, 'ON CPU', 'CPU', wait_class) IN('Concurrency')
GROUP BY DECODE(session_state, 'ON CPU', 'CPU', wait_class)) duty_act,
( SELECT SUM(value) val FROM v$osstat WHERE stat_name = 'NUM_CPU_CORES') num_cores
UNION
 SELECT 'PGA::' || INITCAP(NAME), VALUE FROM V$PGASTAT
 UNION
SELECT 'PROC::Procnum', COUNT(*) FROM v$process
UNION
SELECT 'DATAFILE::Count', COUNT(*) FROM v$datafile;