6.11 ahfscope

Use the ahfscope command to manage AHF Scope.

Syntax

ahfscope [flags] [parameters]
-f name
-i
-q value[,value]
	minutes
	clob
	psec
-C
-D item[,item]
	feed
	db
	input
	probes
	rootcause
	topology
	unit

Parameters

Table 6-8 ahfscope Command Parameters

Parameter Description

-f name

Specify to read from a file.

If you do not specify the file extension, then AHF Scope assumes .mdb as the file extension.

-i

Specify to run ahfscope in interactive mode (recommended). This option permits entering additional commands that are not available from the GUI.

ahfscope -i When started with this option, a cha> command-line prompt appears in the operating system terminal. This can be used to enter terminal commands not available on the graphical panels. These commands are enumerated by entering help at the prompt.

-q value[,value]

Specify to configure the connection and queries executed in the GIMR. Do not use this option with the -f option.

Specify a comma-delimited list for optional parameters with no spaces.
  • minutes: Specify to query time period in minutes. Default: 60 minutes, Minimum: 2 minutes.
  • clob: Specify to use sql.clob.
  • psec: Specify to postpone the query in seconds. Default: sampling period. Minimum: 1 second

Option -q minutes sets the amount of data based upon time for the initial query. Since the sampling rate is 5 seconds, in the default data set with 60 minutes will contain 720 data points. Note that when longer times are selected via the -q option, a substantial time might be added to the startup process, especially when the monitored configuration has many nodes and databases. The maximum number of minutes in this option is determined by the width of the screen (number of pixels) divided by the number of samples per minute, which is 12 for the 5 second sample interval. For example, on a standard FHD monitor with 1920 horizontal pixels the number of minutes is limited to 160, or 2 hours and 40 minutes.

Option -q pseconds adjusts the delay between the "time in the query" versus "time of the query". The time of the query must trail the time in the query. The smaller the delay, the closer the display is to the real-time. Default delay is one sampling period: 5 seconds. Regardless the delay, a sample always provide 5 seconds of data. For example -qp10 would cause that a query for 5 seconds of data in the period of 10:20--10:25 would be invoked at 10:35 or later. Use this option when you observe that CHA is too slow and cannot commit transactions on time for AHF Scope. In such a case random gaps in data might be indicated. On a fast system even -qp1 can be used without any adverse effects.

Option -q clob directs AHF Scope to use alternative path of retrieving CLOB from the database. In some versions of Oracle Database a direct retrieving of CLOB from SQL query leads to fragmentation in the database. When user enters this option -qc, AHF Scope uses a 2-step process to obtain CLOB's, with an explicit disposal command. Elapsed time for every query will increase.

-C

Specify to extract the selected data from the .mdb file in JSON format. Use this option only with the -f option.

-D item[,item]

Specify to set the debug mode.

Use this option to obtain a complete copy of the data received by AHF Scope stored in a file called .mdb file after Management Database. This file can be used as an argument with the -f file option.

Specify a comma-delimited list for optional parameters with no spaces.
  • feed: Specify to view timings of all data queries.
  • db: Specify to activate alter session set event 10046.
  • input: Specify to copy input data (CLOB) to a log file.
  • probes: Specify to use internal probe names.
  • rootcause: Specify to inform about start and stop of any rootcause
  • topology: Specify to view changes in the set of entities ('topology').
  • unit: Specify to view warnings about implicit settings for units of measure.

Note:

On a Microsoft Windows system, enclose all comma-separated arguments with double-quotes.

For example: "-Dprobes,input", or shorter "-Dp,i".

AHF Scope Modes

AHF Scope can operate in several modes:
  • With a default connection to GIMR database
  • Read in a text file with monitoring data (option -f).
  • Parse text file with data and generate JSON object with information similar to query "diagnosis" (option -C).

Default connections initiate a live session and provide real-time monitoring. The connection to the GIMR database is established via JDBC using Oracle JDBC thin driver.

Using an MDB file as a parameter (Option -f) directs AHF Scope to analyze textual data extracted from a GIMR or data collected during a live session. This data is held in a *.mdb file. A *.mdb file can be generated from GIMR using command chactl export repository. An example of obtaining one hour worth of data:
host:/dir> chactl export repository -format mdb -start '2018-11-22 09:30:00' -end '2018-11-22 10:30:00'
successfully dumped the CHA statistics to location "/hostname/trc/chad/cha_dump_20181122_093000_20181122_103000.mdb"

Using option -C will start AHF Scope without the GUI front end. AHF Scope will only parse the mdb file and generate a JSON file, similar to the file generated by chadiag. This data can be used by other tools to indicate periods of time in which CHA diagnosed problems.

When AHF Scope is invoked without any command line options, AHF Scope uses JDBC to connect to the GIMR database and operates in a real-time mode as an active monitor. Connection credentials will be obtained from Oracle Wallet or from the manual input in the login console. After the connection is established, AHF Scope retrieves a data set with the most recent N-minutes of data. In a first invocation of AHF Scope the data set contains 60 minutes, unless option -q is used. In any subsequent invocation the number of minutes in the data set corresponds to the width of the window selected by the user.