Monitoring and Managing Exadata Storage Servers with ExaCLI

Learn to use the ExaCLI command-line utility to perform monitoring and management functions on Exadata storage servers in the Exadata Cloud Service.

About the ExaCLI Command

The ExaCLI command provides a subset of the commands found in the on-premises Exadata command line utility.

ExaCLI offers a subset of the commands found in the on-premises Exadata command line utility. The utility runs on the database compute nodes in the Exadata Cloud Service.

Exadata Storage Server Username and Password

You need a username and password to connect to the Exadata Storage Server.

On Exadata Database Service on Cloud@Customer, the preconfigured user for Exadata Storage Server is cloud_user_clustername, where clustername is the name of the virtual machine (VM) cluster that is being used.

You can determine the name of the VM cluster by running the following crsctl command as the grid user on any cluster node:
crsctl get cluster name
The password for cloud_user_clustername is initially set to a random value, which you can view by running the following command as the opc user on any cluster node:
/opt/exacloud/get_cs_data.py

ExaCLI Command

Use ExaCLI (exacli) to configure cell, database node configuration, and objects in the remote node environment, and to monitor your Oracle Exadata Database Service on Cloud@Customer service and objects.

Purpose

ExaCLI (exacli) enables you configure your Oracle Exadata Database Service on Cloud@Customer system, and to obtain real-time information about your Exadata Cloud Service. To obtain information about the services and options on your system, run ExaCLI using the monitoring command parameter that you require.

To obtain a list of the system monitoring parameters you can use with ExaCLI, run the LIST parameter.

Syntax

exacli -c [username@]remotehost[:port] 
[-l username] 
[--xml] 
[--cookie-jar filename] 
[-e {command | 'command; command' | @batchfile}]

Options

Option Description

-c [username@]remotehost or --connect [username@]remotehost[:port]

Specifies the remote node to which you want to connect. ExaCLI prompts for the user name if not specified.

-l username or --login-name username

Specifies the user name to log into the remote node. The preconfigured user is cloud_user_clustername.

--xml

Displays the output in XML format.

--cookie-jar [filename]

Specifies the file name of the cookie jar to use. If you do not specify a file name, then the cookie is stored in a default cookie jar located at HOME/.exacli/cookiejar, where HOME is the home directory of the operating system user running the exacli command.

The presence of a valid cookie allows the ExaCLI user to run commands without requiring the user to log in during subsequent ExaCLI sessions.

-e command or -e 'command[; command]' or -e @batchFile

Specifies either the ExaCLI commands to run, or a batch file. After running the commands, ExaCLI quits.

If you are specifying multiple commands to run, then enclose the commands in single quotes to prevent the shell from interpreting the semicolon.

To start an interactive ExaCLI session, omit this command.

--cert-proxy proxy[:port] Specifies the proxy server that you want to use when downloading certificates. If port is omitted, then port 80 is used by default.

-n or --no-prompt

Suppresses prompting for user input.

Command Parameters

To obtain information about objects and services on your system, use these ExaCLI command parameters.

Table 7-1 Command

Command Parameter Description

ACTIVEREQUEST

Lists all active requests that are currently being served by the storage servers.

ALERTDEFINITION

Lists all possible alerts and their sources for storage servers.

ALERTHISTORY

Lists all alerts that have been issues for the storage servers.

CELL

Used to list the details of a specific attribute of the storage servers or storage cells. The syntax is as follows: LIST CELL ATTRIBUTES A,B,C, with A, B, and C being attributes. To see all cell attributes, use the LIST CELL ATTRIBUTES ALL command.

CELLDISK

Lists the attributes of the cell disks in the storage servers. Use the following syntax to list the cell disk details: LIST CELLDISK cell_disk_name DETAIL.

DATABASE

Lists details of the databases. Uses the regular LIST command syntax: LIST DATABASE and LIST DATABASE DETAIL. You can also use this command to show an individual attribute with the following syntax: LIST DATABASE ATTRIBUTES NAME.

FLASHCACHE

Lists the details of the Exadata system's flash cache. For this object, you can use the following syntax patterns: LIST FLASHCACHE DETAIL or LIST FLASHCACHE ATTRIBUTES attribute_name.

FLASHCACHECONTENT

Lists the details of all objects in the flash cache, or the details of a specified object ID. To list all the details of all objects, use LIST FLASHCACHECONTENT DETAIL.

