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 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
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 ..');
}
4.
Here is the output of running this new script, assuming it were named
"prettyspace.aksh":
% ssh root@koi < prettyspace.aksh
Password:
SHARE USED AVAILABLE
admin/accounts 18K 248G
admin/exports 18K 248G
admin/primary 18K 248G
admin/traffic 18K 248G
admin/workflow 18K 248G
aleventhal/hw_eng 18K 248G
bcantrill/analytx 1.00G 248G
bgregg/dashbd 18K 248G
bgregg/filesys01 25.5K 100G
bpijewski/access_ctrl 18K 248G
...
48 Oracle ZFS Storage Appliance Administration Guide, Release OS8.6.x • September 2016

Table of Contents

Other manuals for Oracle ZFS Storage Appliance

Related product manuals