Exadata: Using cellcli and dcli

Using CELLCLI

Each Exadata Storage cell can be monitored, configured, and maintained using the cellcli command line interface. To invoke the CLI, simply login to the Exadata cell as cellmonitor, celladmin, or root, and type “cellcli”. Within cellcli, a wide range of commands can be invoked to monitor the cell.

Macintosh-7:~ jclarke$ ssh
[email protected]
[email protected]'s password:
Last login: Fri May 6 08:46:08 2011 from
172.16.150.11
[[email protected] ~]$ cellcli
CellCLI: Release 11.2.2.2.2 - Production on Fri
May 06 08:46:22 EDT 2011
Cell Efficiency Ratio: 92M
CellCLI> help
HELP [topic]
Available Topics:
ALTER
ALTER ALERTHISTORY
ALTER CELL
ALTER CELLDISK
ALTER GRIDDISK
ALTER IORMPLAN
ALTER LUN
ALTER PHYSICALDISK
ALTER QUARANTINE
ALTER THRESHOLD
ASSIGN KEY
CALIBRATE
CREATE
CREATE CELL
CREATE CELLDISK
CREATE FLASHCACHE
CREATE GRIDDISK
CREATE KEY
CREATE QUARANTINE
CREATE THRESHOLD
DESCRIBE
DROP
DROP ALERTHISTORY
DROP CELL
DROP CELLDISK
DROP FLASHCACHE
DROP GRIDDISK
DROP QUARANTINE
DROP THRESHOLD
EXPORT CELLDISK
IMPORT CELLDISK
LIST
LIST ACTIVEREQUEST
LIST ALERTDEFINITION
LIST ALERTHISTORY
LIST CELL
LIST CELLDISK
LIST FLASHCACHE
LIST FLASHCACHECONTENT
LIST GRIDDISK
LIST IORMPLAN
LIST KEY
LIST LUN
LIST METRICCURRENT
LIST METRICDEFINITION
LIST METRICHISTORY
LIST PHYSICALDISK
LIST QUARANTINE
LIST THRESHOLD
SET
SPOOL
START
CellCLI>

 

The help command above showed all the commands available via cellcli. Note the following:

  • Login as root only to perform calibrate commands and do the initial configuration. You can launch cellcli as the root user on any the cell server nodes, but as a matter of practice (and security) it’s best to get used to working with “celladmin” or “cellmonitor”
  • While connected to cellcli as the Linux account celladmin, you can perform all cellcli commands except calibrate.
  • While logged into the cell server as cellmonitor, you can do any “read-only” commands; you cannot change any configuration or attributes. The cellmonitor Linux login should be used for monitoring purposes and can be secured by providing a Linux password that could be distributed to a wider-range class of user than employees that require administrative capabilities.

Using dcli

The cellcli commands in the previous section operate on the Cell server you’re logged in to. To obtain a cross-cell view of cell server configuration, metrics, alerts, and other information, you can use dcli (Distributed Command Line Interface). dcli is a Python script installed on each Exadata node that allows you to run Cell CLI commands on multiple cell server nodes at once.

In order or dcli to function, SSH user equivalency should be established to eliminate the need to supply the “celladmin” (or root/cellmonitor) Linux password on the cell servers. Before showing the output of a dcli monitoring command, let’s walk through how to setup SSH equivalency. I’ll start by “unkeying” SSH trust – this basically removed authorized_keys entries from the celladmin’s ~/.ssh directory on each cell server.

[[email protected] ~]$ dcli -g cell_group
--unkey
cm01cel01: ssh key dropped
cm01cel02: ssh key dropped
cm01cel03: ssh key dropped
[[email protected] ~]$

Now, we’ll re-establish SSH equivalency:

[[email protected] ~]$ dcli -g cell_group -k
[email protected]'s password:
[email protected]'s password:
[email protected]'s password:
cm01cel01: ssh key added
cm01cel02: ssh key added
cm01cel03: ssh key added
[[email protected] ~]$

 

Next, ensure that the ~/.ssh directory has 700 permissions for the celladmin Linux user on each cell server. Here’s a sample cell listing using dcli:1 In this example, the “-g cell_group” clause tells dcli to read the “cell_group” file for a list of cell servers to operate on. The contents of cell_group are provided after the actual dcli command below, with one cell server name for each row:

 

[[email protected] ~]$ dcli -g cell_group cellcli
-e list cell
cm01cel01: cm01cel01 online
cm01cel02: cm01cel02 online
cm01cel03: cm01cel03 online
[[email protected] ~]$
[[email protected] ~]$ cat cell_group
cm01cel01
cm01cel02
cm01cel03
[[email protected] ~]$

Now to monitor, for example, the amount of FlashCache used in each cell:

[[email protected] ~]$ dcli -g cell_group cellcli
-e list \
metriccurrent where name=' FC_BY_USED'
cm01cel01: FC_BY_USED FLASHCACHE 13,316 MB
cm01cel02: FC_BY_USED FLASHCACHE 13,344 MB
cm01cel03: FC_BY_USED FLASHCACHE 13,301 MB
[[email protected] ~]$

 

If you were only interested in cell servers cm01cel02 and cm01cel03, use the “-c” option as below:

 

[[email protected] ~]$ dcli -c
cm01cel02,cm01cel03 cellcli -e list metriccurrent where name='
FC_BY_USED'
cm01cel02: FC_BY_USED FLASHCACHE 13,344 MB
cm01cel03: FC_BY_USED FLASHCACHE 13,301 MB
[[email protected] ~]$

 

1 You could also use the “-l” option on dcli to provide a non-default (celladmin) login to each cell server; for example, “-l root” or “-l cellmonitor”