EasyManua.ls Logo

Oracle ZFS Storage Appliance

Oracle ZFS Storage Appliance
650 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Using the Choices Function
}
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.
1.
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.
fmt = '%-40s %-15s %-15s\n';
printf(fmt, 'SHARE', 'USED', 'AVAILABLE');
run('cd /');
run('shares');
pools = choices('pool');
for (p = 0; p < pools.length; p++) {
About the Oracle ZFS Storage Appliance 51

Table of Contents

Other manuals for Oracle ZFS Storage Appliance

Related product manuals