Oracle 视图 V$SYSMETRIC_HISTORY 官方解释,作用,如何使用详细说明

本站中文解释

V$SYSMETRIC_HISTORY是Oracle数据库中所有数据库指标的历史数据视图,可以查看某个时间段内某个指标的数据进行分析。它可以安装以下筛选条件来检索相应的数据:

1、HOST : 要检索的主机名
2、METRIC_GROUP : 要查看的指标组
3、METRIC_NAME : 要查看的指标名
4、INTERVAL_MIN : 要查看的时间间隔

例如,可以使用如下查询来查看当前主机上收集到的最近30分钟内CPU利用率的历史数据:

SELECT * FROM V$SYSMETRIC_HISTORY
WHERE HOST = SYS_CONTEXT (‘USERENV’, ‘HOST’)
AND METRIC_GROUP = ‘CPU’
AND METRIC_NAME = ‘%Utilization’
AND INTERVAL_MIN = 30
ORDER BY TIMESTAMP ASC;

官方英文解释

V$SYSMETRIC_HISTORY displays all system metric values available in the database. Both long duration (60-second with 1 hour history) and short duration (15-second with one-interval only) metrics are displayed by this view.
Column Datatype Description

BEGIN_TIME

DATE

Begin time of the interval

END_TIME

DATE

End time of the interval

INTSIZE_CSEC

NUMBER

Interval size (in hundredths of a second)

GROUP_ID

NUMBER

Metric group ID

METRIC_ID

NUMBER

Metric ID

METRIC_NAME

VARCHAR2(64)

Metric name

VALUE

NUMBER

Metric value

METRIC_UNIT

VARCHAR2(64)

Metric unit description

CON_ID

NUMBER

The ID of the container to which the data pertains. Possible values include:

  • 0: This value is used for rows containing data that pertain to the entire CDB. This value is also used for rows in non-CDBs.

  • n: Where n is the applicable container ID for the rows containing data

See Also:

  • “DBA_HIST_SYSMETRIC_HISTORY”

  • “V$CON_SYSMETRIC_HISTORY”

  • “DBA_HIST_CON_SYSMETRIC_HIST”


数据运维技术 » Oracle 视图 V$SYSMETRIC_HISTORY 官方解释,作用,如何使用详细说明