Displaying Specific Storage Pool Statistics

You can select the specific pool information to be displayed by issuing options and arguments with the zpool list command.

The -o option enables you to filter which columns are displayed. The following example shows how to list only the name and size of each pool:

$ zpool list -o name,size
NAME                    SIZE
syspool1               80.0G
syspool2                1.2T

You can use the zpool list command as part of a shell script by issuing the combined -Ho options. The -H option suppresses display of column headings and instead displays tab-separated pool information. For example:

$ zpool list -Ho name,size
syspool1   80.0G
syspool2  1.2T

The -T option enables you to gather time-stamped statistics about the pools. Use the following syntax:

$ zpool list -T d interval [count]
d

Specifies to use the standard date format when displaying the date.

interval

Specifies the interval in seconds between which information is displayed.

count

Specifies the number of times to report the information. If you do not specify count then the information is continuously refreshed at the specified interval until you press Ctl-C.

The following example displays pool information twice, with a 3-second gap between the reports. The output uses the standard format to display the date.

$ zpool list -T d 3 2
Tue Nov  2 10:36:11 MDT 2010
NAME    SIZE  ALLOC   FREE    CAP  DEDUP  HEALTH  ALTROOT
pool   33.8G  83.5K  33.7G     0%  1.00x  ONLINE  -
rpool  33.8G  12.2G  21.5G    36%  1.00x  ONLINE  -
Tue Nov  2 10:36:14 MDT 2010
pool   33.8G  83.5K  33.7G     0%  1.00x  ONLINE  -
rpool  33.8G  12.2G  21.5G    36%  1.00x  ONLINE  -