Using The Choices Function - Oracle ZFS Storage Appliance Administration Manual

Hide thumbs Also See for ZFS Storage Appliance:
Table of Contents

Advertisement

}
2.
Here's the output of running the script, assuming it were saved to a file named
"svcinfo.aksh":
% ssh root@koi < space.aksh
Password:
cifs
disabled
dns
online
ftp
disabled
http
disabled
identity
online
idmap
online
ipmp
online
iscsi
online
ldap
disabled
ndmp
online
nfs
online
nis
online
ntp
online
scrk
online
sftp
disabled
smtp
online
snmp
disabled
ssh
online
tags
online
vscan
disabled

Using the Choices Function

The choices function returns an array of the valid property values for any property for which the
set of values is known and enumerable. For example, the following script retrieves the list of
all pools on the shares node using the choices function and then iterates all pools to list projects
and shares along with the available space.
For example, the following script retrieves the list of all pools on the shares node
1.
using the choices function and then iterates all pools to list projects and shares
along with the available space.
fmt = '%-40s %-15s %-15s\n';
printf(fmt, 'SHARE', 'USED', 'AVAILABLE');
run('cd /');
run('shares');
pools = choices('pool');
for (p = 0; p < pools.length; p++) {
Using the Choices Function
About the Oracle ZFS Storage Appliance
51

Advertisement

Table of Contents
loading

Table of Contents