58 lines
1.6 KiB
SQL
58 lines
1.6 KiB
SQL
@@header
|
|
|
|
/*
|
|
*
|
|
* Author : Vishal Gupta
|
|
* Purpose : Display the OS statistic name
|
|
* Version : 10.1 and above
|
|
* Parameters : 1 - OS Statistic Name (Use % as wildcard and \ as escape character)
|
|
*
|
|
*
|
|
* Revision History:
|
|
* ===================
|
|
* Date Author Description
|
|
* --------- ------------ -----------------------------------------
|
|
* 05-Aug-12 Vishal Gupta Created
|
|
*
|
|
*/
|
|
|
|
|
|
/************************************
|
|
* INPUT PARAMETERS
|
|
************************************/
|
|
UNDEFINE statname
|
|
DEFINE statname="&&1"
|
|
|
|
|
|
|
|
COLUMN _statname NEW_VALUE statname NOPRINT
|
|
|
|
set term off
|
|
SELECT DECODE('&&statname','','%','&&statname') "_statname"
|
|
FROM DUAL;
|
|
set term on
|
|
|
|
|
|
Prompt
|
|
Prompt ***************************************************************************************************
|
|
Prompt * ALL Statistics Names like '&&statname'
|
|
Prompt ***************************************************************************************************
|
|
|
|
COLUMN statistic# HEADING "Stat#" FORMAT 9999
|
|
COLUMN stat_name HEADING "Statistics Name" FORMAT a30
|
|
COLUMN cumulative HEADING "Cumulative" FORMAT a10
|
|
COLUMN comments HEADING "Comments" FORMAT a80
|
|
|
|
SELECT s.stat_name
|
|
, s.cumulative
|
|
, s.comments
|
|
FROM v$osstat s
|
|
WHERE ( UPPER(stat_name) like UPPER('&&statname') ESCAPE '\'
|
|
OR UPPER(comments) like UPPER('&&statname') ESCAPE '\')
|
|
ORDER BY UPPER(stat_name)
|
|
;
|
|
|
|
UNDEFINE statname
|
|
|
|
@@footer
|