August 6, 2018

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

Options
Option
Use
-c CELLNAMES
Executes the commands only on those cells (Storage Servers).
-g GROUPFILE
Executes the command on the cells mentioned in the file.
-l USERNAME
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
-n
This shows an abbreviated output instead of a long output from each command execution
-r REGEXP
Suppresses the output that matches the regular expression
-t
Displays the target cells where the command will run
-x script_name
The script will be executed on the target cells
-k
Establishes the ssh user equivalency
-f FILENAE
Copies the files to the other cells but does not execute them. It's useful for copying files and executing them later.
-d DESTFILE
Destination directory or file
-s SSHOPTIONS
String of options passed through to ssh
--scp=SCPOPTIONS
String of options passed through to scp if different  from sshoptions
--serial
Serialize execution over the cells
--unkey
Drop keys from target cell's authorized_keys file
-v
Verbose, print extra messages to stdout
--vmstat=VMSTATOPS
vmstat command options
--version
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=\'satya@roli.com\'"
# 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/sundiag.zip -d /tmp
# dcli -l root -g /opt/oracle.SupportTools/onecommand/all_group "cd /tmp;unzip sundiag.zip;ls -l newsundiag.sh;md5sum newsundiag.sh"
# dcli -g all_group -l root /opt/oracle.SupportTools/sundiag.sh 2&>1
# dcli -g all_group -l root --serial 'ls -l /tmp/sundiag*'

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


No comments:

Post a Comment