To list details for a specific object, use a where clause as follows: LIST FLASHCACHECONTENT WHERE objectNumber=12345 DETAIL.

Example query: finding the object_id value of an object
select object_name, data_object_id from user_objects where object_name = 'BIG_CENSUS';
OBJECT_NAME               DATA_OBJECT_ID
----------------------------------------
BIG_CENSUS                29152

FLASHLOG

Lists the attributes for the Oracle Exadata Smart Flash Log.

GRIDDISK

Lists the details of a particular grid disk. The syntax is similar to the CELLDISK command syntax. To view all attributes: LIST GRIDDISK grid_disk_name DETAIL. To view specified attributes of the grid disk: LIST GRIDDISK grid_disk_name ATTRIBUTES size, name.

IBPORT

Lists details of the InfiniBand ports. Syntax is LIST IBPORT DETAIL.

IORMPLAN

Use the ExaCLI CREATE, ALTER, DROP, and LIST commands with IORMPLAN. To see the details of all IORM plans, use LIST IORMPLAN DETAIL. You can also use the command to create and alter IORM plans, and to apply plans to storage servers.

IORMPROFILE

Lists any IORM profiles that have been set on the storage servers. You can also refer back to the profile attribute on the DATABASE object if a database has an IORM profile on it. Syntax is LIST IORMPROFILE.

LIST

Lists the command parameter options available with ExaCLI for the Exadata Database Service on Cloud@Customer services and objects.

LUN

The LUN (logical unit number) object returns the number and the detail of the physical disks in the storage servers. List the LUNs of the disks with LIST LUN. List the details of each LUN with LIST LUN lun_number DETAIL.

METRICCURRRENT

Lists the current metrics for a particular object type. Syntax is LIST METRICCURRENT WHERE objectType = 'CELLDISK'.

This command also allows for sorting and results limits as seen in the following example:
LIST METRICCURRENT attributes name, metricObjectName ORDER BY metricObjectName asc, name desc
      LIMIT 5

METRICDEFINITION

Lists metric definitions for the object that you can then get details for. With the command LIST metricDefinition WHERE objectType=cell, you can get all the metrics for that object type. You can then use the metric definition object again to get details for one of those specific metrics just listed:
LIST metricDefinition WHERE name= IORM_MODE DETAIL

METRICHISTORY

List metrics over a specified period of time. For example, with the command LIST METRICHISTORY WHERE ageInMinutes < 30, you can list all the metrics collected over the past 30 minutes. You can also use the predicate collectionTime to set a range from a specific time.

Use collectionTime as shown in the follow example: LIST METRICHISTORY WHERE collectionTime > '2018-04-01T21:12:00-10:00'. The metric history object can also be used to see a specific metric using the object’s name (for example, LIST METRICHISTORY CT_FD_IO_RQ_SM) or with a "where" clause to get objects with similar attributes like name (for example, LIST METRICHISTORY WHERE name like 'CT_.*').

OFFLOADGROUP

Lists the attributes for the offload group that are running on your storage servers. You can list all details for all groups with LIST OFFLOADGROUP DETAIL, or list the attributes for a specific group, as shown in the following example: LIST OFFLOADGROUP offloadgroup4. List specific attributes with LIST OFFLOADGROUP ATTRIBUTES name.

PHYSICALDISK

Lists all physical disks. Use the results of LIST PHYSICALDISK to identify a specific disk for further investigation, then list the details of that disk using the command as follows: LIST PHYSICALDISK 20:10 DETAIL. To list the details of flash disks, use the command as follows: LIST PHYSICALDISK FLASH_1_0 DETAIL).

PLUGGABLEDATABASE

Lists all PDBs. View the details of a specific PDB with LIST PLUGGABLEDATABASE pdb_name.

QUARANTINE

Lists all SQL statements that you prevented from using Smart Scans. The syntax is LIST QUARANTINE DETAIL. You can also use a "where" clause on any of the available attributes.

DIAGPACK

Use the ExaCLI CREATE, ALTER, DROP, and LIST commands with DIAGPACK to list the diagnostic packages and their status in your Exadata system. The syntax is LIST DIAGPACK [DETAIL], with DETAIL being an optional attribute. Use CREATE DIAGPACK with the packStartTime attribute to gather logs and trace files into a single compressed file for downloading, as in the following example: CREATE DIAGPACK packStartTime=2019_12_15T00_00_00. You can also use the value now with packStartTime: CREATE DIAGPACK packStartTime=now.

