dcli commands in Oracle Exadata

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*'

 

Sobre Alexandre Pires

ORACLE OCS Goldengate Specialist, OCE RAC 10g R2, OCP 12C, 11g, 10g , 9i e 8i - Mais de 25 anos de experiência na área de TI. Participei de projetos na G&P alocado na TOK STOK, EDINFOR alocado na TV CIDADE "NET", 3CON Alocado no PÃO DE AÇUCAR, DISCOVER alocado na VIVO, BANCO IBI e TIVIT, SPC BRASIL, UOLDIVEO alocado no CARREFOUR e atualmente na ORACLE ACS atendendo os seguintes projetos: VIVO, CLARO, TIM, CIELO, CAIXA SEGUROS, MAPFRE, PORTO SEGURO, SULAMERICA, BRADESCO SEGUROS, BANCO BRADESCO, BASA, SANTANDER, CNJ, TSE, ELETROPAULO, EDP, SKY, NATURA, ODEBRESHT, NISSEI, SICREDI, CELEPAR, TAM, TIVIT, IBM, SMILES, CELEPAR, SERPRO,OKI,BANCO PAN, etc
Esse post foi publicado em EXADATA e marcado . Guardar link permanente.

Deixe uma resposta

Preencha os seus dados abaixo ou clique em um ícone para log in:

Logotipo do WordPress.com

Você está comentando utilizando sua conta WordPress.com. Sair / Alterar )

Imagem do Twitter

Você está comentando utilizando sua conta Twitter. Sair / Alterar )

Foto do Facebook

Você está comentando utilizando sua conta Facebook. Sair / Alterar )

Foto do Google+

Você está comentando utilizando sua conta Google+. Sair / Alterar )

Conectando a %s