7.1 Start and Use XSH
This topic describes how to start and use the Exascale shell command line interface (XSH).
XSH is a command-line tool that is located on Exadata compute nodes and storage servers. You can use XSH to perform Linux-like commands on Exascale files and storage.
To use XSH you must have access to an Exascale user account and the digital key store (wallet) for the Exascale user account.
If you do not specify a wallet in the XSH command, XSH uses the first Exascale user wallet available in the following search path:
$OSSCONF/eswallet
$ORACLE_BASE/admin/eswallet
/etc/oracle/cell/network-config/eswallet
To run an XSH command, use the following command line syntax:
$ xsh [ XSH-command ]
In the command line, XSH-command specifies an XSH command to run. For example:
$ xsh ls
@my-data
$ xsh ls @my-data
@my-data/x @my-data/y @my-data/z1 @my-data/z2 @my-data/z3
$
If no command is specified, XSH displays a command list and basic help information. For example:
$ xsh
cat
clone
cp
dd
ls
man
hexdump
rm
scrub
snap
strings
template
touch
xattr
version
chacl
mv
lsacl
lsdataset
chtemplate
mkresourceprofile
lsresourceprofile
chresourceprofile
rmresourceprofile
Enter 'xsh man <command>' or 'xsh man -e <command>' for details
E.g., Enter 'xsh man dd' or 'xsh man -e dd'
Enter 'xsh man man' to see other options accepted by 'xsh man'
For specific online command help, use the XSH man
command. For example:
$ xsh man cat
NAME
cat - Dump the contents of the file to
standard out
SYNOPSIS
cat [{ -w | --wallet } <wallet-location> ]
[{ -T | --trace } [ <trace-level> ]]
[--aio=<naio>] filename
DESCRIPTION
Dump the contents of the file to standard out.
OPTIONS
-w, --wallet
Path to the wallet directory.
-T, --trace
Trace level, default level = 1.
--aio=<naio>
Number of async IOs, default=4.
EXAMPLES
cat --aio=8 @DATA/example.dbf
cat /tmp/example.txt -w $OSSCONF/eswallet
To facilitate troubleshooting, you can enable tracing by
setting the $XSH_TRACE_LEVEL
environment variable.
You can set the trace level to 1
(minimum tracing),
2
(medium tracing), or 3
(maximum tracing). For
example:
# sh/bash/ksh
$ export $XSH_TRACE_LEVEL=3
A trace file is written for each XSH command issued
while tracing is enabled using the $XSH_TRACE_LEVEL
environment variable. The trace file is written to the first
accessible location in the following list:
-
If the
$ADR_BASE
environment variable is set:$ADR_BASE/diag/EXC/xsh_<user-name>/<host-name>/trace/xsh_<date>.trc
/var/log/oracle/diag/EXC/xsh_<user-name>/<host-name>/trace/xsh_<date>.trc
/tmp/diag/EXC/xsh_<user-name>/<host-name>/trace/xsh_<date>.trc
To stop and deactivate tracing, you can set the
$XSH_TRACE_LEVEL
environment variable to
0
(zero). For
example:
# sh/bash/ksh
$ export $XSH_TRACE_LEVEL=0
Apart from using the $XSH_TRACE_LEVEL
environment variable, you can enable tracing for a single command by
including the --trace
or -T
option
in the XSH command. For
example:
$ xsh ls --trace 3 @my-data
Parent topic: Using XSH