To download a diagnostic package, use DOWNLOAD DIAGPACK package_name local_directory. For example, the following command downloads a diagnostic package to the /tmp directory: DOWNLOAD DIAGPACK cfclcx2647_diag_2018_06_03T00_44_24_1 /tmp.

Usage Notes

  • Notes for the --cookie-jar option:
    • The user name and password are sent to the remote node for authentication. On successful authentication, the remote node issues a cookie (the login credentials) that is stored in the specified filename on the database node. If filename is not specified, the cookie is stored in a default cookie jar located at HOME/.exacli/cookiejar, where HOME is the home directory of the operating system user running the ExaCLI command. For the opc user, the home is /home/opc.
    • The operating system user running the ExaCLI command is the owner of the cookie jar file.
    • A cookie jar can contain multiple cookies from multiple users on multiple nodes in parallel sessions.
    • Cookies are invalidated after 24 hours.
    • If the cookie is not found or is no longer valid, ExaCLI prompts for the password. The new cookie is stored in the cookie jar identified by filename, or the default cookie jar if filename is not specified.
    • Even without the --cookie-jar option, ExaCLI still checks for cookies from the default cookie jar. However, if the cookie does not exist or is no longer valid, the new cookie will not be stored in the default cookie jar if the --cookie-jar option is not specified.
  • Notes for the -e option:
    • ExaCLI exits after running the commands.
    • If specifying multiple commands to run, be sure to enclose the commands in single quotes to prevent the shell from interpreting the semi-colon.
    • The batch file is a text file that contains one or more ExaCLI commands to run.
  • Notes for the -n (--no-prompt) option:
    • If ExaCLI needs additional information from the user, for example, if ExaCLI needs to prompt the user for a password (possibly because there were no valid cookies in the cookie-jar) or to prompt the user to confirm the remote node’s identity, then ExaCLI prints an error message and exits.

Examples

Example 7-57 Starting an Interactive ExaCLI Session on a Storage Server

This example shows the user on an Exadata compute node issuing the command to log in to ExaCLI start an interactive ExaCLI session on a storage server:
exacli -l cloud_user_clustername -c 192.168.136.7

See "Finding the IP addresses of storage cells using the cellip.ora file" for information about how to determine your storage server IP address.

After you are logged in, run additional commands as follows:
exacli cloud_user_clustername@192.168.136.7> LIST DATABASE
ASM
HRCDB

Example 7-58 Issuing a Single Command on a Compute Node

This example shows a single command issued on a compute node that does the following:
  • Connects to a storage server
  • Performs a LIST action
  • Exits the session (specified with the -e option)
exacli -l cloud_user_clustername -c 192.168.136.7 --xml --cookie-jar -e list griddisk detail

Connecting to a Storage Server with ExaCLI

To use ExaCLI on storage servers, you will need to know your target storage server's IP address.

If you do not know the IP address of the node you want to connect to, you can find it by viewing the contents of the cellip.ora file.

The following example illustrates how to do so on the UNIX command line for a quarter rack system. (Note that a quarter rack has three storage cells, and each cell has two connections, so a total of six IP addresses are shown.)
cat /etc/oracle/cell/
network-config/cellip.oracle
cell="192.168.136.5;cell="192.168.136.6"
cell="192.168.136.7;cell="192.168.136.8"
cell="192.168.136.9;cell="192.168.136.10"
If you are connecting to a storage cell for the first time using ExaCLI, you may be prompted to accept an SSL certificate. The ExaCLI output in this case will look like the following:
exacli -l cloud_user_clustername -c 192.168.136.7 --cookie-jar
No cookies found for cloud_user_clustername@192.168.136.7
Password: *********
EXA-30016: This connection is not secure. You have asked ExaCLI to connect to cell 192.168.136.7 securely. The identity of 192.168.136.7 cannot be verified.
Got certificate from server:
C=US,ST=California,L=Redwood City,O=Oracle Corporation,OU=Oracle Exadata,CN=ed1cl03clu01-priv2.usdc2.oraclecloud.com
Do you want to accept and store this certificate? (Press y/n)

Accept the self-signed Oracle certificate by pressing "y" to continue using ExaCLI.