StorageTek 5320 Command Line Cheat Sheet

The StorageTek 5320 NAS Appliances are pretty neat devices.  I find it necessary to utilize the command line interface (CLI) quite often. Unfortunately, the documentation for the 5320’s CLI is pretty limited — at least I couldn’t find anything in the manual talking about each command.

So, for your enjoyment, I’ve summarized each command below.  Having everything on one page will save you the trouble of going through each one doing “help command” to find out what each does! (Which is what I seem to have to do every time I hop on one of these and try to remember which command does what).

Command Description Usage
? Alias for the help command
approve manipulate approve file approve [reload | list | test | help]
aratewrite write contents of a file (async), report performance aratewrite FILENAME [+OFFSET] TOTALKB [BLOCKSIZE] [MB_PER_COMMIT]
arp show arp table arp [-d] [ -a | DEST | -i Interf ]
audit Audit Enable Command audit –help for details
auditconfig Audit Configuration Command auditconfig –help for details
cacls Display an access control list (ACL) cacls pathname
calog Compliance Audit Log Utility calog –help
cat show contents of a file cat filename
chattr change extended attributes chattr [-RV] <[-+iumq] | [[+r] [[[[[cc]yy]mm]dd]HH]MM][.ss]>
chgrp change file group chgrp [-R] group file…
chkpnt checkpoint management command chkpnt sub-commands [parameters] …
chkpntabort summarily abort checkpoints on a volume chkpntabort VOLUME
chkpntls list checkpoints chkpntls VOLUME …
chkpntmk make (create) a checkpoint chkpntmk VOLUME CHECKPOINT-NAME
chkpntmv move (rename) a checkpoint chkpntmv VOLUME OLD-CHECKPOINT-NAME NEW-CHECKPOINT-NAME
chkpntoff stop checkpoints on volume(s) chkpntoff VOLUME …
chkpnton show checkpoint status / start checkpoints on volume(s) chkpnton [VOLUME ...]
chkpntrm remove (delete) a checkpoint chkpntrm VOLUME CHECKPOINT-NAME/PATTERN
chmod change file mode chmod [-R] mode file…
chown change file owner chown [-R] owner[:group] file…
chsmb Remove UNIX attribute update restrictions chsmb pathname
cls clear the screen cls
cp copy files cp [-v] [-c] [-r] src dst
crashlocks simulate file lock manager crash crashlocks
datalock show or reset multi-user rpc locks datalock {show | reset }
date display or set date and time date [[[[[cc]yy]mm]dd]HH]MM]
dbg Enable or disable the debugger dbg [ -i [ enable | disable ] | -s ]
del delete files del FILE …
df show (disk) volumes and free space df
diag Save diagnostic file in /dvol/diagnostic diag
disk show disks / edit disk partition table disk -help for details
dtq Manage directory tree quotas dtq help (for usage)
du estimate file space usage du [-s] [-h] [PATH] …
echo echo a message echo WORD …
em Set and show speed & duplex mode for Intel NIC em [set,show] NICname
exit exit command interpreter (close connection) exit
find find files bigger than size (in MB), owned by uid or gid find PATH [-name NAME] [-size SIZE] [-uid UID] [-gid GID]
fsck check file volumes fsck VOLUME …
fsctl Filesystem control command fsctl command [sub-command] volume
fszap Zap Partition fszap disk partition
grouplook lookup group by name or GID grouplook GROUPNAME/UID …
gunzip uncompress file gunzip FILE
gzip compress file gzip FILE
halt halt system halt [-fm]
hbainfo Display HBA Information hbainfo [-a]
help show available commands help [COMMAND ...]
hostlook lookup hosts by name/address hostlook HOSTNAME/ADDR …
hostmatch match hosts by name/address hostmatch HOSTPATTERN HOSTNAME/ADDR …
ioapic Program the IO-APIC ioapic prog/show/list/mask/umask apicid intpin [level polarity vector]
iscsi iSCSI service control iscsi
isp2suspend Suspend file system I/O for maintainance isp2suspend
keymon monitor keys keymon STOPCHAR
ldapcfg Configure NISLDAP client ldapcfg [-i | -d | -e]
ll long list directory contents (ls -lz) ll [-Ra] [dir]
lm License Manager Command lm –help for details
ln create hard/symbolic links ln [-s] target link
load report loaded modules/load a module load [MODULE]
loadvars load variables from values file loadvars
locks file lock manager report locks
logtail show last few log messages logtail [NLINE|all]
ls list directory contents ls [-Ralz] [file]
lsattr display extended attributes lsattr [-Radv]
luninfo Display LUN Information luninfo
maccnvrt Convert resource.frk directories maccnvrt share-name
man show contents of manpage with pagination man [-ah] [section] name …
mbstat print mbuf stats mbstat [-sv]
menu use the menus menu
mkdir make directories mkdir [-m mode] directory …
more show contents of a file with pagination more filename
mount Mount volume(s) mount [-rwfuh] [-o options] [VOLUME [...]]
ndmp NDMP service control ndmp
netserv set network service options netserv {enable|disable|status} {service name} [options]
netstat show routing/interface tables/network addresses and ports netstat [-rin]
nfsmount Inspect, establish, or change an NFS volume nfsmount [LOCALNAME [SERVER:PATH] [OPTION=VAL ...]]
nfsstat nfsstat nfsstat NFS statistics
nfsunmount NFS unmount a remote directory nfsunmount LOCALNAME
nic Set and show speed & duplex mode for Network NIC nic [set,show] NICname
niscfg Configure NIS+ client niscfg [ -i | -k ]
oplocks Configure oplocks oplocks [enable | disable] volume-name
password set password for admin password
ping ping hosts by name/address ping [-c count] HOSTNAME/ADDR …
poolstat show object pool status poolstat poolname …
praudit Audit Print Command praudit –help for details
pwtest test admin password pwtest
quit alias for exit quit (see exit)
quota show a quota / set quota limits quota [-g|-u] /VOLUME|/* NAME|ID|NAME/ID [bh=KB] [bs=KB] [fh=N] [fs=N]
ratecopy copy a file, report performance ratecopy SOURCE_FILENAME DEST_FILENAME [BLOCKSIZE]
ratecpu cpu performance tests ratecpu
ratemem memory performance tests ratemem
ratenet rate network performance ratenet HOSTNAME/ADDR [NSEND [SIZE [MAXFAIL]]]
rateread read contents of a file, report performance rateread FILENAME [+OFFSET] [[BLOCKSIZE] [TOTALKB]]
ratewrite write contents of a file, report performance ratewrite FILENAME [+OFFSET] TOTALKB [BLOCKSIZE]
reboot reboot system reboot [-fm]
recover perform head/controller recovery recover {head|ctlr}
repquota report quotas repquota [-g][-u][-n][-e|-E][-q|-v] VOLUME|QUOTAFILE …
revoke revoke client mounts revoke HOSTNAME/ADDR …
rm remove files rm [-v] [-r] path
rmdir remove directories rmdir directory …
rotatelog rotates partner log file rotatelog
route manipulate routing table route [-n] COMMAND [ [ MODIFIERS ] [ DEST GATEWAY ] ]
rpcinfo report RPC information rpcinfo
savecore save a core dump of the operating system savecore savecore [ -chi | -fpkmv directory ]
savevars save variables to values file savevars
scanvars scan variables for printer, modem, and network changes scanvars
sdate display the secure date sdate [-d]
set set a system variable set NAME VALUE
show show system variables show [NAME/PATTERN ...]
shutdown shutdown the system shutdown [-fm]
snmp SNMP trap destination control snmp
source read commands from a file source FILENAME
sp show stack trace for thread ID sp Thread_ID
stat stat files stat FILE …
status system status report status [hi|si|ai|ti|dm|fd|fs|rm|up|mm|all ...]
strmstat report list of associated named streams strmstat file-path
su login in as privileged user su
sync_sys Synchoronize system files sync_sys Source-Head-ID
syslog set local syslog parameters syslog timestamp=[0|1|2] debug=[on|off]
tar TAR Command tar –help for details
telnet telnet to host by name/address telnet HOSTNAME/ADDR
top Display active threads top [-b] [-i secs] [-t cnt] [-l]
tsp Display threads and their stack tsp [-s] [-t cnt] [-l] thread_name
umount Unmount volume(s) umount VOLUME [...]
uname print system information uname
unload unload a module unload MODULE
unset unset a system variable unset NAME
uptime show how long system has been up and cpu usage uptime
userlook lookup user by name or UID userlook USERNAME/UID …
version show software version version
vscan Virus Scan command vscan {help|check|stats}
xj extended journal functions xj -help for details
zic timezone utility zic [help | zone | dumpzones | list | ]

The Command Line Interface (CLI) is always handy, and usually the first place I check out. It’s especially handy in a clustered environment as you can login to one of your NAS heads, and then telnet from there to the heartbeat interface of the other NAS head. This is useful when your volumes are still failed over to the surviving NAS head along with it’s main IP address.

The 5320’s “menu” command will bring up a nice menu that lets you do most (all?) of the things you can do in the GUI.

One other note about the GUI. It appears that only one person can be logged in at a time. So if you are in it, and keep getting disconnected, it’s probably because someone else is trying to access it too. What you are seeing is a ping-pong effect of two (or more) people getting kicked out, and logging back in. Utilizing the CLI over telnet or SSH does not have this problem.

I may go into details about some of these commands in the future.

Enjoy!

Post a Comment

Your email is never shared. Required fields are marked *

*
*