August 6, 2014

dcli commands in Oracle Exadata

DCLI  --- Distributed Command Line Interface/Interpreter (in Oracle Exadata)

DCLI, a Python script, to execute commands across multiple cells (Oracle Exadata Storage Servers) from one cell.

dcli [Options] [Command]
Command - Can be cellcli command or Linux command

Executes the commands only on those cells (Storage Servers).
Executes the command on the cells mentioned in the file.
The default user is celladmin; but we can use any other user to use for remote ssh execution. Make sure the user has ssh equivalency across all the cells where you run this command
This shows an abbreviated output instead of a long output from each command execution
Suppresses the output that matches the regular expression
Displays the target cells where the command will run
-x script_name
The script will be executed on the target cells
Establishes the ssh user equivalency
Copies the files to the other cells but does not execute them. It's useful for copying files and executing them later.
Destination directory or file
String of options passed through to ssh
String of options passed through to scp if different  from sshoptions
Serialize execution over the cells
Drop keys from target cell's authorized_keys file
Verbose, print extra messages to stdout
vmstat command options
Show dcli version number
-h, --help
Show help message

$ dcli –h

# dcli -g cells.txt -k
# dcli -l root -g all_cells shutdown -h -y now
# dcli -l root -g cells.txt ps -aef|grep OSWatcher
# dcli -l root -g all_cells vmstat 2 2
$ dcli -c cell2,cell3 vmstat
$ dcli -g mycells.txt --vmstat="-a 5 2"

# dcli -g all_cells -l root "cellcli -e list cell"
# dcli -c cel02,cel04,cel06,cel08,cel12 -l root "cellcli -e list cell"
# dcli -g all_cells -t
# dcli -l celladmin -c cel08 cellcli -e "list physicaldisk 20:8 detail"
# dcli -l celladmin -g all_cells cellcli -e "list griddisk"
# dcli -l root -g cells cellcli -e "alter cell smtpToAddr=\'\'"
# dcli -l root -g all_cells cellcli -e "list cell attributes name,smtpServer,smtpToAddr,smtpFrom"
# dcli -g mycells cellcli -e "alter cell validate mail"
# dcli -g all_cells -n cellcli -e "alter cell validate configuration"
# dcli -l root -g all_cells -x list_scr.dcl
$ dcli -g cells.txt -x mycommands.scl
# dcli -l root -g all_cells -r '.* 0' -x err.dcl
$ dcli -g cells.txt -r "reco" cellcli -e "list griddisk"
# dcli -r '.* active' -l root -g all_cells cellcli -e "list griddisk"

# dcli -l root -g /opt/oracle.SupportTools/onecommand/all_group -f /tmp/ -d /tmp
# dcli -l root -g /opt/oracle.SupportTools/onecommand/all_group "cd /tmp;unzip;ls -l;md5sum"
# dcli -g all_group -l root /opt/oracle.SupportTools/ 2&>1
# dcli -g all_group -l root --serial 'ls -l /tmp/sundiag*'

Related Articles: cellcli commands in Exadata  Oracle Exadata Terms  Full-Half-Quarter Racks in Exadata Exadata Statistics