Oracle ZFS Storage Appliance Administration Manual page 48

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

Advertisement

Using the List Function
bpijewski/access_ctrl 18432 266617007104
...
3.
If one would rather a "pretty printed" (though more difficult to handle
programmatically) variant of this, one could directly parse the output of the get
command:
script
Here is the output of running this new script, assuming it were named
4.
"prettyspace.aksh":
% ssh root@koi < prettyspace.aksh
Password:
SHARE
admin/accounts
admin/exports
admin/primary
admin/traffic
admin/workflow
aleventhal/hw_eng
bcantrill/analytx
bgregg/dashbd
bgregg/filesys01
bpijewski/access_ctrl
...
48
Oracle ZFS Storage Appliance Administration Guide, Release OS8.6.x • September 2016
run('shares');
projects = list();
printf('%-40s %-10s %-10s\n', 'SHARE', 'USED', 'AVAILABLE');
for (i = 0; i < projects.length; i++) {
run('select ' + projects[i]);
shares = list();
for (j = 0; j < shares.length; j++) {
run('select ' + shares[j]);
share = projects[i] + '/' + shares[j];
used = run('get space_data').split(/\s+/)[3];
avail = run('get space_available').split(/\s+/)[3];
printf('%-40s %-10s %-10s\n', share, used, avail);
run('cd ..');
}
run('cd ..');
}
USED
AVAILABLE
18K
248G
18K
248G
18K
248G
18K
248G
18K
248G
18K
248G
1.00G
248G
18K
248G
25.5K
100G
18K
248G

Advertisement

Table of Contents
loading

Table of Contents